# Template: Forked Context Skill

Use this template when creating a skill that runs in an isolated subagent context. Best for research, exploration, or tasks that need a clean context.

## Generated SKILL.md format:

```yaml
---
name: {{SKILL_NAME}}
description: |
  {{DESCRIPTION}}
{{#if ARGUMENT_HINT}}
argument-hint: "{{ARGUMENT_HINT}}"
{{/if}}
context: fork
agent: {{AGENT_TYPE}}
allowed-tools: "{{ALLOWED_TOOLS}}"
{{#if DISABLE_MODEL_INVOCATION}}
disable-model-invocation: true
{{/if}}
{{#if MODEL}}
model: {{MODEL}}
{{/if}}
---

<objective>
{{OBJECTIVE}}

**Note:** This skill runs in an isolated context. Use allowed tools directly - do NOT launch Task agents.
</objective>

<quick_start>

` ` `bash
/{{SKILL_NAME}} {{EXAMPLE_ARGS_1}}
/{{SKILL_NAME}} {{EXAMPLE_ARGS_2}}
` ` `

</quick_start>

## Task
{{TASK_DESCRIPTION}}: $ARGUMENTS

<workflow>

## 1. Parse Input
- Extract key information from the input
- Identify scope and targets

## 2. {{MAIN_PHASE}}
{{MAIN_PHASE_INSTRUCTIONS}}

## 3. Report Results
- Provide comprehensive answer
- Reference file paths and line numbers
- Include relevant code examples

</workflow>

<execution_rules>
- **PARALLEL SEARCH**: Run independent searches simultaneously
- **CITE SOURCES**: Always reference file paths and line numbers
- **STAY FOCUSED**: Only explore what is needed
- **NO TASK AGENTS**: Use allowed tools directly (context is already forked)
- {{RULE_1}}
</execution_rules>

<priority>
{{PRIORITY_STATEMENT}}
</priority>
```

## Agent Types:
| Agent | Tools | Best for |
|-------|-------|----------|
| `Explore` | Read, Grep, Glob | Fast codebase search |
| `Plan` | Read, Grep, Glob | Research and design |
| `general-purpose` | All tools | Complex tasks |

## Notes:
- Forked skills run in isolated context (separate conversation)
- Use `allowed-tools` to limit tool access
- $ARGUMENTS passes user input to the forked context
- Do NOT use progressive step loading with forked skills
- Best for: code search, documentation lookup, research, analysis
