Skills
Reusable instructions, procedures, and optional scripts — packaged in a folder, loaded on demand. The most flexible way to extend a session. If you’ve called a saved procedure “a routine,” this is what you meant — not the cloud Routines feature.
Analogy โ a recipe card in a binder. Its title is always visible on the spine (cheap), but you only pull the full card when you’re cooking that dish. The model does the cooking with tools it already has — the card just tells it how.
Mechanism โ progressive disclosure
A skill is a directory with a SKILL.md (YAML frontmatter + markdown body). The folder name becomes
the /command. The design principle is progressive disclosure:
name + description
the body
scripts / reference files
Key frontmatter & who can invoke
description (drives auto-invocation), allowed-tools (pre-approve tools while active),
disable-model-invocation, user-invocable, context: fork + agent
(run in a subagent), model, effort, paths (glob-gated).
- Both (default): you type
/nameOR Claude auto-loads by description. - User-only (
disable-model-invocation: true): for side-effecting actions like/deploy. - Model-only (
user-invocable: false): passive background knowledge.
Dynamic context: !`cmd` runs a shell command before Claude sees the body and inlines the
output. Substitutions: $ARGUMENTS, ${CLAUDE_SKILL_DIR}, ${CLAUDE_SESSION_ID}.
When to reach for it
/command shared with the team via the repo.When not to
Best practices
description with the use case + trigger keywords — a weak description means the skill never fires.SKILL.md under ~500 lines; push API specs/examples into referenced files (progressive disclosure).disable-model-invocation: true for anything with side effects (deploy, commit, send).${CLAUDE_SKILL_DIR} so paths resolve at any scope.allowed-tools grants permission silently while the skill is active, and the !`...`
shell injection runs arbitrary commands. Review project skills before trusting a repo. Org-wide kill switch:
"disableSkillShellExecution": true.