agentleFS
m2ai-mcp-serversm2ai-mcp-servers/claude-skills/skills/context-fork-guide/SKILL.md

context-fork-guide

Skill0 starsChanged 7 months agoMITView on GitHub

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.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When building skills that perform heavy operations (vault search, codebase exploration, multi-file analysis, research), add context: fork …

    line 8
  2. Distinctive:

    Read more than 5 files

    line 15
  3. Distinctive:

    Run multiple searches or grep operations

    line 16
  4. Distinctive:

    Do NOT fork when:

    line 20
  5. Very specific:

    Add one line to any SKILL.md frontmatter:

    line 27
  6. Very specific:

    After adding context: fork to a skill:

    line 65
  7. Very specific:

    Run /context to check token count before invoking the skill

    line 66
  8. Very specific:

    Run /context again — token increase should be minimal (summary only)

    line 68
  9. Very specific:

    Add context: fork to their frontmatter and test.

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

---
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

---
name: deep-research
description: Search vault, codebase, and web for context on a topic.
context: fork
---
# 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/apexaipc/.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 by Mark Kashef (AI Automation Society), March 19, 2026.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.