extension-points
यह क्या करती है
यह स्किल extension slot सिस्टम का वर्णन करती है, जिसमें ऐप के नामित खाली स्थान इंस्टॉल करने योग्य विजेट से भरे जाते हैं। इसमें slot, slot target और यूज़र का इंस्टॉल शामिल है। यह उन डेवलपर्स के लिए है जो चाहते हैं कि उनका ऐप वैकल्पिक विजेट होस्ट करे।
कब इस्तेमाल करें
- ✓जब extension-enabled ऐप को किसी नामित slot में विजेट दिखाना है।
- ✓जब मौजूदा एक बार का कस्टम ब्लॉक ऐसी चीज़ बने जिसे slot में इंस्टॉल किया जा सके।
- ✓जब आपको जानना है कि slots और उनके targets कैसे सहेजे जाते हैं।
Skill का लिंक
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/extension-points/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरे डैशबोर्ड में एक slot जोड़ सकते हैं, ताकि यूज़र साइडबार में मौसम विजेट इंस्टॉल कर सकें?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
डेवलपर ऐप के layout में एक नामित slot रखता है। विजेट रजिस्टर करता है कि वह उस slot को भर सकता है, और यूज़र उसे वहां इंस्टॉल कर सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Extension Points
Terminology note. "Extensions" in this doc are the framework's sandboxed Alpine.js mini-app primitive (see the
extensionsskill). They are NOT LLM "tools" (function calls). The slot-system tables are still physically namedtool_slotsandtool_slot_installsfor back-compat — see the table at the bottom of this doc and the "Database & API names" section in theextensionsskill.
Mental model
Slots are named React-shaped holes in apps. Extensions are widgets that opt into filling those holes. The framework matches them up by string ID.
Three primitives:
| Primitive | What it is |
|---|---|
| Slot | <ExtensionSlot id="..." context={...} /> dropped into an app's JSX |
| Slot target | A row saying "extension X can render in slot Y" — tool_slots table (Drizzle: extensionSlots) |
| Slot install | A row saying "user U wants extension X in slot Y" — tool_slot_installs (Drizzle: extensionSlotInstalls) |
Slots do not make extensions a default product surface. Most apps keep extension creation and discovery disabled while preserving installed blocks and old deep links for compatibility. Add a slot only when the app deliberately supports this customization seam; otherwise implement the requested behavior in native app code.
When <ExtensionSlot> renders, it queries the user's installs and mounts
one <EmbeddedTool> (a small auto-sized iframe) per install, pushing the
slot's context into each via postMessage. (The component is still exported
as EmbeddedTool for back-compat.)
Slot ID convention
<app>.<area>.<position> — three dot-separated lowercase-kebab segments.
mail.contact-sidebar.bottommail.thread-toolbar.actionsclips.right-panel.tabscalendar.event-detail.bottom
Stable strings. Renaming a slot is a data migration — same as renaming a route.
How to author an extension that fills a slot
Only follow this flow when the host app explicitly enables extensions and the user has asked for a one-off custom block. Reusable behavior belongs in app code.
Create the extension with
create-extension. The HTML can readwindow.slotContextto get the host's context (the contact email, recording id, etc.) and subscribe to changes viawindow.onSlotContext(fn).<div x-data="{ contact: null }" x-init="contact = window.slotContext; window.onSlotContext(c => contact = c)" > <template x-if="contact"> <div class="rounded-lg border p-4 m-4"> <p class="text-sm"> Notes for <span x-text="contact.contactEmail"></span> </p> </div> </template> </div>Declare the slot target with
add-extension-slot-target:add-extension-slot-target { extensionId: "<id>", slotId: "mail.contact-sidebar.bottom" }Install it for the current user with
install-extension:install-extension { extensionId: "<id>", slotId: "mail.contact-sidebar.bottom" }
The slot will pick up the install on its next render (≤2s via polling sync, immediate after the action's UI invalidation).
How to declare a slot in your app
Drop <ExtensionSlot> wherever you want to allow extensions:
import { ExtensionSlot } from "@agent-native/core/client/extensions";
// inside your component
<ExtensionSlot
id="mail.contact-sidebar.bottom"
context={{ contactEmail: contact.email, contactName: contact.name }}
showEmptyAffordance
/>;
The legacy import path
@agent-native/core/client/toolscontinues to re-export the same component for back-compat with existing templates.
Props:
id— slot identifier. Must match what extensions target.context— object pushed to each embedded extension asslotContext. Re-pushed whenever this prop changes.showEmptyAffordance— when true, shows a "+ Add widget" button in the empty state. Default: false (slot renders nothing when empty).className/toolClassName— optional styling hooks. (ThetoolClassNameprop name is kept for back-compat; it styles the embedded extension's iframe wrapper.)
The host doesn't register slots in advance — <ExtensionSlot> is the
declaration. If an extension ta
अक्सर पूछे जाने वाले सवाल
slot क्या है?
slot ऐप के layout में एक नामित जगह है जहां विजेट दिखाई दे सकता है।
क्या यह डिफ़ॉल्ट रूप से चालू है?
नहीं। स्किल कहती है कि अधिकतर ऐप extension बनाना और खोजना बंद रखते हैं, जबकि इंस्टॉल किए ब्लॉक सुरक्षित रहते हैं।
क्या ये LLM tools जैसे ही हैं?
नहीं। यहां extensions छोटे ऐप विजेट हैं, न कि वे function calls जो AI इस्तेमाल करता है।
जानकारी
लेखक का मूल विवरण
How extensions render as widgets inside other apps via named UI slots — the framework's optional extension system. Use when an extension-enabled app needs to wire an ExtensionSlot or make an existing one-off custom block installable into a slot.
repo: BuilderIO/agent-native
लोकप्रियता
- GitHub स्टार
- 7.6k
- रैंकिंग में स्थान
- #13156
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
design-exploration
7.6kयह आपके एजेंट को UI के कई डिज़ाइन विकल्प साथ-साथ दिखाने, आपकी पसंद चुनवाने और फिर चुने डिज़ाइन को सुधारने में मदद करती है।
visual-edit
7.6kयह आपके एजेंट को चल रहे लोकल ऐप को विज़ुअल एडिटर में खोलने देती है, ताकि आप उसकी असली स्क्रीन एक साथ देखकर संपादित कर सकें।
turn-into-app
7.6kयह किसी वर्कफ़्लो, स्प्रेडशीट या प्रोजेक्ट को भरी हुई स्क्रीन वाले विज़ुअल ऐप में बदलती है, जिसके कंट्रोल के पीछे एजेंट काम करता है।
visual-plan
7.6kयह सादे टेक्स्ट वाली योजना को डायग्राम, फ़ाइल नक्शों, कोड अंश और खुले सवालों वाली इंटरैक्टिव विज़ुअल योजना में बदलती है।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।