मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग7.6k · #13130

adding-a-feature

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

यह स्किल Agent-Native ऐप में फ़ीचर जोड़ने के लिए एक चेकलिस्ट है। यह सुनिश्चित करती है कि स्क्रीन, action, एजेंट के निर्देश और साझा ऐप स्टेट, सब अपडेट हों। यह उन डेवलपर्स के लिए है जो चाहते हैं कि एजेंट और इंटरफ़ेस एक जैसे रहें।

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

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

Skill का लिंक

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/adding-a-feature/SKILL.md

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

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

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

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

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

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

“इस ऐप में एक टास्क ट्रैकर फ़ीचर जोड़िए, और पक्का कीजिए कि एजेंट भी टास्क बना और सूचीबद्ध कर सके।”

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

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

एजेंट चार हिस्सों पर क्रम से काम करता है: यूज़र इंटरफ़ेस, action, एजेंट के निर्देश और साझा स्टेट। जिस हिस्से को बदलाव नहीं छूता, उसे वह छोड़ देता है।

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

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

Adding a Feature — The Four-Area Checklist

Rule

Every new feature MUST update all four areas. Skipping any one breaks the agent-native contract — the agent and UI must always be equal partners.

Scope check first: this is the checklist for a feature that adds app data or a new capability. A restyle, a copy change, or a screen with no new data model and no new agent-visible operation only needs the areas it actually touches — do not manufacture actions, state keys, or a skill for it.

Why

Agent-Native apps are defined by parity: everything the UI can do, the agent can do, and vice versa. A feature that only has UI is invisible to the agent. A feature that only has scripts is invisible to the user. A feature without app-state sync means the agent is blind to what the user is doing.

The Checklist

When you add a new feature, work through these four areas in order:

1. UI Component

Build the user-facing interface — a page, component, dialog, or route. Use useActionQuery and useActionMutation from @agent-native/core/client/hooks to call actions for data fetching and mutations. Do not create a custom REST endpoint just so React can call action-backed data; the action endpoint already exists.

Agent edits must refresh the UI without a background poll. Local chat-run tool completions invalidate action queries and source counters after each side-effecting tool and again at run end. There are two query paths:

  • useActionQuery / useActionMutation — local action mutations invalidate ['action'] observers, and chat-run tool completions invalidate them for agent writes. No background sync opt-in is needed for the current user's agent run. Prefer this path.
  • Raw useQuery with custom keys — fold useChangeVersions([<source>, "action"]) from @agent-native/core/client/hooks into the queryKey and set placeholderData: (prev) => prev. Local chat-run side effects bump those counters too. Remote changes require the page's explicit useDbSync({ realtime: { reason } }) opt-in only when data changes without the current user acting and must appear before refresh.

Never opt in public, anonymous, marketing, docs, or SSR routes, settings, forms, or read-mostly lists. Refetch those on focus or navigation. Shared Slides editing and the Mail inbox are the current first-party examples that need remote updates. Each opted-in open tab adds a shared background transport and one poll per idle interval; hidden tabs pause, and idle polling backs off to 1, 2, then 5 minutes. See real-time-sync for the decision rule and examples.

import { useChangeVersions } from "@agent-native/core/client/hooks";
import { useQuery } from "@tanstack/react-query";

const v = useChangeVersions(["dashboards", "action"]);
useQuery({
  queryKey: ["dashboard", id, v],
  queryFn: () => fetchDashboard(id),
  placeholderData: (prev) => prev, // no flicker on refetch
});

See the real-time-sync skill for the full pattern and source catalog.

2. Action

Create an action in actions/ using defineAction. This serves double duty: the agent calls it as a tool, and the UI calls it through useActionQuery / useActionMutation while the framework owns the HTTP transport. Set http: { method: "GET" } for read actions, leave default for writes, or set http: false for agent-only actions like navigate and view-screen.

Before adding a new route or endpoint, inspect the existing actions. Reuse an action if it already covers the business operation, extend it if the shared contract is incomplete, or create a new defineAction if the agent and UI both need the capability. Do not add pass-through /api/* routes that re-export actions. If client code needs a new framework/app route, expose a named helper or hook first and use that helper from components and docs.

For provider-backed analysis/query/reporting integrations, do not turn every provider endpoint or filter into a rigid action. Prefer the shared provider-api-catalog / provider-api-docs / provider-api-request pattern from @agent-native/core/provider-api, then add narrow convenience actions only for workflows that truly deserve a first-class shortcut. Treat this as a capability requirement, not a nice-to-have: convenience actions must not become the ceiling of what the agent can ask the provider to do. Pair broad provider access with staging or sandboxed code execution when responses may be too large for chat context. If p

अक्सर पूछे जाने वाले सवाल

क्या छोटे विज़ुअल बदलावों में चारों हिस्से चाहिए?

नहीं। स्टाइल या टेक्स्ट बदलने में केवल वही हिस्से चाहिए जिन्हें बदलाव सचमुच छूता है।

एजेंट और UI का मेल क्यों ज़रूरी है?

स्किल बताती है कि जो फ़ीचर केवल UI में दिखता है, उसे एजेंट इस्तेमाल नहीं कर सकता, और उल्टा भी समस्या है।

क्या एजेंट देखता है कि यूज़र क्या कर रहा है?

स्किल में ऐप स्टेट सिंक शामिल है, ताकि एजेंट मौजूदा स्क्रीन देख सके।

जानकारी

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

The four-area checklist every new feature must complete. Use when adding any feature, integration, or capability to ensure the agent and UI stay in parity.

repo: BuilderIO/agent-native

लोकप्रियता

GitHub स्टार
7.6k
रैंकिंग में स्थान
#13130
लाइसेंस
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