fabro/docs/agents/skills.mdx
Bryan Helmkamp 28884ae093 rename Arc to Fabro in all Rust crates, symbols, env vars, and supporting files
- Rename 20 crate directories lib/crates/arc-* → fabro-*
- Update all Cargo.toml: crate names, dep paths, feature flags, bin name
- Rename arc_server module → fabro_server in fabro-llm
- ArcError → FabroError across 30+ files
- ARC_VERSION/ARC_GIT_SHA/ARC_BUILD_DATE → FABRO_* constants
- All use/qualified paths: arc_agent:: → fabro_agent::, etc. (~1500 occurrences)
- Env vars ARC_* → FABRO_* in string literals and shell scripts
- String literals: X-Arc-Demo, arc-bot, arc@local, arc-web, arc-mcp, etc.
- Path strings: .arc/ → .fabro/, arc.toml → fabro.toml, refs/arc/ → refs/fabro/
- arc-api.yaml → fabro-api.yaml (OpenAPI spec)
- skills/arc-create-workflow → fabro-create-workflow
- trycmd fixtures: $ arc → $ fabro
- Inline snapshots (insta) updated
- CI, Docker, install.sh, scripts, CLAUDE.md, AGENTS.md
- TypeScript app: env vars, headers, JWT issuer
- Docs: page slugs, git refs, config paths, sandbox names, repo URLs
- Repo references: brynary/arc → fabro-sh/fabro

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:25:58 -04: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).
Fabro 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
Fabro discovers skills from three convention directories, searched in order:
| Directory | Scope |
|---|---|
| `~/.fabro/skills/` | Global -- applies to all projects |
| `{git_root}/.fabro/skills/` | Project -- checked into the repo |
| `{git_root}/skills/` | Project (alternate location) |
Within each directory, Fabro 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
```
Fabro 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, Fabro 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, Fabro 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, Fabro 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