本文へ移動
cccskills
無料GitHub で公開日本語紹介

customizing-agent-native

Agent-Nativeの共有UIや機能をアプリに合わせて設定・組み合わせる方法を案内します。必要に応じて最小単位をアプリ側のコードへ移し、カスタマイズします。

原文原文の説明を見る

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.

BuilderIO/agent-nativeスター 7,525(GitHub 7,525 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 共有UIに会社のデザインを適用したいとき
  • チャット機能の表示を調整したいとき
  • 機能をアプリ側のコードへ移したいとき
  • パッケージの実装場所を調べたいとき

日本語での紹介

できること

Agent-Nativeの共有コンポーネントや機能を、アプリのデザインや要件に合わせて調整する方法を案内します。まずテーマ設定やデザインシステム、ローカルUIアダプターを使い、機能の公開プロパティ、コントローラー、描画スロットで表示を組み立てます。それでも足りない場合は、対応する最小の機能単位をアプリ側のソースへ移す eject の確認・適用・差分確認・復元の流れを説明します。インストール済みバージョンに対応する実装の探し方も扱い、共有ランタイムの役割を保つ境界を示します。

こんなときに便利

会社独自のデザインシステムを導入したい、チャット画面やヘッドレスアプリにUIを追加したい、テンプレートの共有機能を製品に合わせて変えたい場合に向いています。パッケージの実装を確認し、設定で対応できるか、アプリ側で所有すべきかを判断したい開発者にも役立ちます。

使い方の例

  • 「このアプリのデザインシステムを共有UIコンポーネントに適用してください」
  • 「チャット履歴の表示を変えたいので、公開スロットで可能か調べてください」
  • 「この機能をアプリ側に移す手順と、変更差分の確認方法を教えてください」

注意点

Agent-Nativeのアプリとパッケージが対象です。agent-native eject は既定でドライランです。適用後は agent-native.ejections.json をコミットし、アプリ側へ移した機能には将来の上流修正が自動では反映されない点に留意します。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(1)

  • SKILL.md9.4 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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:

  1. Set brand tokens with the build-time theme configuration when tokens are enough.
  2. Register company components in app/design-system.ts with defineDesignSystem, then pass that definition to ToolkitProvider.
  3. Configure a public feature through its semantic components, headless controller, and product-level render slots.
  4. Compose app primitives behind the app's local UI adapter layer.
  5. Eject the smallest feature into app-owned source.
  6. 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,
});

New components and optional props are minor contract changes. Required props, removed APIs, or behavioral changes require a new contract major.

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.

Every first-party public ejection unit must have a complete manifest. If one is missing, treat that as a framework coverage bug instead of inventing a copy recipe. For an unknown third-party package, use the emitted add-style blueprint as a starting point. Protected runtime behavior is never copied; follow the reported configuration, adapter, or extension seam instead.

Applied ejections are recorded in the committed agent-native.ejections.json, including package version, manifest digest, target hashes, and import rewrites. Use the recorded state to review drift or undo an unchanged ejection:

agent-native eject diff <unit> --app <app>
agent-native eject restore <unit> --app <app>
agent-native eject restore <unit> --app <app> --apply

Restore is hash-gated. It refuses to remove locally edited files or reverse changed imports and prints their diff instead. Keep an edited ejection as app-owned code, or reconcile those edits before restoring it.

Find The Installed Implementation

Use the source that matches the installed package version:

pnpm action docs-search --query "<component or feature>"
pnpm action source-search --query "<component or symbol>"
rg -n "<component or symbol>" node_modules/@agent-native/toolkit/src
rg -n "<component or symbol>" node_modules/@agent-native/core-corpus/corpus
  • Toolkit publishes readable TypeScript under node_modules/@agent-native/toolkit/src/ for selective UI adoption.
  • First-party template source lives under node_modules/@agent-native/core-corpus/corpus/templates/; Core's own implementation lives under node_modules/@agent-native/core/dist/.
  • Treat those trees as read-only references. Prefer agent-native eject so the package manifest selects the complete source closure and rewrites imports. Manual inspection is still useful for deciding whether to configure, compose, eject, or propose a shared seam.

Do not manually guess at sibling dependencies. The ejection manifest owns the required file closure and keeps protected contracts on public package imports.

Preserve The Agent-Native Contract

UI ownership may change; product contracts should not:

  • Keep app operations in defineAction actions and call them through useActionQuery, useActionMutation, or another named client helper.
  • Keep navigation, selection, and focused-object state visible through the existing application-state keys.
  • Keep AI work in the shared agent chat instead of adding direct LLM calls.
  • Keep auth, access checks, persistence, chat transport, and agent execution in Core. Do not copy those runtimes into the app.
  • Keep local adapters narrow so package upgrades still improve every surface the app has not intentionally taken ownership of.
  • Keep page, route, and domain code on local UI adapter imports. Never reach around the registered design system with direct Toolkit UI primitive imports.

App Shapes

  • Template app: begin with app/design-system.ts, its local UI adapters, and domain UI. Use Toolkit features for repeated workspace behavior; eject only the unit being customized.
  • Chat app: keep AgentChatSurface, thread state, and chat transport in Core. Compose or eject Toolkit presentation such as chat-history UI around it.
  • Headless app: stay action-first while no UI is needed. When adding a UI, use the Chat template as the on-ramp or add Toolkit components without replacing the existing actions.
  • Workspace: put one-app overrides in that app. Promote a local component to packages/shared only when multiple workspace apps use it.

After Ejecting

  • Commit agent-native.ejections.json with the app-owned files and rewrites.
  • Remove unused dependencies and imports from the ejected files.
  • Keep visible text in the app's localization catalogs.
  • Run the manifest verification commands plus the app's formatter, typecheck, and focused tests.
  • Re-check the installed source during future package upgrades; the app-owned ejection does not receive upstream fixes automatically. Use eject diff to distinguish recorded output from subsequent local edits.

Don't

  • Don't edit or import from node_modules/@agent-native/*/src at runtime.
  • Don't add pnpm.overrides, patches, or resolutions for Agent-Native packages.
  • Don't copy Core auth, DB, action, agent-loop, or transport internals.
  • Don't manually copy a first-party unit with a missing recipe; fix its manifest.
  • Don't eject a full package when a prop, slot, wrapper, or smaller unit works.
  • Don't fork feature state into a custom view; consume the feature's controller.

Related Skills

  • agent-native-docs — version-matched docs and source lookup
  • agent-native-toolkit — shared-vs-app-owned architecture boundary
  • self-modifying-code — safe app source edits
  • upgrade-agent-native — supported package upgrade path
  • adding-a-feature — UI/action/instructions/application-state parity

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

a2a-assets

無料概要あり

複数のアプリやMCPホストからブランド画像・動画を生成、調整、書き出し、挿入する作業を支援します。ライブラリ選択や修正依頼も扱います。

  • スライド用のブランド画像を作りたいとき
  • 既存素材をフィードバックに合わせて直したいとき
  • 動画素材を生成して書き出したいとき
BuilderIO/agent-native7,5252026年10月26日 更新

account-health

無料概要あり

特定の顧客企業について、契約と製品利用の数値を照らし合わせ、根拠や不足情報を明記した健全性レポートをまとめます。

  • 顧客の健全性を確認したいとき
  • 契約席数と実利用を比べたいとき
  • 更新前に利用状況を整理したいとき
BuilderIO/agent-native7,5252026年10月26日 更新

actions

無料概要あり

アプリの操作をエージェントと画面の両方から呼び出せるアクションとして実装し、API連携や画面のデータ取得を一貫した形で追加するスキルです。

  • 新しいアプリ操作を追加したいとき
  • 外部APIと連携したいとき
  • 画面からデータを取得したいとき
BuilderIO/agent-native7,5252026年10月26日 更新

adding-a-feature

無料概要あり

新機能をUI・エージェント用アクション・説明資料・画面状態の4領域でそろえ、利用者とエージェントのどちらからも一貫して使えるようにするチェックリストです。

  • 新機能追加の作業範囲を整理したいとき
  • UIとエージェント操作をそろえたいとき
  • 画面状態の同期漏れを防ぎたいとき
BuilderIO/agent-native7,5252026年10月26日 更新

adhoc-analysis

無料概要あり

複数のデータソースを照合して、傾向や指標、根拠をまとめた分析結果を作成します。必要に応じて、再実行できるダッシュボードとして保存できます。

  • 商談と通話記録を照合したいとき
  • 顧客の利用状況を横断して調べたいとき
  • 繰り返し更新できる分析を保存したいとき
BuilderIO/agent-native7,5252026年10月26日 更新

admin-surfaces

無料概要あり

Analyticsの管理画面で、機能フラグの状態確認と切り替え、ダッシュボード利用状況の調査、接続先アプリのデータベース管理を行います。

  • アプリごとの機能フラグを確認・変更したいとき
  • ダッシュボードの所有者や利用状況を調べたいとき
  • 接続済みアプリのテーブルを管理したいとき
BuilderIO/agent-native7,5252026年10月26日 更新

BuilderIO のスキルをすべて見る

このスキルの問題を報告する