A **Skill** is a folder containing a `SKILL.md` file (instructions + metadata) and optional supporting scripts or resources. Claude loads Skills dynamically and uses their instructions to perform specialized tasks in a consistent, repeatable way.
Skills are Claude's native capability system — the same format used by Anthropic's own Skills library and by the open [Agent Skills](https://agentskills.io) ecosystem.
## What a Skill Looks Like
```
skills/
└── frontend-design/
└── SKILL.md ← instructions + frontmatter metadata
```
`SKILL.md` has a YAML frontmatter header followed by instructions in plain Markdown:
```markdown
---
name: frontend-design
description: Create distinctive, production-grade frontend interfaces.
---
This skill guides creation of frontend interfaces...
## Design Thinking
Before coding, understand the context and commit to a bold aesthetic direction...
```
When Claude sees a task that matches a Skill's description, it reads the `SKILL.md` and follows its instructions, giving it specialized knowledge and consistent behavior for that task.
## How Skills Reach the Container
If your assistant directory contains a `skills/` folder, the framework copies it into the container automatically during `Runner.Prepare` — before the Create Hook runs. No `prepare` step in `sandbox.yao` is needed.
```
assistants/my-agent/
├── sandbox.yao
├── skills/ ← detected automatically, copied by the framework
│ ├── my-skill/
│ │ └── SKILL.md
│ └── another-skill/
└── src/
└── index.ts
```
Inside the container, Skills land at:
```
{work_dir}/.yao/assistants/{assistant_id}/skills/
```
The environment variable `CTX_SKILLS_DIR` is set automatically to this path, so Skills can reference their own location without hardcoded paths.
## Using Community Skills
The [skills](https://github.com/anthropics/skills) repository (Anthropic) and the [Agent Skills](https://agentskills.io) ecosystem provide ready-made Skills for common tasks.
To use a community Skill, copy its folder into your `skills/` directory:
```bash
# Clone the skills repo
git clone https://github.com/anthropics/skills
# Copy a skill into your assistant
cp -r skills/skills/frontend-design assistants/my-agent/skills/
```
Your directory becomes:
```
assistants/my-agent/
└── skills/
└── frontend-design/
└── SKILL.md
```
The framework copies it to the container on the next request.
## Creating Your Own Skills
Create a `skills/` directory in your assistant folder. Each subfolder is one Skill.
**Minimal Skill:**
```
skills/
└── code-review/
└── SKILL.md
```
```markdown
---
name: code-review
description: Review code for bugs, security issues, and style problems. Use when asked to review, audit, or check code.
---
Review the provided code carefully.
## What to check
- **Correctness**: Logic errors, off-by-one, null handling
- **Security**: Injection, auth bypass, data exposure
- **Style**: Naming, structure, readability
## Output format
Provide a structured report with sections: Summary, Issues (with severity), Suggestions.
```
**Skill with supporting scripts:**
```
skills/
└── typescript-test/
├── SKILL.md
└── scripts/
└── run-tests.sh
```
Reference the script from `SKILL.md` using `$CTX_SKILLS_DIR`:
```markdown
---
name: typescript-test
description: Run TypeScript tests and report results.
---
Run tests using the provided script:
```bash
$CTX_SKILLS_DIR/typescript-test/scripts/run-tests.sh
```
```
## How the Automatic Copy Works
When the framework detects a `skills/` directory in your assistant folder, it resolves the absolute path and passes it to `Runner.Prepare` as `SkillsDir`. The runner then calls `workspace.Copy` to transfer the folder before any user-defined `prepare` steps run.
The destination inside the container is:
- **With assistant ID** (normal): `{work_dir}/.yao/assistants/{id}/skills/`
- **Without assistant ID**: `{work_dir}/.claude/skills/`
You do not need to add anything to `sandbox.yao` for this to work. Simply keep your Skills in `assistants/my-agent/skills/`.
## What's Next
Skills give Claude knowledge. The Workspace API gives Hooks control over what Claude reads and writes.
→ **[Workspace API](./workspace)**