adding-a-feature
Fungsinya
Skill ini adalah daftar periksa untuk menambahkan fitur ke aplikasi Agent-Native. Skill ini memastikan layar, aksi, instruksi agent, dan status bersama aplikasi semuanya ikut diperbarui. Skill ini untuk pengembang yang ingin agent dan antarmukanya saling cocok.
Kapan dipakai
- βSaat Anda menambahkan fitur yang menambah data atau kemampuan baru ke aplikasi.
- βKetika fitur baru muncul di layar tetapi agent tidak bisa menggunakannya.
- βSaat Anda ingin memastikan perubahan hanya menyentuh bagian yang memang perlu diubah.
Link skill
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/adding-a-feature/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBisakah Anda menambahkan fitur pelacak tugas ke aplikasi ini, dan memastikan agent juga bisa membuat serta menampilkan daftar tugas?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mengerjakan empat area secara berurutan: antarmuka pengguna, aksi, instruksi agent, dan status bersama. Area yang tidak tersentuh perubahan akan dilewati.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
useQuerywith custom keys β folduseChangeVersions([<source>, "action"])from@agent-native/core/client/hooksinto thequeryKeyand setplaceholderData: (prev) => prev. Local chat-run side effects bump those counters too. Remote changes require the page's explicituseDbSync({ 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
Pertanyaan umum
Apakah perubahan visual kecil juga memerlukan keempat area?
Tidak. Perubahan gaya atau teks hanya perlu menyentuh area yang benar-benar terdampak.
Mengapa agent dan antarmuka harus cocok?
Skill ini menjelaskan bahwa fitur yang hanya terlihat di antarmuka tidak bisa dipakai oleh agent, dan sebaliknya juga menjadi masalah.
Apakah agent bisa melihat apa yang sedang dilakukan pengguna?
Skill ini mencakup sinkronisasi status aplikasi agar agent bisa melihat layar yang sedang aktif.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 7.6k
- Peringkat
- #13130
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
design-exploration
7.6kMembantu agent Anda mengeksplorasi beberapa arah desain UI secara berdampingan, membiarkan Anda memilih satu, lalu menyempurnakan desain yang dipilih.
visual-edit
7.6kMembantu agent Anda membuka aplikasi lokal yang sedang berjalan di editor visual agar Anda dapat meninjau dan mengedit layar aslinya bersama-sama.
turn-into-app
7.6kMengubah alur kerja, spreadsheet, atau proyek menjadi aplikasi visual yang rapi, dengan layar yang terisi dan agent yang bekerja di balik kontrol.
visual-plan
7.6kMengubah rencana teks biasa menjadi rencana visual interaktif dengan diagram, peta file, cuplikan kode, dan pertanyaan terbuka.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.