Skip to content
Back to skills

Context Fork Guide

ASecurity

Use when creating or modifying skills that do heavy research, search, or multi-tool work. Adds context:fork to isolate skill execution in a separate context window, keeping the main session clean. Trigger on "keep context clean", "skill is bloating my context", "run this in a separate window", or when building any research/search skill.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
ai-agentsapidatabase

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add m2ai-portfolio/m2ai-skills-pack --skill context-fork-guide --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Context Fork Guide?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Context Fork Guide
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/m2ai-portfolio-context-fork-guide/badge)](https://www.skillsdirectory.com/skills/m2ai-portfolio-context-fork-guide)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: context-fork-guide
description: Use when creating or modifying skills that do heavy research, search, or multi-tool work. Adds context:fork to isolate skill execution in a separate context window, keeping the main session clean. Trigger on "keep context clean", "skill is bloating my context", "run this in a separate window", or when building any research/search skill.
---

# Context Fork Guide — Isolate Heavy Skills

When building skills that perform heavy operations (vault search, codebase exploration,
multi-file analysis, research), add `context: fork` to the frontmatter. This runs the
skill in a separate context window so only the final summary returns to your main session.

## When to Fork

Fork when the skill will:
- Read more than 5 files
- Run multiple searches or grep operations
- Pull external data (web, API, database)
- Perform exploratory work where dead-ends are expected

Do NOT fork when:
- The skill modifies files in the current project (needs main context)
- The skill is conversational (needs prior chat history)
- The output is a single lookup (overhead not worth it)

## How to Apply

Add one line to any SKILL.md frontmatter:

```yaml
---
name: your-skill-name
description: Your skill description
context: fork
---
```

That's it. The skill now runs in an isolated context window.

## The Pattern: Research Skill with Fork

```yaml
---
name: deep-research
description: Search vault, codebase, and web for context on a topic.
context: fork
---
```

```markdown
# Deep Research

1. Search Obsidian vault for notes matching the topic
2. Grep the codebase for related code patterns
3. Web search for current best practices
4. Return a structured summary:
   - Key findings (bullet points)
   - Relevant file paths
   - Recommended next steps

Output ONLY the summary. All intermediate search results stay in the forked context.
```

## Verification

After adding `context: fork` to a skill:
1. Run `/context` to check token count before invoking the skill
2. Invoke the skill
3. Run `/context` again — token increase should be minimal (summary only)
4. Compare with running the same skill without the fork line

## Existing Skills to Consider Forking

Review /home/user/.claude/skills/ for skills that do heavy search or research.
Candidates: any skill that reads multiple files, runs searches, or pulls external data.
Add `context: fork` to their frontmatter and test.

## Source

Extracted from: [3 Claude Code Features You'll Wish You Knew Sooner](https://www.youtube.com/watch?v=iALzJyvgCoM) by Mark Kashef (AI Automation Society), March 19, 2026.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.