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

context-hygiene

Skill0 starsChanged 7 months agoMITView on GitHub

Reference for Claude Code context management. Use /by-the-way for side questions, /fork for path exploration, and context:fork in skills for isolated execution. Trigger on "context is getting large", "session feels slow", "Claude forgot what we were doing", "how do I manage context".

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use these proactively — context bloat is gradual and invisible until quality degrades.

    line 9
  2. Distinctive:

    When you want to try a different approach without risking your current progress:

    line 26
  3. Very specific:

    Add context: fork to any SKILL.md frontmatter to run heavy skills in an isolated context window.

    line 40

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “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 Hygiene — 3 Shields

Three techniques for keeping Claude Code sessions focused and performant. Use these proactively — context bloat is gradual and invisible until quality degrades.

Shield 1: /by-the-way (Side Questions)

For quick lookups that don't deserve main context space:

  • "What was that Calendly link?"
  • "How many slides in the last deck?"
  • "What's the standard meeting length?"

Usage: Type /by-the-way then your question. Answer returns without polluting the main conversation thread.

Best for: Static data retrieval, FAQ-style questions, quick lookups from CLAUDE.md or project files.

Shield 2: /fork (Path Exploration)

When you want to try a different approach without risking your current progress:

  • "Let me try a completely different design"
  • "What if we used a different tech stack?"
  • "Create version 2 from scratch"

Usage: Type /fork — creates a new conversation branch with full history. Returns a resume command to get back to the original conversation.

Best for: A/B testing approaches, exploring risky changes, version comparison.

Pro tip: Run multiple forks in parallel terminal sessions for simultaneous exploration.

Shield 3: context: fork (Skill Isolation)

Add context: fork to any SKILL.md frontmatter to run heavy skills in an isolated context window. See the context-fork-guide skill for full details.

When Context Gets Large

Signs your context is bloated:

  • Slower responses
  • Claude "forgets" earlier decisions
  • Suggestions become less relevant

Recovery:

  1. /fork to start fresh with history preserved
  2. /compact to summarize and compress context
  3. For future sessions: apply context: fork to heavy skills proactively

Context Budget Rule of Thumb

  • Light session (single file edits, Q&A): 50K-100K tokens, no shields needed
  • Medium session (multi-file feature work): 100K-300K tokens, use /by-the-way for side queries
  • Heavy session (research + build): 300K+, fork skills and /fork for exploration branches

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.