# Configuring Skills URL: https://stevekinney.com/courses/agentic-engineering-playbook/skill-configuration Canonical: https://stevekinney.com/courses/agentic-engineering-playbook/skill-configuration Author: Steve Kinney Language: en-US Modified: 2026-12-03T19:45:07.000Z Description: Frontmatter fields, invocation controls, and how context: fork really works, plus the skill anti-patterns that silently waste tokens or break /rewind. Course: Agentic Engineering Playbook Course URL: https://stevekinney.com/courses/agentic-engineering-playbook --- Most skill problems aren't about what the skill says. They're about when it loads, who can trigger it, and what it's allowed to do once it runs. All of that lives in a few lines of metadata. This lesson assumes you've read [Skills](). ## Frontmatter Your `SKILL.md` starts with a block of YAML (a simple key-value format) between two `---` lines, called _frontmatter_. The fields come in three groups: the first two are the open Agent Skills standard's, and the third is Claude Code's own. ### Required - `name`: 1–64 characters of lowercase letters, numbers, and hyphens, matching the directory name, with no leading, trailing, or doubled hyphens. That's the open standard's rule. Claude Code itself is looser: it treats every field as optional and falls back to the directory name. Follow the standard anyway if the skill needs to work anywhere else. - `description`: 1–1,024 characters stating the capability and the activation context. The agent reads this to decide whether to use the skill, so it carries most of the weight. ### Optional - `license`: A license identifier or reference. - `compatibility`: 1–500 characters describing environment requirements the body assumes. - `metadata`: A string-to-string map. A version here is a record, not a dependency resolver; nothing checks it. - `allowed-tools`: Experimental in the open standard, so support depends on the host. Claude Code reads it as pre-approval: the tools you list (reading a file, running a shell command) don't prompt you during the _turn_ that invokes the skill, meaning the agent's response up until it waits for your next message. It only grants, never restricts, and it can't override a deny rule. Workspace trust doesn't gate it, so an automatically invoked repository skill can preapprove commands even in `claude -p` in an untrusted clone. Review repository skills and their grants before running there. Organizations can set `allowManagedPermissionRulesOnly` in managed settings (v2.1.282+) to ignore project and personal skill grants; see the [skill permission reference](https://code.claude.com/docs/en/skills#pre-approve-tools-for-a-skill). ### Claude Code-specific Other tools that read the open standard may ignore these extensions. - `context: fork`: The body becomes the task for a fresh subagent (a helper agent with its own empty context). Since v2.1.218 it runs in the background by default: you keep working and the result arrives later. More on this below. - `agent: `: Gives the fork that agent type's prompt, tools, and model. That can be a built-in type like `Explore` (a read-only search agent) or `Plan`, or one of your own [agent definitions](). It does nothing without `context: fork`. No agent means `general-purpose` with every tool. - `background`: Only applies with `context: fork`. It defaults to `true`; set it to `false` to wait for the fork's result in the turn that invoked the skill. Background edits land _outside_ `/rewind` checkpoints (`/rewind` rolls the conversation, and optionally your files, back to an earlier point). - `model` and `effort`: Override the model or reasoning effort. With a fork, they apply to the fork. Without one, they apply to your main conversation for the rest of that turn, and `model` only kicks in when _you_ run the skill with `/skill-name`. When the agent invokes it, the session keeps its model. - `arguments`: Names the inputs the skill accepts. In the body, `$ARGUMENTS` is everything typed after the skill name, `$0` is the first argument and `$1` the second, and `$name` is a named input. - `argument-hint`: The placeholder text autocomplete shows, like `[version]`. - `disallowed-tools`: Removes tools only while the skill is active, so pair it with a permission rule (a setting that allows or denies specific tool calls) when a tool must never run. - `hooks`: Registers [hooks]() (scripts that run automatically at set points) when the skill is invoked. They _stay_ registered for the session unless the entry sets `once: true`, which removes the hook after its first successful run. A run that fails, blocks, or times out leaves it in place. ## Configuring invocation By default, both you and the agent can invoke a skill: you type `/skill-name`, and the agent uses the built-in `Skill` tool. Two fields narrow that: - `disable-model-invocation: true`: The skill runs _only_ when you type its slash command. Use it for anything expensive or side-effectful, like a release pipeline. It also can't be preloaded into [subagents]() or run when a [session-scoped scheduled task](https://code.claude.com/docs/en/scheduled-tasks) like `/loop` fires with the skill as its prompt. The skill reaches the agent as plain text instead of executing. The Codex equivalent, in `agents/openai.yaml`, is `policy.allow_implicit_invocation: false`. - `user-invocable: false`: The opposite. _Only_ the agent can load the skill, which suits background knowledge that shouldn't clutter your slash-command menu. Scheduled runs have one more gate. Since v2.1.325, scheduled tasks and `/loop` ask before running a skill that declares `allowed-tools` or hooks. Add `Skill(name)` to `permissions.allow` if it needs to run unattended. ## How `context: fork` works The name is misleading. A skill with `context: fork` does not run in a fork of your conversation. Its body becomes the task prompt for a brand-new [subagent]() with an empty _context_ (everything the model can see when it decides its next step). Here's what follows from that: - **The fork doesn't see your conversation.** It sees the skill body and its arguments, and your `CLAUDE.md` (your instruction file) too, unless its agent type is `Explore` or `Plan`, which skip it. Write the body so it stands on its own. - **The body must be a task.** A skill of guidelines like "use these API conventions" returns without meaningful output, because the fork has nothing to do. Invoked with no arguments, a skill that expects some is a fork with no task. - **`agent:` picks the worker.** The default is `general-purpose` with every tool, so a read-only investigation skill pairs well with `agent: Explore`. - **Background forks get fewer tools.** A background fork keeps the core set: reading, searching, editing, shell, web, `Skill`, MCP tools, and `Agent` for spawning its own workers, up to the nesting limit. Most other built-in tools are removed without an error. Set `background: false` if the skill depends on a tool outside that set, or if it writes files you might want to `/rewind`. - **It doesn't fan out.** Invoking a forked skill while an earlier invocation of the same skill is still running makes the harness wait. For parallel copies, use subagents. - **The result comes back summarized.** In the background, the result arrives as a notification that the main agent paraphrases. A fork whose final message _is_ the deliverable can lose detail, so have it write the deliverable to a file. So, when should you fork? Fork a self-contained task that doesn't need your conversation when you want its noise out of your context. _Don't_ fork a skill that orchestrates other work. It needs your request and conversation to make routing decisions, and a fork throws exactly that away. [Skill or subagent?]() goes deeper on the choice. ## Anti-patterns Most of these fail silently, which is what makes them expensive: - **Near-duplicate descriptions**: When skill descriptions overlap, the agent picks between them unpredictably. - **Critical exclusions buried in the body**: The agent decides whether to load a skill from the description alone. Anything that only appears in the body is read too late. - **"Read _all_ of the references"**: Sure, it will listen to you, and load every reference file whether the task needs it or not. But is that what you want? Describe the conditions under which it should read a given reference instead. - **`agent` without `context: fork`**: The field is silently ignored. You almost certainly meant to fork. - **`model` or `effort` on a frequently invoked skill that doesn't fork**: Every invocation can force a cache miss on your main conversation: the provider can't reuse its saved copy and charges full price. `model` does whenever it applies and names a different model than the one your session is on. `effort` does only where changing effort invalidates the cache. See [Prompt Caching and Cost](). - **Arguments declared but never referenced**: If the body never uses `$ARGUMENTS` or a named placeholder, the input is appended to the end of the body, which is probably worse than not having it at all. - **Arguments with no `argument-hint`**: Autocomplete shows the user nothing to type. - **`context: fork` on a file-editing skill without `background: false`**: Background fork edits land outside session checkpoints, so `/rewind` won't undo them. ## Denying access to particular skills You have three levers: - Deny the `Skill` tool to forbid loading _any_ skills. - Deny a specific skill with `Skill(name)`. - Hide a particular skill from the agent everywhere with `disable-model-invocation`. One thing that trips people up: listing skills under a subagent's `skills:` field only _preloads_ them (loads their full text at startup). It doesn't restrict which skills that agent can reach. To fence a subagent off from skills entirely, leave `Skill` out of its `tools` list or add it to `disallowedTools`. For anything narrower, use one of the three levers. Set `disable-model-invocation` on anything with side effects. Fork only what's a task.