Stackmark › Prompts

Run skills in isolated context with `context: fork`

Adding `context: fork` and `agent: Explore` to a skill's frontmatter runs it in a subagent — your main thread only sees the final summary.

  • Type: Prompt
  • Tags: Coding Agent Hacks, Intermediate, Claude Code
  • Updated: 2026-10-01

Prompt

Adding `context: fork` and `agent: Explore` to a skill's frontmatter runs it in a subagent — your main thread only sees the final summary. Without isolation, every tool call inside a skill lands in your main context window. A research skill that reads 20 files clutters the conversation. Two lines of YAML frontmatter — `context: fork` and `agent` — push the skill into a subagent with its own context. `agent: Explore` is read-only and optimized for codebase navigation; you can also use Plan, general-purpose, or any custom agent. Implementation example: # .claude/skills/deep-research/SKILL.md --- name: deep-research description: Research a topic thoroughly context: fork agent: Explore --- Research $ARGUMENTS thoroughly: 1. Find relevant files using Glob and Grep 2. Read and analyze the code 3. Summarize findings with specific file references

More prompts

Privacy · Terms · llms.txt