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 ★
- Agent Skills Guard — 一款提供Agent Skills安全扫描和可视化管理的桌面应用 A desktop application that provides security scanning and visual management fo 389 ★
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
Knowledge Audit
Audit CLAUDE.md, .claude/rules and knowledge/ against the 3-tier budget; propose moves to keep always-loaded c
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
Gaia Codify
Drafts a guard (deterministic check, skill, or path-scoped rule) for a recurring code-audit finding class, wit
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
Related Agents
Review Workflow Context Budget
Reviews workflow machinery for context-window budget on three axes: always-loaded surface, load-on-demand disc
Context Architect
LLM context-consumption and agent-memory architecture expert for the meta-system. Covers how always-loaded rul
Sdlc Coder
Drives strict TDD (Red→Green→Refactor) implementation of one story file, in the target repository. Always load