extension-points
できること
このスキルは拡張スロットの仕組みを説明します。アプリの中の名前の付いた空きを、インストール可能なウィジェットが埋めます。スロット、スロットのターゲット、ユーザーのインストールを扱います。任意のウィジェットをアプリに置きたい開発者向けです。
使う場面
- ✓拡張が有効なアプリで、名前の付いたスロットにウィジェットを表示する必要があるとき。
- ✓1回限りのカスタムのブロックを、スロットにインストールできるものにしたいとき。
- ✓スロットとそのターゲットがどう保存されるかを知る必要があるとき。
スキルのリンク
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/extension-points/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ダッシュボードにスロットを追加して、ユーザーがサイドバーに天気のウィジェットをインストールできるようにしてもらえますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
開発者は、アプリのレイアウトに名前の付いたスロットを置きます。ウィジェットはそのスロットを埋められると登録し、ユーザーはそこにインストールできます。
技術的な内容(元の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
よくある質問
スロットとは何ですか?
ウィジェットが表示されうる、アプリのレイアウトの名前の付いた場所です。
これは既定で有効ですか?
いいえ。スキルは、ほとんどのアプリで拡張の作成と検出をオフにしつつ、インストール済みのブロックは保持すると述べています。
これはLLMのツールと同じものですか?
いいえ。ここでの拡張は小さなアプリのウィジェットで、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
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
design-exploration
7.6kUIの複数のデザインの方向性を並べて検討し、1つを選んでもらい、選んだデザインを磨き上げるようエージェントを支援します。
visual-edit
7.6k実行中のローカルのアプリをビジュアルエディターで開き、本物の画面をまとめて確認し編集できるようエージェントを支援します。
turn-into-app
7.6kワークフロー、スプレッドシート、プロジェクトを、画面にデータが入り、操作の裏でエージェントが働く、洗練されたビジュアルアプリに変えます。
visual-plan
7.6kプレーンテキストの計画を、図、ファイルのマップ、コードの断片、未解決の質問を含む、対話できるビジュアルな計画に変えます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。