Harness Notes

Skill invocation

Updated 2026-11-22,

On this page

How a skill gets used once it is installed: by the model on its own or by you, and what it brings with it. How skills are found and listed is on the Skill discovery page.

QuestionClaude Codechecked at 2.1.299
The model choosing a skill

Yes. Claude reads the listed description and when_to_use text and calls the Skill tool when your request matches, so put the key use case and trigger phrases first. A skill with paths globs is only picked automatically while Claude works with matching files, and disable-model-invocation: true stops automatic use entirely.

Invoke a skill yourself

Type /skill-name at the start of a message (plugin skills as /plugin-name:skill-name, or the bare name when nothing else uses it). Typing /name later in a message doesn't run it directly but gives Claude permission to invoke it. You can stack up to six skills at the start, as in /write-tests /fix-issue 123.

Non-interactive runs work the same way: claude -p "/skill-name args".

Pass arguments

Yes. Text after the skill name replaces $ARGUMENTS in the body, with $ARGUMENTS[N] or $N for positional arguments (shell-style quoting) and $name for names declared in the arguments frontmatter. If no placeholder receives the input, Claude Code appends ARGUMENTS: <value>; argument-hint shows a hint in autocomplete.

Since 2.1.301, named-argument substitution fills at most 64 declared names and limits each name to 64 characters. This is an invocation limit, not a skill-description or body limit.

What loads when a skill is used

On invocation the rendered SKILL.md body enters the conversation as one message and stays there for later turns. Before that, !command lines and ! blocks run and their output is inlined, and $ARGUMENTS and ${CLAUDE_SKILL_DIR} are substituted. Supporting files such as reference.md are read by Claude only when needed, and bundled scripts are executed rather than loaded.

After auto-compaction, Claude Code re-attaches each invoked skill's most recent content, keeping its first 5,000 tokens within a 25,000-token total.

disableSkillShellExecution: true replaces injected commands with a placeholder for user, project, plugin, and added-directory skills.

Tools, permissions and model

Yes. allowed-tools pre-approves the listed tools (for example Bash(git commit *)) for the turn that invokes the skill, and disallowed-tools removes tools while it is active; both clear when you send your next message. model and effort switch the model or effort level for the rest of that turn.

allowed-tools grants access but doesn't restrict it: other tools stay callable under your normal permission rules.

Workspace trust doesn't gate allowed-tools in repository skills; managed allowManagedPermissionRulesOnly makes Claude Code ignore it.

Since 2.1.304, plugin-only hook policy also withholds allowed-tools from a main-conversation skill whose hooks are excluded.

Run in its own subagent

Yes. Set context: fork and the skill body becomes the prompt for a new subagent of the type named in agent (Explore, Plan, general-purpose by default, or a custom agent from .claude/agents/), which doesn't see your conversation history. It runs in the background by default; set background: false to wait for the result in the same turn.

With context: fork, the model field sets the forked subagent's model.

Background forks run with the narrower background-subagent tool set, and their edits aren't covered by /rewind checkpoints.

Notes and sources

Claude Code, 4 sources
  • The two controls are independent: a skill may be model-only, user-only, available through both channels, or unavailable through both invocation channels.
  • Plugin skills use /plugin-name:skill-name; this namespace is supplied by plugin loading, not by copying standalone skill folders. See docs/research/plugin-skill-namespaces.md.
  • 2.1.304 resends the catalog after compaction; /reload-skills sends only new or changed skills. Plugin reloads in resumed/cloud sessions no longer resend the entire list repeatedly.
  • 2.1.304 limits skill hooks per source to 1,024 hooks and 16,384 matcher characters; under plugin-only hook policy, a main-conversation skill with excluded hooks no longer receives allowed-tools.
  • 2.1.304 fixes Directory-plugin skills picked from Cowork cloud’s slash menu not running as commands. This hosted fix does not establish local filesystem discovery behavior.
  • 2.1.311 publisher fixes completed skills running in subagents being re-executed after cloud/background restart, and VS Code/JetBrains skill/slash-command inputs omitting active-file/selection context. Also fixes --plugin-dir treating a plugin collection as one plugin when its root contains empty .mcp.json.
The model choosing a skill, 1
Invoke a skill yourself, 1
Pass arguments, 2
What loads when a skill is used, 1
Tools, permissions and model, 2
Run in its own subagent, 2