context-hygiene

Manage Claude Code context with three shields to prevent bloat.

4|1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/m2ai-portfolio/m2ai-skills-pack --skill context-hygiene-m2ai-portfolio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-hygiene
Source: https://github.com/m2ai-portfolio/m2ai-skills-pack/tree/main/skills/context-hygiene
Command: npx skills add https://github.com/m2ai-portfolio/m2ai-skills-pack --skill context-hygiene-m2ai-portfolio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Context bloat in Claude Code sessions leads to slower responses, degraded recall, and reduced effectiveness. This skill provides a simple, structured approach to manage and isolate context with three shields that help teams stay focused and performant.

Core Features & Use Cases

  • Shield 1: /by-the-way for quick side-questions and lookups without polluting main context.
  • Shield 2: /fork for path exploration and branching without risking current progress.
  • Shield 3: context: fork to run heavy skills in isolated execution when needed.
  • Use Case: Maintain long-running agent conversations while performing iterative design or debugging tasks without context drift.

Quick Start

Enable context hygiene for this session by using /by-the-way for side questions, /fork to branch exploration, or add context: fork to run heavy skills in isolation.

Frequently Asked Questions about context-hygiene

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent context bloat in Claude Code long-running sessions?

To prevent context bloat in Claude Code, apply context hygiene shields like /by-the-way for side-questions and /fork for path branching to isolate context and preserve session performance.

Can I ask side questions in Claude Code without polluting the main context?

Yes, you can ask side questions without polluting main context by using the /by-the-way shield, which isolates quick lookups and keeps the primary Claude Code conversation focused.

What is the best way to branch path exploration without losing current Claude Code progress?

The best way to branch path exploration without losing progress is using the /fork shield, which allows you to explore alternative paths in Claude Code while isolating the current context.

How do I run heavy skills in isolated execution during a Claude Code session?

Run heavy skills in isolated execution by adding context: fork, which separates resource-intensive operations from the main Claude Code session to prevent degraded recall and slow responses.

Why does Claude Code get slow and lose recall during multi-step tasks?

Claude Code gets slow and loses recall during multi-step tasks due to context bloat, where accumulated conversation data degrades performance; applying context hygiene isolates this data to maintain speed.

When should I apply a context budget guideline in Claude Code?

Apply a context budget guideline in Claude Code when you need to recover performance during long-running conversations, using it alongside isolation shields to manage accumulated context bloat.