Trim Context — Development skill for Claude Code
Find and fix sources of Claude Code "token bloat" in a repo — oversized CLAUDE.md (vs the 40k-char limit), bloated memory files, large always-loaded files, and .claude/ cruft — then auto-apply the fix.
How to install Trim Context
Installs to ~/.claude/skills/ksdisch-claude-config-trim-context/SKILL.md
mkdir -p ~/.claude/skills/ksdisch-claude-config-trim-context && curl -fsSL https://raw.githubusercontent.com/ksdisch/claude-config/HEAD/commands/trim-context.md -o ~/.claude/skills/ksdisch-claude-config-trim-context/SKILL.md Restart Claude Code, or start a new session, for it to be picked up.
What Trim Context does
description: Find and fix sources of Claude Code "token bloat" in a repo — oversized CLAUDE.md (vs the 40k-char limit), bloated memory files, large always-loaded files, and .claude/ cruft — then auto-apply the fixes. Optionally sweeps every repo under a parent dir. Run at a repo root, or pass a repo path / repos root. argument-hint: [optional: a repo path, or a parent dir like ~/Projects to sweep all repos under it] allowed-tools: Bash, Read, Edit, Glob, Grep
Target (optional): $ARGUMEN
Alternatives in Development
- Om Tidy — Self-maintenance pass — acts on every hygiene flag: archives completed work, groups loose clusters, splits ove 4.6k ★
- Flow Parallel — Decompose and execute large changes, migrations, or multi-issue fixes in parallel with quality gates 2.8k ★
- Claude Swap — Switch between multiple Claude Code accounts, with automatic rate-limit rotation, usage dashboard, and paralle 2k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Working Memory
This is your working memory. Auto-loaded every session via CLAUDE.local.md. ~1500 word limit. Only behavior-ch
Init Rules
Scaffold opt-in path-scoped nested CLAUDE.md rule files into the project to lazy-load per-area conventions whi
Always Loaded Diet
Discipline for the files your agent loads every session (CLAUDE.md, MEMORY.md): one nightly writer, measured b
Knowledge Base Rules
Always-on. Knowledge-base consultation discipline. Projects declare their knowledge sources in PROJECT.md; age
Jvm Rules
Always-on JVM-language standards. Apply when working with Java, Kotlin, or Scala-on-Spark code. Merged from Ef
Frequency Chart
I have extracted prompts from my Claude Code conversation history. These prompts represent the types of reques
Related Agents
Size Purist
The merciless executioner of bloated files. Use this agent to find oversized files, god classes, mega-componen
Mb Context Doctor
Diagnoses CLAUDE.md and .claude/ bloat. Runs token counts, identifies what's redundant or stale, and proposes
Modularization Analyst
Read-only seam analysis and split design for oversized or mixed-concern files anywhere in the repo. Use BEFORE