Skills
Skills are reusable instruction sets that Codebuff can load on-demand. They let you define domain-specific knowledge, workflows, and behaviors that the agent can invoke when needed.
Why Use Skills?
- Reusability — Define instructions once, use them across multiple conversations
- On-demand loading — Skills are only loaded when needed, keeping context clean
- Shareable — Store skills globally or per-project, share with your team
- Slash commands — Every skill becomes a
/skill:namecommand you can trigger directly
Creating a Skill
1. Create the skill directory
Skills live in a skills directory inside .agents/ or .claude/:
.agents/skills/my-skill/
2. Create the SKILL.md file
Each skill needs a SKILL.md file with YAML frontmatter:
---name: my-skilldescription: A short description of what this skill does and when to invoke itlicense: MITmetadata:category: development---# My SkillYour skill instructions go here...## KnowledgeBackground information and helpful context goes here.## Instructions1. Step one2. Step two3. Step three
Frontmatter Fields
name(required) — Skill name (1-64 chars, lowercase alphanumeric with hyphens)description(required) — Short description (1-1024 chars) shown when browsing skillsmetadata(optional) — Key-value pairs for additional categorization
Name Validation Rules
Skill names must:
- Be 1-64 characters long
- Use only lowercase letters, numbers, and hyphens
- Not start or end with a hyphen
- Not contain consecutive hyphens
- Match the directory name exactly
Valid: git-release, api-design, review2, deploy-prod
Invalid: Git-Release, my--skill, -skill, skill-
Discovery Locations
Skills are loaded from these locations, in order of priority (later overrides earlier):
~/.claude/skills/— Global (Claude Code compatible)~/.agents/skills/— Global.claude/skills/— Project (Claude Code compatible).agents/skills/— Project (highest priority)
Project skills override global skills with the same name. The .claude/ paths provide compatibility with Claude Code.
Using Skills
Slash Commands
Every skill becomes a slash command. Type /skill: to see available skills:
/skill:git-release
This loads the skill's instructions into the conversation.
Agent Tool Invocation
Codebuff can also load skills automatically via the skill tool when it determines a skill is relevant. The agent sees available skills listed in its tool description and can call:
skill({ name: "my-skill" })
The full SKILL.md content is then loaded into the conversation context.
Example: Git Release Skill
Here's a practical example of a skill for managing releases:
---name: git-releasedescription: Guidelines for creating Git releases with semantic versioningmetadata:category: gitaudience: developers---# Git Release WorkflowUse this skill when creating a new release.## VersioningFollow semantic versioning (semver):- **MAJOR** (1.0.0) — Breaking changes- **MINOR** (0.1.0) — New features, backward compatible- **PATCH** (0.0.1) — Bug fixes, backward compatible## Release Checklist1. Ensure all tests pass2. Update CHANGELOG.md with release notes3. Bump version in package.json4. Create a git tag: `git tag v1.2.3`5. Push with tags: `git push --follow-tags`## Commit Message FormatUse conventional commits:- `feat:` — New feature- `fix:` — Bug fix- `docs:` — Documentation- `chore:` — Maintenance
Example: Code Review Skill
---name: reviewdescription: Code review checklist and guidelinesmetadata:category: quality---# Code Review Guidelines## What to Check1. **Correctness** — Does the code do what it's supposed to?2. **Tests** — Are there adequate tests?3. **Security** — Any potential vulnerabilities?4. **Performance** — Any obvious inefficiencies?5. **Readability** — Is the code clear and well-documented?## Feedback Style- Be constructive and specific- Suggest alternatives, don't just criticize- Acknowledge good patterns
Best Practices
Keep Skills Focused
Each skill should have a single, clear purpose. Instead of one large "development" skill, create separate skills:
git-release— Release workflowapi-design— API design guidelinestesting— Testing conventions
Write Clear Descriptions
The description is what Codebuff sees when deciding whether to load a skill. Make it specific:
Good: Guidelines for creating Git releases with semantic versioning and changelog updates
Bad: Git stuff
Use Metadata for Organization
Metadata helps categorize skills:
metadata:category: deploymentlanguage: typescriptframework: nextjs
Global vs Project Skills
Global skills (~/.agents/skills/):
- Personal workflows
- Cross-project tools
- Your coding preferences
Project skills (.agents/skills/):
- Team conventions
- Project-specific processes
- Codebase-specific knowledge
Troubleshooting
Skill Not Appearing
- Check the directory structure:
project-root/.agents/skills/my-skill/SKILL.md - Verify the name in frontmatter matches the directory name
- Ensure the name follows validation rules (lowercase, hyphens only)
- Restart Codebuff to reload skills
Invalid Frontmatter
Ensure your YAML frontmatter:
- Starts and ends with
--- - Has required
nameanddescriptionfields - Uses valid YAML syntax
---name: my-skilldescription: This is required---