writing-agent-instructions
하는 일
이 가이드는 앱에서 AI 에이전트의 행동을 정하는 지침을 쓰는 방법을 설명합니다. 주요 지도 파일, 상세한 스킬, 도구 설명을 포함합니다. AI 에이전트를 위한 앱이나 템플릿을 만드는 사람을 위한 가이드입니다.
사용하는 경우
- ✓앱의 AGENTS.md 파일을 쓰거나 검토할 때.
- ✓새 스킬 파일을 쓰거나 에이전트가 쓸 수 있는 액션을 설명할 때.
- ✓무엇이 지침, 스킬 또는 메모리에 들어가야 하는지 결정해야 할 때.
스킬 링크
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/writing-agent-instructions/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“AI가 각 도구를 언제 써야 하는지 알도록, 제 앱의 지침을 다시 써 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 가이드는 주요 지침 파일을 짧고 훑어보기 쉽게 유지하고, 자세한 내용은 스킬로 옮기며, 에이전트가 빠르게 올바른 도구를 고를 수 있도록 도구 설명을 쓰라고 말합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
주요 지침 파일은 얼마나 길어야 하나요?
작게 유지하라고 하며, 그 파일에 글자 수 상한이 있다는 점도 알려 줍니다.
긴 방법 설명은 어디에 두어야 하나요?
스킬에 두어, 주요 파일에는 앱이 무엇이고 무엇을 할 수 있는지만 적히도록 합니다.
액션 설명은 무엇에 초점을 맞춰야 하나요?
에이전트가 올바른 도구를 빨리 고르도록 돕는 것이므로, 산문보다는 빠른 검색에 맞게 씁니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 7.6k
- 순위
- #13192
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
design-exploration
7.6k에이전트가 여러 UI 디자인 방향을 나란히 보여 주고, 사용자가 하나를 고르면 그 디자인을 다듬도록 돕습니다.
visual-edit
7.6k에이전트가 실행 중인 로컬 앱을 시각 편집기에 열어, 실제 화면을 함께 검토하고 편집하도록 돕습니다.
turn-into-app
7.6k워크플로, 스프레드시트 또는 프로젝트를 데이터가 채워진 세련된 시각 앱으로 바꾸고, 컨트롤 뒤에서 에이전트가 작업하도록 합니다.
visual-plan
7.6k일반 텍스트 계획을 다이어그램, 파일 맵, 코드 조각, 열린 질문이 담긴 대화형 시각 계획으로 바꿔 줍니다.
비슷한 스킬
writing-skills
311k에이전트를 위한 새 스킬을 작성하고, 각 스킬이 실제로 에이전트의 행동을 바꾸는지 사용하기 전에 테스트하도록 가르칩니다.
writing-for-agents
310k스킬, AGENTS.md, CLAUDE.md 등 AI 에이전트가 읽는 문서를 명확하게 쓰는 방법을 알려 주어 에이전트가 예측 가능하게 행동하도록 돕습니다.
bengali-nlp
280k에이전트가 벵골어 텍스트를 처리하도록 돕습니다. 언어를 이해하고 다루며, 텍스트를 정규화하고 고유한 특징을 처리합니다.