/brain:skill

Manage procedural memory — reusable how to do things stored as ~/.brain/_skills/<name>/SKILL.md. Skills use three-level progressive disclosure so they never bloat the context window:

LevelWhenWhat loads
L0Session startEach skill's name + description only (~100 tokens)
L1A matching taskThe full SKILL.md step-by-step instructions
L2A step needs themReferenced resources/ (templates, scripts)

Usage

/brain:skill [list|show|add|use|remove|export] [args]

Actions

list

Show the advertised skills (the L0 index):

brain skill list

show

Read a skill's full instructions — do this when a task matches a skill's description or triggers:

brain skill show <name>

add

Add a skill by piping JSON on stdin:

brain skill add <<'EOF'
{
  "name": "structured-code-review",
  "description": "One-paragraph advertised summary used for matching (~100 tokens).",
  "triggers": ["code review", "review PR", "audit changes"],
  "body": "## Steps\n1. ...\n2. ..."
}
EOF

use

Record an outcome after running a skill. Success strengthens it; --failed weakens it. A skill that fails too often demotes itself out of the advertised L0 index:

brain skill use <name>            # succeeded
brain skill use <name> --failed   # produced a bad outcome

remove

brain skill remove <name>

export

Export a skill into the host agent's native format so it becomes directly executable (writes .claude/skills/<name>/SKILL.md or .gemini/... in the current project):

brain skill export <name> [--target claude|gemini]

Guidance

  • Advertise skills with a crisp, matchable description — that single line is all the agent sees at L0, so it must convey when to reach for the skill.
  • Call show only when a task genuinely matches; don't pre-load skills speculatively.
  • Always record the outcome with use (success or --failed) so the strength and demotion feedback loop stays accurate.
info

Skills aren't only hand-authored. During the sleep cycle, Brain crystallizes recurring task-solving patterns from repeated experience into new skills (user-confirmed) — your skill library grows from what the agent actually does.

tip

See Procedural Skills for the full concept, including how progressive disclosure keeps skills out of working memory until they're needed.