The **SKILL package** is a structured knowledge pack for AI coding agents (Cursor, Claude Code, OpenCode, etc.). All files are under [`skill/`](../skill/) in this tutorial.
AI agents fetch `SKILL.md` to get a concise overview of the entire Yao Agent framework. The `references/` directory contains detailed specs loaded on demand.
---
## File Index
| File | Lines | Description |
|------|-------|-------------|
| [SKILL.md](../skill/SKILL) | ~500 | **Entry point** — core concepts, directory structure, package.yao, hooks, MCP, models, scripts, testing, CLI Agent, Robot |
| [references/context-api.md](../skill/references/context-api) | ~370 | Full `ctx.*` API — messaging, memory (4 spaces), MCP, agent (A2A), LLM, search, trace, workspace, computer |
| [references/hooks-patterns.md](../skill/references/hooks-patterns) | ~370 | 14 ready-to-use patterns — loading indicators, delegation loops, parallel research, CLI prepare, Robot host |
| [references/runtime-api.md](../skill/references/runtime-api) | ~270 | `@yao/runtime` modules — Process, Exception, Authorized, log, Store, FS, Query, http, agent/testing types |
| [references/testing.md](../skill/references/testing) | ~220 | `yao agent test` CLI flags, assertion methods, test conventions, E2E test inputs |
Append `.md` to any file URL above to get raw Markdown for AI consumption.
---
## How to Use
### For AI Coding Agents
Fetch `SKILL.md` as the entry point. Load `references/` on demand.
**Direct URL (Markdown):**
```
https://yaoapps.com/docs/tutorials/en-us/agent/skill/SKILL.md
```
### In Cursor
Copy to `.cursor/skills/` in your project:
```
.cursor/skills/yao-agent-development/
├── SKILL.md
└── references/
├── context-api.md
├── hooks-patterns.md
├── runtime-api.md
└── testing.md
```
### In Claude Code
Add to `CLAUDE.md`:
```markdown
For Yao Agent development, fetch: https://yaoapps.com/docs/tutorials/en-us/agent/skill/SKILL.md
```
---
## Source Code Fallback
When documentation is unclear, the SKILL instructs agents to clone and search the source:
| Repository | Description |
|------------|-------------|
| [yaoapp/yao](https://github.com/yaoapp/yao) | Go engine — `agent/` directory for hooks, context API, memory, testing |
| [YaoApp/gou](https://github.com/YaoApp/gou) | Go framework — `mcp/`, `model/`, `process/` |
| [YaoApp/cui](https://github.com/YaoApp/cui) | Chat UI — TypeScript frontend components |