writing-agent-instructions
Qué hace
Esta guía explica cómo escribir las instrucciones que moldean el comportamiento de un agente de IA dentro de una app, incluido el mapa principal, las skills detalladas y las descripciones de herramientas. Está pensada para quienes crean apps o plantillas para agentes de IA.
Cuándo usarla
- ✓Cuando escribes o revisas el archivo AGENTS.md de una app.
- ✓Cuando escribes una nueva skill o describes una acción que puede usar el agente.
- ✓Cuando necesitas decidir si algo va en las instrucciones, en una skill o en la memoria.
Link de la skill
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/writing-agent-instructions/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Ayúdame a reescribir las instrucciones de mi app para que la IA sepa cuándo usar cada herramienta.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La guía dice que el archivo principal de instrucciones debe ser corto y fácil de escanear, que los detalles profundos van en las skills y que las descripciones de herramientas deben permitir al agente elegir rápido la adecuada.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Writing Agent Instructions & Skills
This is a creator-facing guide. When you build an agent-native app or template,
the agent's behavior is only as good as the instructions you give it. Three
surfaces carry that guidance: AGENTS.md (the map), skills (the deep dives),
and action/tool descriptions (how the agent picks the right tool). Write each
one for fast retrieval, not for prose.
Keep AGENTS.md small and skimmable
AGENTS.md is loaded as orientation. It should be the smallest thing that lets
the agent act correctly, with everything deep pushed into skills. Aim for these
sections and little else:
- Purpose line — one sentence on what the app is and the primary workflow.
- Core rules — the handful of invariants that must always hold (data in SQL, operations go through actions, AI goes through the agent chat, schema changes are additive). Short, imperative bullets.
- Application-state keys — the
navigation/selection/focus keys the agent reads to know what the user is looking at, with their shape. - Action table — a compact table of action name -> purpose (see below).
- Skills index — a list of the skills that exist and when to read each one.
If a section is growing past a screen, it belongs in a skill. AGENTS.md
answers "what is this app and what can I do," not "how exactly do I do the hard
thing."
The 6,000-character cap is real and silent
A template AGENTS.md is injected into the runtime agent's system prompt and
hard-sliced at COMPACT_PROMPT_RESOURCE_MAX_CHARS (6,000). Past that, the agent
sees a truncation marker instead of your text, so the tail stops being
always-on guidance and becomes something it has to go fetch. pnpm guard:agent-chat-context — the repository's own check — fails the build when a
first-party file overflows; generated apps do not ship that repository-only
guard. Keep files under ~5,500 so ordinary edits don't tip them over.
Two consequences worth designing around:
- Put the skills list second, right after the purpose line. It is the pointer to every deferred skill. If it lands in the truncated tail, the agent cannot discover any of the depth you carefully moved out.
- Markdown tables cost more than they look. Prettier pads table cells to
align columns, and that invisible whitespace counts against the cap — enough
padding in a wide action table to push a file back over it on its own. Both
**/AGENTS.mdand**/SKILL.mdare in.prettierignorefor this reason; keep them there and write table rows unpadded.
# Projects App
One workspace for projects, tasks, and notes. Agent and UI share the same SQL
data and the same actions.
## Core Rules
- Data lives in SQL via Drizzle. Use actions for all writes.
- All AI work goes through the agent chat; never call an LLM inline.
- Schema changes are additive only.
## Application State
- `navigation.view`: `home` | `project`
- `navigation.projectId`: selected project on a project page
## Actions
| Action | Purpose |
| --- | --- |
| `list-projects` | List accessible projects |
| `create-project` | Create a project |
| `update-project` | Rename or archive a project |
## Skills
- `project-imports` — read before importing legacy CSV exports.
- `sharing` — read before exposing a project to other users.
Single-source AGENTS.md (CLAUDE.md is a symlink)
Keep one canonical instructions file: AGENTS.md. If a client expects
CLAUDE.md, make it a symlink to AGENTS.md rather than a second copy. Two
hand-maintained files drift, and the agent ends up with contradictory rules.
One source of truth, linked where needed.
Keep generated guidance in sync
Framework guidance is authored once in this repo and copied outward. Treat
.agents/skills/ as the canonical source for shared skills. Generated
workspace skills in packages/core/src/templates/workspace-core/.agents/skills/
and first-party template copies of shared skills must stay byte-for-byte in
sync; run pnpm sync:workspace-skills after editing a shared skill, and
pnpm guard:workspace-skills before calling the guidance done.
Generated app and workspace instructions must teach the same action-first data contract:
- Normal app data goes through
defineActionfiles inactions/. - React calls actions with
useActionQuery,useActionMutation, orcallAction; route paths are a transport detail hidden behind helpers. - Custom
/api/*routes are only for route-shaped protocols such as uploads, str
Preguntas frecuentes
¿Qué tamaño debe tener el archivo principal de instrucciones?
La guía recomienda que sea pequeño y menciona un límite de caracteres para ese archivo.
¿Dónde deben ir los detalles largos de cómo hacer algo?
En las skills, para que el archivo principal solo diga qué es la app y qué puede hacer.
¿En qué debe centrarse una descripción de acción?
En ayudar al agente a elegir rápido la herramienta correcta, así que se escribe para una búsqueda rápida y no como texto narrativo.
Detalles
Descripción original del autor
How to write great agent instructions for an agent-native app or template: AGENTS.md, skills, and tool/action descriptions. Use when authoring or reviewing AGENTS.md, writing a SKILL.md, wording action descriptions, or deciding what belongs in instructions vs skills vs memory.
repo: BuilderIO/agent-native
Popularidad
- Estrellas en GitHub
- 7,6 mil
- Posición en el ranking
- #13192
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
design-exploration
7,6 milAyuda a tu agente a explorar varias direcciones de diseño de interfaces una al lado de otra, dejar que elijas una y después afinar el diseño elegido.
visual-edit
7,6 milAyuda a tu agente a abrir una aplicación local en marcha en un editor visual, para que reviséis y editéis juntos sus pantallas reales.
turn-into-app
7,6 milConvierte un flujo de trabajo, una hoja de cálculo o un proyecto en una aplicación visual pulida, con pantallas llenas de datos y un agente que trabaja tras los controles.
visual-plan
7,6 milConvierte un plan escrito en texto plano en un plan visual interactivo, con diagramas, mapas de archivos, fragmentos de código y preguntas abiertas.
Skills parecidas
writing-skills
311 milEnseña a tu agente a escribir skills nuevas y a probar cada una primero, comprobando que realmente cambia la forma en que se comporta el agente.
writing-for-agents
310 milExplica cómo escribir instrucciones claras para agentes de IA, incluidas las skills y los archivos AGENTS.md y CLAUDE.md, para que el agente se comporte de forma predecible.
bengali-nlp
280 milHace que tu agente procese texto en bengalí. Ayuda a entender y trabajar con el idioma, normalizando el texto y gestionando sus características propias.