Claude Code SKILL.md: Subagent Forking via context:fork with Shell Preprocessing
SKILL.md files with `context: fork` frontmatter execute their content as the task prompt for a fully isolated subagent, preventing context bleed between skill invocations and enabling parallel orchestration without polluting the main conversation. The `!\`command\`` shell preprocessing syntax runs bash commands before the skill content reaches the model, injecting live data—PR diffs, git history, API responses—as concrete facts rather than instructions to fetch data. Combining `context: fork`, `agent: Explore`, and shell injection creates self-contained research skills that accept `$ARGUMENTS`, execute autonomously, and return structured summaries; `disable-model-invocation: true` prevents Claude from triggering side-effect skills autonomously.
Source
↳ Follow the thread