Claude Clean Context — Security skill for Claude Code
Keep Claude Code's always-loaded context lean: deterministic memory guard-rail distiller + skills audit.
How to install Claude Clean Context
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open mohan-n-swamy/claude-clean-context and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Clean Context does
Keep Claude Code's always-loaded context lean: deterministic memory guard-rail distiller + skills audit. Never deletes; dry-run default.
Alternatives in Security
- Octoboss Clean Contexts — You are the Octoboss — a cross-tentacle orchestrator 1.4k ★
- Imcodes — The IM for agents 960 ★
- Data Viz Audit — Audit a data visualization for chart type selection, accessible color palette, annotations, and anti-patterns 309 ★
README
claude-clean-context
[](https://github.com/mohan-n-swamy/claude-clean-context/actions/workflows/ci.yml)

Keep Claude Code's always-loaded context lean by demoting stale memory pointers and auditing skill descriptions.
This repo gives Claude Code users a small, deterministic toolkit for cleaning the context that loads before every prompt. It focuses on the two movable layers that tend to grow over time: auto-memory indexes and skill descriptions.

*A real `memory-distill.py` dry-run on the bundled example: 15 pointers in, 6 out. Dry-run by default — it shows exactly why each pointer would be demoted and writes nothing.*
The Problem
Claude Code starts each session with standing context already loaded. Some of that context is useful: durable rules, corrections, and project-specific guard rails. Some of it quietly turns into stale status: old session snapshots, shipped work notes, and skills that are no longer relevant to the current project.
That costs tokens and dilutes signal. The more stale context is always present, the easier it is for live rules to get crowded out. See [docs/the-problem.md](docs/the-problem.md) for the full explanation.
The Principle
A thing earns standing context ONLY if it must be present before you know you need it. Everything else loads on demand.
Memory should hold guard rails, not status logs. Skills should stay eager only when the current project plausib
Related Skills
Gaia Audit
Audit memory, wiki, and auto-loaded files for duplication, conflicting instructions, and stale content. The de
Cleanup Docs
Audit and clean up a repo's Claude documentation — measure the always-on tier first (CLAUDE.md + nested + .cla
Session Audit
Self-audit pass over CLAUDE.md rules and memory files. Surfaces stale rules, undocumented workarounds, and con
Repo Doctor
Audit a repo's agent docs — AGENTS.md/CLAUDE.md topology, always-loaded token cost, CodeMap freshness and line
Worktree Janitor
Audit and clean up Claude Code worktrees in the current project. Lists every worktree with status, classifies
Close Gold Gap
Emit the deterministic remediation recipe for one gold-audit gap — scaffold/test/config/process, never a fake
Related Agents
Review Workflow Context Budget
Reviews workflow machinery for context-window budget on three axes: always-loaded surface, load-on-demand disc
Branch Janitor
Post-merge cleanup agent — after the human confirms a PR/branch merge, removes stale agent worktrees, deletes
Lesson Distiller
Sole owner of superhuman's durable knowledge base. Seed mode authors a repo architecture dossier grounded in a