← ClaudeAtlas

trimlisted

Reduces an always-on LifeOS context file that is over its byte budget via a human-gated pass — deterministic GC of stale entries first, then semantic merges and relocations — never dropping a directive and committing every change reversibly. USE WHEN /trim, trim the context, trim OPERATIONAL_RULES, this file is too big, reduce a doctrine file, context file over budget, file is NN% full, statusline file went red, prune an always-loaded file, shrink CLAUDE.md or DA_IDENTITY. NOT FOR general code refactoring, trimming video/audio (use Video/AudioEditor), or removing AI writing patterns from prose (use _WRITING).
DorShaer/Husk · ★ 12 · AI & Automation · score 67
Install: claude install-skill DorShaer/Husk
# Trim Reduce an always-on context file back under its byte budget. This is what you DO when the statusline shows a file at `NN% FULL` in red: `/trim <file>` walks the reduction, safest cuts first, never dropping a rule. ## Workflow Routing | Trigger | Workflow | |---------|----------| | `/trim <file>`, "trim OPERATIONAL_RULES", "this file is too big", "file went red", "reduce a doctrine file" | `Workflows/Trim.md` | ## Quick Reference - **Target resolution:** a bare name (`OPERATIONAL_RULES`) resolves against `LIFEOS/TOOLS/context-budgets.json`. No arg → trim whichever file is worst (`bun LIFEOS/TOOLS/BudgetCheck.ts --json` → highest %). - **Order is safest-first:** (1) show state, (2) deterministic GC (zero-risk), (3) semantic trims (human-gated), (4) safety gate, (5) re-check budget. Full steps: `Workflows/Trim.md`. - **Two tools it orchestrates — never reimplement:** `LIFEOS/TOOLS/BudgetCheck.ts` (bytes/cap/%), `LIFEOS/TOOLS/ProposalGC.ts` (removes superseded/duplicate/absorbed entries). - **Three semantic moves:** MERGE overlapping rules, TIGHTEN verbose ones, RELOCATE rarely-used detail to an on-demand reference (leave a stub + pointer). - **The invariant:** a trim never drops a distinct directive. If a merge would, keep the original. ## Gotchas - **USER files commit to the USER_DATA repo, not `~/.claude`.** `LIFEOS/USER/**` (OPERATIONAL_RULES, PROJECTS, the identity files) is a symlink into a separate private repo. Commit with `git -C ~/.config/LIFEOS/USER …`. A