मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट7.6k · #13181

self-modifying-code

यह क्या करती है

यह स्किल बताती है कि एजेंट ऐप के अपने कंपोनेंट और स्टाइल कैसे बदल सकता है, और कौन सी config व फ़्रेमवर्क फ़ाइलें वर्जित हैं। यह उन डेवलपर्स के लिए है जो ऐसा ऐप डिज़ाइन कर रहे हैं जिसे एजेंट को बदलना है।

कब इस्तेमाल करें

  • ✓जब आप ऐसा ऐप डिज़ाइन कर रहे हैं जिसे एजेंट खुद बदलेगा।
  • ✓जब आप तय कर रहे हैं कि कोई फ़ाइल एजेंट के संपादन के लिए सुरक्षित है या नहीं।
  • ✓जब एजेंट config, environment फ़ाइलों या फ़्रेमवर्क packages को बदलना चाहता है।

Skill का लिंक

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/self-modifying-code/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/self-modifying-code/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“एजेंट को इस पेज का लेआउट बदलने दीजिए, पर पक्का कीजिए कि वह मेरी सेटिंग्स या environment फ़ाइलों को न छुए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

बदलाव स्तरों में बंटे होते हैं। डेटा और सोर्स फ़ाइलें जांच के साथ अनुमत हैं, config के लिए मंज़ूरी चाहिए, और secrets व फ़्रेमवर्क packages कभी नहीं बदले जाते।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Self-Modifying Code

Rule

The agent can edit the app's own source code — components, routes, styles, scripts. This is a feature, not a bug. Design your app expecting this.

Why

An agent-native app isn't just an app the agent can use — it's an app the agent can change. The agent can fix bugs, add features, adjust styles, and restructure code. This makes the agent a true collaborator, not just an operator.

Modification Taxonomy

Not all modifications are equal. Use this to decide what level of care is needed:

Tier What Examples After modifying
1: Data Files in data/ JSON state, generated content, markdown Nothing — these are routine
2: Source App code Components, routes, styles, scripts Run pnpm typecheck && pnpm lint
3: Config Project config package.json, tsconfig.json, vite.config.* Ask for explicit approval first
4: Off limits Secrets and framework .env, @agent-native/* packages & overrides Never modify these

Tier 4 includes all of the following — not only editing package source:

  • Files under node_modules/@agent-native/* (core, dispatch, scheduling, …)
  • pnpm.overrides, overrides, resolutions, or patchedDependencies that target any @agent-native/* package
  • pnpm patch, pnpm patch-commit, or local package patch artifacts for any dependency
  • Invented "dispatch/core behavior" shims meant to paper over a version skew or failed upgrade

This does not prohibit intentional app-owned UI customization. When public props and composition are insufficient, the customizing-agent-native skill uses agent-native eject to transfer the smallest supported unit from the installed package into the app. The ejected unit must keep public runtime contracts and must not replace Core auth, DB, actions, agent execution, or transport behavior. Manual copying is only the fallback described by an unknown third-party package's add-style blueprint.

When an older branch needs current packages, use agent-native upgrade (see the upgrade-agent-native skill). If upgrade or typecheck fails, fix app code or stop and ask — do not patch the framework.

Git Checkpoint Pattern

Before modifying source code (Tier 2+), create a rollback point:

  1. Commit or stash current state
  2. Make the edit
  3. Run pnpm typecheck && pnpm lint
  4. If verification fails → revert with git checkout -- <file>
  5. If verification passes → continue

This ensures the agent can experiment without breaking the app.

Designing for Agent Editability

Make your app easy for the agent to understand and modify:

Expose UI state via data-* attributes so the agent knows what's selected:

const el = document.documentElement;
el.dataset.currentView = view;
el.dataset.selectedId = selectedItem?.id || "";

Expose richer context via window.__appState for complex state:

(window as any).__appState = {
  selectedId: id,
  currentLayout: layout,
  itemCount: items.length,
};

Use configuration-driven rendering — Extract visual decisions (colors, layouts, sizes) into JSON config files in data/. The agent can modify the config (Tier 1) instead of the component source (Tier 2).

Keep localized copy in catalogs — When editing visible UI copy, labels, toasts, empty states, prompts, or formatting, update the English source catalog. Read the optional internationalization skill and update additional catalogs only when translations.locales in agent-native.config.ts includes them.

Don't

  • Don't modify .env files or files containing secrets
  • Don't modify @agent-native/core, @agent-native/dispatch, or other @agent-native/* package internals (including under node_modules)
  • Don't confuse readable package source with app-owned code: use customizing-agent-native and agent-native eject for supported ownership transfer
  • Don't use pnpm patch / pnpm patch-commit, commit patches/ artifacts, or add pnpm.patchedDependencies to "make the app run" after a version bump
  • Don't add pnpm.overrides / patchedDependencies / resolutions for @agent-native/* to paper over a broken upgrade
  • Don't invent local
अक्सर पूछे जाने वाले सवाल

क्या एजेंट .env फ़ाइलें बदल सकता है?

नहीं। environment फ़ाइलें वर्जित स्तर में हैं।

सोर्स कोड बदलने के बाद कौन सी जांच चलती है?

स्किल सोर्स संपादन के बाद typecheck और lint चलाने को कहती है।

config बदलावों को कौन मंज़ूर करता है?

package या build config फ़ाइलें बदलने से पहले यूज़र की साफ़ मंज़ूरी चाहिए।

जानकारी

लेखक का मूल विवरण

Tiers, checkpoints, and off-limits paths for an agent editing the app's own source. Use when designing UI for agent editability, deciding whether a file is safe for the agent to change, or when tempted to patch config, `.env`, or an `@agent-native/*` package. Do not load it for ordinary source edits.

repo: BuilderIO/agent-native

लोकप्रियता

GitHub स्टार
7.6k
रैंकिंग में स्थान
#13181
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

design-exploration

7.6k

यह आपके एजेंट को UI के कई डिज़ाइन विकल्प साथ-साथ दिखाने, आपकी पसंद चुनवाने और फिर चुने डिज़ाइन को सुधारने में मदद करती है।

डिज़ाइनइंटरफ़ेस (UI/UX)

visual-edit

7.6k

यह आपके एजेंट को चल रहे लोकल ऐप को विज़ुअल एडिटर में खोलने देती है, ताकि आप उसकी असली स्क्रीन एक साथ देखकर संपादित कर सकें।

डिज़ाइनइंटरफ़ेस (UI/UX)

turn-into-app

7.6k

यह किसी वर्कफ़्लो, स्प्रेडशीट या प्रोजेक्ट को भरी हुई स्क्रीन वाले विज़ुअल ऐप में बदलती है, जिसके कंट्रोल के पीछे एजेंट काम करता है।

कोडिंगसामान्य कोडिंग

visual-plan

7.6k

यह सादे टेक्स्ट वाली योजना को डायग्राम, फ़ाइल नक्शों, कोड अंश और खुले सवालों वाली इंटरैक्टिव विज़ुअल योजना में बदलती है।

प्रोडक्टिविटीटास्क और प्रोजेक्ट

मिलती-जुलती skills