fabro/docs/agents/skills.mdx
Bryan Helmkamp 3500d1436b Simplify Skills page, link to Agent Skills spec instead of duplicating
Remove the "Skill file format" and "Creating skills" sections which
duplicated content from the Agent Skills specification. Link to
agentskills.io for the format spec and introduction instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 19:19:29 -05:00

73 lines
3.5 KiB
Text

---
title: "Skills"
description: "Reusable prompt templates that extend agent capabilities"
---
Skills are reusable prompt templates that give agents structured instructions for common tasks -- code review, committing, test writing, refactoring, and more. They are discovered automatically from convention directories, listed in the agent's system prompt, and can be invoked either by the user (with `/skill-name` syntax) or by the agent itself (via the `use_skill` tool).
Arc implements the open [Agent Skills](https://agentskills.io/home) format. Each skill is a directory containing a `SKILL.md` file with YAML frontmatter and Markdown instructions. See the [Agent Skills specification](https://agentskills.io/specification) for the full file format, and [What are skills?](https://agentskills.io/what-are-skills) for an introduction.
## Discovery
Arc discovers skills from three convention directories, searched in order:
| Directory | Scope |
|---|---|
| `~/.arc/skills/` | Global -- applies to all projects |
| `{git_root}/.arc/skills/` | Project -- checked into the repo |
| `{git_root}/skills/` | Project (alternate location) |
Within each directory, Arc looks for `*/SKILL.md` files (one level of nesting).
When the same skill name appears in multiple directories, **later directories override earlier ones**. This means project-level skills take precedence over global skills, letting you customize behavior per-repo.
<Note>
You can override the default directories by setting `skill_dirs` in the session configuration. When set, only the specified directories are searched.
</Note>
## Invocation
Skills can be invoked in two ways.
### Slash syntax (user input)
Users can reference a skill with a `/` prefix in their input:
```
/commit fix the off-by-one error in pagination
```
Arc detects the `/commit` token, finds the matching skill, and expands the input by replacing the skill reference with the full template. The remaining text (`fix the off-by-one error in pagination`) is substituted into the `{{user_input}}` placeholder.
Rules for slash syntax:
- The `/` must be preceded by whitespace or be at the start of the input
- The skill name must be followed by whitespace or end of input
- Only one skill reference per input is allowed
- File paths like `/usr/bin/bash` are not matched (the character after `/` must be a lowercase letter, and the name cannot contain `/`)
### use_skill tool (agent-initiated)
When skills are available, Arc adds a `use_skill` tool to the agent's toolset and lists the available skills in the system prompt:
```
# Available Skills
When the user's request matches a skill below, call the `use_skill` tool
to load its instructions, then follow them.
- `commit`: Create a git commit following best practices
- `review`: Review code changes for issues and improvements
```
The agent can call `use_skill` with a skill name to load the template, then follow the instructions:
| Parameter | Type | Required | Description |
|---|---|---|---|
| `skill_name` | string | yes | Name of the skill to load (without the `/` prefix) |
Returns the skill's template text.
## Lifecycle
1. **Discovery** -- On session startup, Arc scans the skill directories and parses all valid `SKILL.md` files
2. **Registration** -- If any skills are found, the `use_skill` tool is registered and the skill list is added to the system prompt
3. **Expansion** -- When user input contains a `/skill-name` reference, Arc expands it before sending to the LLM
4. **Tool use** -- The agent can also call `use_skill` at any time to load a skill's template mid-conversation