Learn AI
    navigate Enter open Esc close Open with K or /

    5 min

    Skills — recipes your assistant loads on demand

    A folder of markdown that teaches your CLI a procedure. Auto-triggered by description, model-loaded as needed.

    A skill is a folder of markdown (and optional helper scripts) that teaches your coding CLI a procedure — how to do something. The assistant reads the skill's description on every turn; when your request matches, it pulls the full instructions into context and follows them. Skills are the answer to "I keep explaining the same workflow over and over."

    "clean up worktrees" match description git-prune skill SKILL.md loaded ~/.claude/skills/ (descriptions always in context, bodies loaded on match) git-prune ci-fix deliver issue-to-pr Only the matching skill's full body is loaded — the rest stay as one-line descriptions.

    The mental model

    • A skill lives in a folder: SKILL.md + optional scripts.
    • The frontmatter has a description: — one sentence the model reads on every turn.
    • When your request matches that sentence, the assistant loads the body and follows the procedure.
    • Skills compose: one can call another. Many ship with helper scripts the assistant runs.

    Anatomy of a SKILL.md

    ---
    name: git-prune
    description: Prune merged git worktrees and branches, clean
      remote tracking refs, and pull latest main.
    ---
    
    # Git Prune
    
    When the user asks to clean up worktrees or branches:
    
    1. Run `git worktree list` and identify merged branches.
    2. For each merged worktree: `git worktree remove <path>`.
    3. `git fetch --prune` to drop deleted remote refs.
    4. `git checkout main && git pull --ff-only`.
    
    Never delete unmerged work without confirming.
    

    Skills people actually keep

    git-prune

    triggers when you say "clean up merged worktrees"

    Prunes merged git worktrees and branches, cleans remote tracking refs, pulls latest main.

    ci-fix

    triggers when you paste a failing GitHub Actions URL

    Fetches the logs, finds the root cause, applies the fix, pushes.

    deliver

    triggers when you type /deliver <topic>

    Routes the topic to one of three shipping patterns and runs the full PR loop.

    issue-to-pr

    triggers when you say "implement issue #123"

    Reads the issue, plans a branch, writes the code, opens the PR.

    postgres-patterns

    triggers when you write a SQL migration or tune a query

    Loads schema/index/security best practices into context exactly when SQL appears.

    How skills relate to the other primitives

    PrimitiveShapeHow it triggers
    Slash command Single action you fire by name You type /name
    Agent A persona / sub-assistant You switch to it, or the main agent delegates
    Skill A procedure / recipe / playbook Auto — when your request matches the description
    MCP server A set of tools from the outside world The model calls a tool when it needs the data/action

    When to write your own

    • You've explained the same procedure 3+ times.
    • The right steps depend on a context you keep forgetting to mention (e.g. "we use SQLAlchemy, not Django ORM").
    • The task has a checklist of preconditions or guardrails you want enforced every time.
    • You want a workflow available across every session, every repo, with no copy-paste.
    Anti-pattern. Don't bury one-off knowledge in a skill — that belongs in a project CLAUDE.md or a memory file. Skills earn their slot in the description shelf by being load-bearing across many sessions.
    Where do skills live?
    Personal skills go in ~/.claude/skills/<name>/SKILL.md and follow you across projects. Project-scoped skills live in .claude/skills/ inside the repo, so the whole team gets them. Plugin skills come bundled with a Claude Code plugin (you'll see them prefixed, like design:design-system).
    Doesn't loading a bunch of skills bloat the context?
    Only the descriptions sit in context — usually one short line each (think ~20 words). A typical skill body is hundreds of lines, but it's only loaded when its description matches your request. That's how a CLI with a hundred skills installed still starts a turn with a small system prompt.
    Do skills exist outside Claude Code?
    The shape isn't universal yet, but the idea is converging. Cursor calls them rules, aider has a config file, Codex has prompts. The "folder of markdown that auto-loads on match" pattern is strongest in Claude Code today; expect others to follow.
    Can a skill run code?
    Yes — many ship with helper scripts (a scripts/ directory next to SKILL.md). The assistant invokes them with normal tool approval — same Allow/Deny prompt as any other command.