customizing-agent-native
できること
このスキルは、アプリのAgent-Nativeの機能をカスタマイズするときに従う順序を示します。ブランドの設定と対応するコンポーネントのオプションから始め、そのあとで初めて機能をアプリにコピーします。自分の見た目や動作を持ちたい開発者向けです。
使う場面
- ✓共有の機能の見た目を、自社のブランドに合わせて変えたいとき。
- ✓共有のコンポーネントを、自社のデザインシステムに置き換える必要があるとき。
- ✓共有の機能がアプリで違う動作をすべきで、その設定だけでは足りないとき。
スキルのリンク
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/customizing-agent-native/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ブランドの色とボタンに合わせて、エージェントのチャットパネルの見た目を変えてもらえますか?更新で壊れないようにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、まずブランドのトークンを設定し、会社のコンポーネントを登録します。そのあと機能の対応しているオプションを使います。それでも足りない場合だけ、最も小さい機能をアプリにコピーします。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Customizing Agent-Native
Rule
Start with the app's registered design system and local UI adapters, then use
the public feature's props, semantic components, controller, product slots,
and callbacks. If those seams are not enough, use the eject CLI to transfer
the smallest supported feature into the app and make that copy app-owned.
Never edit node_modules, deep-import a private source file at runtime, or
patch an @agent-native/* package.
Use this order:
- Set brand tokens with the build-time theme configuration when tokens are enough.
- Register company components in
app/design-system.tswithdefineDesignSystem, then pass that definition toToolkitProvider. - Configure a public feature through its semantic components, headless controller, and product-level render slots.
- Compose app primitives behind the app's local UI adapter layer.
- Eject the smallest feature into app-owned source.
- Propose a new Toolkit seam when the same override is useful in two apps.
Ejection is for intentional product customization, not for hiding an upgrade failure or replacing Core runtime behavior.
Use A Company Design System
Keep the explicit, typed registration seam in app/design-system.ts:
import { defineDesignSystem } from "@agent-native/toolkit/design-system";
import {
AcmeActionButtonAdapter,
AcmeDialogAdapter,
} from "./design-system/acme-adapter";
export const designSystem = defineDesignSystem({
name: "Acme",
components: {
ActionButton: AcmeActionButtonAdapter,
Dialog: AcmeDialogAdapter,
},
});
Adapters translate the semantic Toolkit contract into company component props.
They are ordinary React components and may use MUI-style providers, React Aria,
CSS modules, CSS-in-JS, or another styling runtime. className and style are
optional interoperability hooks, not Tailwind or CVA requirements.
The contract has nine leaf components (ActionButton, IconButton,
TextField, TextArea, Spinner, Skeleton, Status, Surface, Avatar)
and eight behavior components (Tooltip, Menu, Popover, Dialog,
Picker, Checkbox, Switch, Tabs). Picker covers select and combobox
behavior, not date picking. Behavior adapters own their portal, focus,
keyboard, dismissal, and stacking implementation while honoring the semantic
props and portalContainer interop contract.
App product code imports standard controls from its local adapter path, usually
@/components/ui/*. Do not import @agent-native/toolkit/ui/* directly from
pages, routes, or domain components. That bypasses the app seam and makes a
future design-system replacement incomplete. Toolkit feature packages remain
valid imports; configure their presentation through the registered semantic
components, controller, and product slots.
Run the published conformance kit against a complete adapter in its own CI:
import { assertDesignSystemConformance } from "@agent-native/toolkit/conformance";
import { DESIGN_SYSTEM_CONTRACT_VERSION } from "@agent-native/toolkit/design-system";
await assertDesignSystemConformance({
adapterName: "Acme",
components,
contractVersion: DESIGN_SYSTEM_CONTRACT_VERSION,
});
Customize A Shared Feature
Prefer feature-level headless controllers over rebuilding individual widgets. One controller must power both the Toolkit default view and every custom render path so behavior, actions, analytics, accessibility state, and error handling cannot drift. Use a product-level render slot to replace the view while keeping that controller. Eject only when the controller and slots cannot express the required product behavior.
Eject A Feature
Discover and inspect the ejection units published by installed first-party packages before changing source:
agent-native eject --list
agent-native eject inspect <unit>
agent-native eject <unit> --app <app>
agent-native eject <unit> --app <app> --apply
The command is dry-run by default. It prints the file closure, consumer import
rewrites, protected package contracts, and verification commands before
writing. --apply copies the package-version-matched source into the app and
rewrites only imports covered by the unit manifest.
If a framework feature has no ejection unit, follow its documented configuration, adapter, or extension seam; do not invent a manual package-copy recipe. For an unknown third-party package, use the emitted add-style blueprint as a starting point. Protected runtime behavior is neve
よくある質問
パッケージのファイルを直接編集できますか?
いいえ。node_modulesフォルダーを編集したり、パッケージにパッチを当てたりしてはならないとスキルは述べています。
ここでのejectとはどういう意味ですか?
最も小さな対応している機能をアプリにコピーして、そのコピーを自分で所有し変更できるようにすることです。
アップグレードの後も変更は残りますか?
対応している設定で行った変更はパッケージのコードと分けて保たれるので、アップグレードが容易になるとスキルは述べています。
詳細
作者による元の説明
How to configure, compose, or eject Agent-Native features into app-owned code. Use when overriding shared components or integrations, customizing a template, adding UI to chat or headless apps, or inspecting package source.
repo: BuilderIO/agent-native
人気
- GitHubのスター
- 7.6k
- ランキング
- #13151
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
design-exploration
7.6kUIの複数のデザインの方向性を並べて検討し、1つを選んでもらい、選んだデザインを磨き上げるようエージェントを支援します。
visual-edit
7.6k実行中のローカルのアプリをビジュアルエディターで開き、本物の画面をまとめて確認し編集できるようエージェントを支援します。
turn-into-app
7.6kワークフロー、スプレッドシート、プロジェクトを、画面にデータが入り、操作の裏でエージェントが働く、洗練されたビジュアルアプリに変えます。
visual-plan
7.6kプレーンテキストの計画を、図、ファイルのマップ、コードの断片、未解決の質問を含む、対話できるビジュアルな計画に変えます。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。