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

adding-a-feature

O que ela faz

Esta skill é uma lista de verificação para acrescentar uma funcionalidade a um aplicativo Agent-Native. Ele garante que a tela, a action, as instruções do agente e o estado compartilhado do app sejam todos atualizados. É para desenvolvedores que querem que o agente e a interface combinem.

Quando usar

  • ✓Quando você está acrescentando uma funcionalidade que adiciona dados ou uma nova capacidade a um aplicativo.
  • ✓Quando uma nova funcionalidade aparece nas telas, mas o agente não consegue usá-la.
  • ✓Quando você quer confirmar que uma alteração toca apenas as áreas de que precisa.

Link da skill

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/adding-a-feature/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/adding-a-feature/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 acrescentar a este aplicativo uma funcionalidade de controle de tarefas, garantindo que o agente também consiga criar e listar tarefas?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente percorre quatro áreas em ordem: a interface do usuário, a action, as instruções do agente e o estado compartilhado. Ele pula qualquer área que a alteração não toque.

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

Texto original do autor, em inglês, direto do GitHub.

Adding a Feature — The Four-Area Checklist

Rule

Every new feature MUST update all four areas. Skipping any one breaks the agent-native contract — the agent and UI must always be equal partners.

Scope check first: this is the checklist for a feature that adds app data or a new capability. A restyle, a copy change, or a screen with no new data model and no new agent-visible operation only needs the areas it actually touches — do not manufacture actions, state keys, or a skill for it.

Why

Agent-Native apps are defined by parity: everything the UI can do, the agent can do, and vice versa. A feature that only has UI is invisible to the agent. A feature that only has scripts is invisible to the user. A feature without app-state sync means the agent is blind to what the user is doing.

The Checklist

When you add a new feature, work through these four areas in order:

1. UI Component

Build the user-facing interface — a page, component, dialog, or route. Use useActionQuery and useActionMutation from @agent-native/core/client/hooks to call actions for data fetching and mutations. Do not create a custom REST endpoint just so React can call action-backed data; the action endpoint already exists.

Agent edits must refresh the UI without a background poll. Local chat-run tool completions invalidate action queries and source counters after each side-effecting tool and again at run end. There are two query paths:

  • useActionQuery / useActionMutation — local action mutations invalidate ['action'] observers, and chat-run tool completions invalidate them for agent writes. No background sync opt-in is needed for the current user's agent run. Prefer this path.
  • Raw useQuery with custom keys — fold useChangeVersions([<source>, "action"]) from @agent-native/core/client/hooks into the queryKey and set placeholderData: (prev) => prev. Local chat-run side effects bump those counters too. Remote changes require the page's explicit useDbSync({ realtime: { reason } }) opt-in only when data changes without the current user acting and must appear before refresh.

Never opt in public, anonymous, marketing, docs, or SSR routes, settings, forms, or read-mostly lists. Refetch those on focus or navigation. Shared Slides editing and the Mail inbox are the current first-party examples that need remote updates. Each opted-in open tab adds a shared background transport and one poll per idle interval; hidden tabs pause, and idle polling backs off to 1, 2, then 5 minutes. See real-time-sync for the decision rule and examples.

import { useChangeVersions } from "@agent-native/core/client/hooks";
import { useQuery } from "@tanstack/react-query";

const v = useChangeVersions(["dashboards", "action"]);
useQuery({
  queryKey: ["dashboard", id, v],
  queryFn: () => fetchDashboard(id),
  placeholderData: (prev) => prev, // no flicker on refetch
});

See the real-time-sync skill for the full pattern and source catalog.

2. Action

Create an action in actions/ using defineAction. This serves double duty: the agent calls it as a tool, and the UI calls it through useActionQuery / useActionMutation while the framework owns the HTTP transport. Set http: { method: "GET" } for read actions, leave default for writes, or set http: false for agent-only actions like navigate and view-screen.

Before adding a new route or endpoint, inspect the existing actions. Reuse an action if it already covers the business operation, extend it if the shared contract is incomplete, or create a new defineAction if the agent and UI both need the capability. Do not add pass-through /api/* routes that re-export actions. If client code needs a new framework/app route, expose a named helper or hook first and use that helper from components and docs.

For provider-backed analysis/query/reporting integrations, do not turn every provider endpoint or filter into a rigid action. Prefer the shared provider-api-catalog / provider-api-docs / provider-api-request pattern from @agent-native/core/provider-api, then add narrow convenience actions only for workflows that truly deserve a first-class shortcut. Treat this as a capability requirement, not a nice-to-have: convenience actions must not become the ceiling of what the agent can ask the provider to do. Pair broad provider access with staging or sandboxed code execution when responses may be too large for chat context. If p

Perguntas frequentes

Pequenas mudanças visuais precisam das quatro áreas?

Não. Uma mudança de estilo ou de texto só precisa das áreas que realmente toca.

Por que o agente e a interface precisam combinar?

A skill explica que uma funcionalidade visível apenas na interface não pode ser usada pelo agente, e o contrário também é um problema.

O agente enxerga o que o usuário está fazendo?

A skill cobre a sincronização do estado do app, para que o agente consiga ver a tela atual.

Detalhes

Descrição original do autor

The four-area checklist every new feature must complete. Use when adding any feature, integration, or capability to ensure the agent and UI stay in parity.

repo: BuilderIO/agent-native

Popularidade

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

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas