Skills are reusable prompt templates that define multi-step workflows. They're markdown files with YAML frontmatter, loaded from .agent/skills/ or ~/.config/agent-code/skills/.

Creating a skill

Create a file in .agent/skills/test-and-fix.md:

---
description: Run tests and fix failures
whenToUse: When the user asks to test or fix failing tests
userInvocable: true
---

Run the test suite with the project's test command. If any tests fail:

1. Read the failing test file
2. Read the source code being tested
3. Identify the root cause
4. Fix the issue
5. Re-run tests to verify

Repeat until all tests pass. Do not skip or delete failing tests.

Frontmatter options

FieldTypeDescription
descriptionstringWhat this skill does
whenToUsestringHints for the LLM about when to suggest this skill
userInvocablebooleanWhether users can invoke it via /skill-name
disableNonInteractivebooleanDisable in one-shot mode
pathsstring[]File patterns that trigger this skill suggestion

Invoking skills

As a slash command

If userInvocable: true, invoke with the filename (minus .md):

> /test-and-fix

With arguments

Use {{arg}} in the template for argument substitution:

---
description: Review a specific file
userInvocable: true
---

Review {{arg}} for bugs, security issues, and code quality problems.
Focus on edge cases and error handling.
> /review src/auth.rs

Programmatically via the Skill tool

The LLM can invoke skills when it determines one is appropriate:

{
  "name": "Skill",
  "input": {
    "skill": "test-and-fix",
    "args": null
  }
}

Directory skills

For complex skills with supporting files, use a directory:

.agent/skills/
  deploy/
    SKILL.md      ← the skill definition
    checklist.md  ← referenced by the skill

Skill locations

LocationScope
.agent/skills/Project-specific
~/.config/agent-code/skills/Available in all projects

Bundled skills

agent-code ships with 31 built-in skills. These are always available and can be overridden by placing a skill with the same name in your project or user skills directory.

SkillPurpose
/commitCreate well-crafted git commits
/reviewReview diff for bugs and security issues
/testRun tests and fix failures
/explainExplain how code works
/debugDebug errors with root cause analysis
/prCreate pull requests
/refactorRefactor code for quality
/initInitialize project configuration
/security-reviewOWASP-oriented vulnerability scan
/pentestWhite-box penetration test with proof-of-concept gating
/advisorArchitecture and dependency health analysis
/bughunterSystematic bug search
/planStructured implementation planning
/changelogGenerate changelog entries from commit history
/releaseCut a versioned release
/benchmarkRun and compare benchmarks
/coverageMeasure and report test coverage
/migrateApply codebase-wide migrations
/docsGenerate or update documentation
/rememberSave an insight to long-term memory with type/scope prompting
/stuckStep back, re-evaluate, and pick a fresh approach when looping
/simplifyReview changed code for reuse, quality, and efficiency
/batchApply the same change across many files or branches with preview/confirm
/loopRun a prompt or check on a recurring interval until a condition holds
/verifyIndependent verification pass after a non-trivial implementation
/app-builderScaffold a new app and iterate turn by turn (prompt-only in this release)
/skillifyExtract the successful workflow from this session into a reusable skill
/backportCherry-pick a commit or PR onto one or more release branches
/commit-push-prCommit, push, and open a PR in one verified motion
/ultrareviewExhaustive review including callers, callees, tests, and edge cases
/passesMulti-pass planning: goal → approach → implement → verify

Commands

> /skills
Loaded 15 skills:
  commit [invocable] — Create a well-crafted git commit
  review [invocable] — Review code changes for bugs and issues
  test-and-fix [invocable] — Run tests and fix failures
  deploy — Production deployment checklist