Skip to content

Frontmatter Cheatsheet

Quick reference for all SKILL.md frontmatter fields.


All Fields

AgentSkills.io Open Standard (Portable)

These fields are defined by the AgentSkills.io open standard. Skills using only these fields remain portable across compatible runtimes.

FieldType/FormatDefaultWhat it doesUse when
namestring, lowercase-hyphens, max 64 charsdirectory nameDisplay name and /name command aliasAlways — set it explicitly to decouple from directory naming
descriptionstring, max 1024 charsfirst paragraph of SKILL.md bodyTells Claude what the skill does and when to invoke itAlways — Claude reads this to decide on auto-invocation
licensestringnoneDeclares the license of the skill contentDistributing or publishing the skill publicly
compatibilitystring, max 500 charsnoneDocuments environment requirements such as OS, runtime, or required toolsSkill requires specific tools, OS, or environment that may not be universally available
metadatakey-value mapnoneArbitrary structured data attached to the skill (version, author, tags, etc.)Tracking version, authorship, or custom tags without polluting the description
allowed-toolsspace-separated string of tool namesnonePre-approves listed tools so they never prompt during the skillSkill needs specific tools and interruptions would break the workflow

Claude Code-Only Fields

These fields are understood by Claude Code but are not part of the AgentSkills.io portable standard. They will be ignored or cause errors in other runtimes.

FieldType/FormatDefaultWhat it doesUse when
when_to_usestringnoneAdditional trigger phrases appended to the description for auto-invocation matchingYou need extra keywords without making the main description verbose
argument-hintstringnoneShort hint shown in the autocomplete UI next to the skill nameSkill accepts arguments and you want users to know what to type
argumentsstring or list of stringsnoneNamed argument positions mapped to $name variables in the skill bodySkill takes multiple distinct arguments and named references are clearer than index-based
disable-model-invocationbooleanfalseHides the skill from Claude entirely; only a user can invoke it with /nameSide-effect workflows (deploy, send, delete) where you must control timing
user-invocablebooleantrueWhen set to false, hides the skill from the / menuBackground knowledge skills that Claude should use but users never invoke directly
modelstringinherits session modelOverrides the model used for this skill’s execution turnDeep analysis that needs a larger model (opus) or a trivial task that can use a cheaper one (haiku)
effortstring: low, medium, high, xhigh, or maxinherits session effortOverrides the reasoning effort for this skill’s turnTasks that need ultrathink-level reasoning or simple generation that does not need extended thinking
contextstring: forknoneRuns the skill in an isolated subagent so it does not pollute the main contextLong or exploratory skills whose intermediate steps should not persist in the main conversation
agentstringgeneral-purposeSpecifies the subagent type when context: fork is setYou want an Explore-style read-only subagent or another specific agent persona
hooksmapnoneLifecycle hooks scoped to this skill (pre-tool, post-tool, on-exit, etc.)Auto-formatting output, validating results, or sending notifications on specific tool use
pathslist of glob patternsnoneAuto-activates or restricts the skill to sessions involving matching filesLanguage-specific or domain-specific skills that should only surface for relevant files
shellstring: bash or powershellbashOverrides the shell used for !cmd“ inline execution blocksWindows-only skills that use PowerShell commands

Invocation Mode Matrix

Controls who can invoke the skill and what appears in context.

FrontmatterUser /nameClaude auto-invokesDescription in contextWhen full body loads
(default)YesYesYesWhen invoked by either user or Claude
disable-model-invocation: trueYesNoNoWhen user invokes with /name
user-invocable: falseNoYesYesWhen Claude invokes automatically
Both disable-model-invocation: true AND user-invocable: falseNoNoNoNever — skill is permanently inaccessible

String Substitution Quick Reference

SyntaxExpands to
$ARGUMENTSFull argument string exactly as typed after the skill name
$ARGUMENTS[0] or $0First whitespace-split argument (0-indexed, respects shell quoting)
$ARGUMENTS[1] or $1Second argument
$nameNamed argument from position defined in arguments frontmatter
${CLAUDE_SESSION_ID}UUID identifying the current Claude Code session
${CLAUDE_EFFORT}Current effort level string: low, medium, high, xhigh, or max
${CLAUDE_SKILL_DIR}Absolute path to the directory containing the SKILL.md file

Common Patterns

Pre-flight check — run a shell command inline and include its output in context:

!`git status --short`

Multi-line shell block — run multiple commands as a block:

```!
git fetch origin
git log --oneline origin/main..HEAD
```

Run a bundled script from the skill directory — always use ${CLAUDE_SKILL_DIR} so the path works at any scope:

Bash: python3 ${CLAUDE_SKILL_DIR}/scripts/my_script.py

Skill runs in an isolated subagent to avoid polluting main context:

context: fork
agent: Explore

Subagent preloads a skill so it is available inside the forked context — in the agent definition file, add:

skills: [skill-name]