Pular para o conteúdo
Skillpedia
Código em geral7,6 mil · #13151

customizing-agent-native

O que ela faz

Esta skill define a ordem a seguir ao personalizar os recursos Agent-Native de um aplicativo. Começa pelas configurações de marca e pelas opções suportadas dos componentes, e só depois copia um recurso para dentro do aplicativo. É para desenvolvedores que querem a própria aparência ou comportamento.

Quando usar

  • ✓Quando você quer mudar a aparência de um recurso compartilhado para combinar com a sua marca.
  • ✓Quando você precisa substituir um componente compartilhado pelo sistema de design da sua empresa.
  • ✓Quando um recurso compartilhado precisa se comportar de forma diferente no seu aplicativo e as configurações não bastam.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/customizing-agent-native/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Pode mudar a aparência do painel de chat do agente para combinar com as cores e os botões da nossa marca, sem quebrar as atualizações?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente primeiro define os tokens da marca e registra os componentes da empresa, depois usa as opções suportadas do recurso. Somente se isso não bastar, ele copia o menor recurso possível para dentro do aplicativo.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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:

  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,
});

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

Perguntas frequentes

Posso editar diretamente os arquivos do pacote?

Não. A skill diz para nunca editar a pasta node_modules nem remendar os pacotes.

O que significa ejetar aqui?

Significa copiar o menor recurso suportado para dentro do seu aplicativo, para que você possa ser o dono e alterar essa cópia.

Minhas mudanças vão sobreviver a uma atualização?

As personalizações feitas por meio de configurações suportadas ficam separadas do código do pacote, o que facilita as atualizações.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
7,6 mil
Posição no ranking
#13151
Licença
MIT
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas