# Skills

Skills implement progressive disclosure for reusable workflows.

The runtime keeps skill metadata cheap and always available, then loads full skill content only when a skill is invoked.

## Core Model

- `SkillIndex`: lightweight metadata used for discovery and prompt summaries
- `SkillSpec`: the fully loaded skill with rendered content and invocation settings
- `SkillRuntime`: runtime that resolves inline or forked skill execution
- `SkillTool`: tool surface that dispatches to `SkillRuntime`

## Where Skills Come From

- project-level `.claude/skills/`
- user-level `~/.claude/skills/`
- plugin-provided skill directories
- in-memory skill definitions registered programmatically

## Supported Skill Behavior

- slash-command invocation
- trigger-based discovery
- model-invocable or manual-only skills
- tool restrictions through `allowed-tools`
- model override through `model`
- inline execution for prompt-scoped workflows
- forked execution through `context: fork`

## Important Frontmatter Fields

- `name`
- `description`
- `argument-hint`
- `disable-model-invocation`
- `allowed-tools`
- `model`
- `context`
- `agent`

## Execution Semantics

### Inline Skills

Inline skills load full content on invocation and return rendered instructions back into the main conversation flow.

Use inline skills for:

- reference workflows
- project conventions
- guided code review or explanation playbooks

### Forked Skills

If `context: fork` is set, the runtime treats the skill as a delegated task and runs it in a forked agent context.

Use forked skills for:

- long-running research
- isolated review or audit work
- workflow steps that should not consume the main conversation context

## Manual-Only Skills

Set `disable-model-invocation: true` when a skill should stay out of model-driven
summaries, trigger matching, and semantic discovery, but still remain available
to explicit `/skill-name` invocation.

In the core agent runtime this means:

- the skill is omitted from model-visible summaries
- trigger-based discovery will not select it
- `Skill` tool calls generated by the model are rejected
- explicit slash commands are routed before the first model request

For SDK consumers using the low-level runtime directly:

- `SkillRuntime::execute()` and `SkillTool` enforce manual-only blocking
- `SkillRuntime::execute_by_name()` is invoked for trusted explicit routing (policy is checked by the caller)

## Example

```markdown
---
name: deploy
description: Deploy the application to production
disable-model-invocation: true
allowed-tools:
  - Bash
context: fork
agent: Plan
---

Deploy $ARGUMENTS to production.
```

## Related Guides

- `memory-system.md`
- `subagents.md`
- `tools.md`
