Trim
Run LifeOSSkill · 1 workflow

Trim

Shrinks the files your assistant reads every session without losing a rule.

You say
  • this preferences file is too big, trim it Shown in the terminal
  • fold the pile of suggested rules into my rules
  • shrink CLAUDE.md without losing a rule

You getA smaller instructions file, measured before and after, with every rule in it still in force.

Terminal · Trim at work
studio · context · claude Rex 0.4.2 · 8 sessions · 2 need you
context · claude lumen · dev server lazygit attic · claude
8 sessions · 2 need you · 1 stopped
>My preferences file is too big. Fold the old rule suggestions at the bottom and move rules only one skill uses to a reference.
⏺Skill(Trim)
⎿Routed to Trim
⏺Bash(ProposalGC.ts OPERATIONAL_PREFERENCES.md)
⎿6 stale entries removed by the cleanup tool, no judgment needed
⏺Update(OPERATIONAL_PREFERENCES.md)
⎿Suggestions folded, single-skill rules moved to a reference
⏺Bash(Coverage.ts OPERATIONAL_PREFERENCES.md)
⎿42 of 42 rules covered · 21,960 B
◆LIFEOS 4m 05s◆

The preferences file went from 31,240 to 21,960 bytes, 30% smaller, and all 42 rules still hold.

Trim receipt OPERATIONAL_PREFERENCES.md · 31,240 → 21,960 bytes
  1. PASS 6 stale entries removed by the cleanup tool before any judgment edit automatic
  2. PASS Old rule suggestions folded: 28 entries into 4 standing rules your pick
  3. PASS Rules only one skill uses moved to a reference file, linked from the original your pick
  4. PASS Every rule from the original still compels the same behavior 42 of 42
  5. PASS Saved as one commit in the private repo that holds the file 1 commit
9,280 bytes smaller, measured again after the trim · 1 commit
Juno: The single-skill rules now sit in a reference file linked from the original, and the trim is one commit.
⏵⏵ auto mode on (shift+tab to cycle)

An invented run. Sam asks Juno to trim an oversized preferences file, and Trim clears stale entries, applies the two changes he picked and proves every rule survived.

01
Workflow
01
Tool
08
Ways to ask
Not for code refactoring, trimming audio or video media (AudioEditor for audio), removing AI patterns from prose

Inside the Skill

The thinking, frameworks, and architecture that distinguish this skill from a generic version of the same task.

Ideal State

  • The trimmed file is measurably smaller by a re-run wc -c, and every distinct directive from the original still compels the same behavior.
  • Every removal LIFEOS/TOOLS/ProposalGC.ts can make deterministically is made by it rather than by judgment, and every semantic MERGE, TIGHTEN or RELOCATE is one the human picked.
  • The trim lands as its own commit in the repo that actually holds the file.

Intent Routing

Intent Trigger File
Trim /trim <file>, "trim OPERATIONAL_PREFERENCES", "this file is too big", "reduce a doctrine file", "fold the proposal inbox" Intents/Trim.md

Data & Config

Trim needs no Config.md. Everything it reads and writes is named here, with paths relative to the install root (CLAUDE_CONFIG_DIR, default ~/.claude).

  • The always-on set it measures and edits: the system prompt LIFEOS/LIFEOS_SYSTEM_PROMPT.md, CLAUDE.md, every @-import listed at the top of CLAUDE.md (the identity and operational-rules files under LIFEOS/USER/), and the hook-injected memory files LIFEOS/USER/PRINCIPAL/PRINCIPAL_MEMORY.md and LIFEOS/USER/DIGITAL_ASSISTANT/DA_MEMORY.md. The set is read from CLAUDE.md each run, never hardcoded.
  • The two commit repos: files under LIFEOS/USER/** commit to the private USER_DATA repo at ~/.config/LIFEOS/USER (the target of the LIFEOS/USER symlink); every other file commits to the install-root repo ~/.claude on main.

Gotchas

  • USER files commit to the USER_DATA repo, not ~/.claude. The commit tool in the intent's Tool contract follows the LIFEOS/USER symlink and commits there; a ~/.claude commit captures nothing under LIFEOS/USER/ and is a false safety net.
  • The file can change mid-edit. The autonomic memory loop appends proposals to these files while you work. When a Write or Edit reports "modified since read", re-read before writing, because a concurrent correction may have landed; this is how a real deploy-command fix was nearly reverted. Never write from a stale read.
  • Orchestrate ProposalGC, never reimplement it. Its free, zero-risk removals often clear enough that no judgment-call edit is needed.

Examples

User: "/trim OPERATIONAL_PREFERENCES"
→ Trim intent
→ OPERATIONAL_PREFERENCES 40,456 → 28,043 B (−31%). ProposalGC found 0 removable; the human picked
  folding the 40-entry proposal tail and relocating skill-scoped directives to a reference;
  committed alone to USER_DATA.

User: "/trim"
→ Trim intent
→ No arg, so the largest file in the always-on set by `wc -c` is trimmed the same way.

Workflows & Routing · 1

Each workflow is one job the skill runs. The trigger phrases route your request to the right one — this is the skill's routing table.

  1. 01
    Trim Intents/Trim.md

Tools · 1

Deterministic executables the workflows call — the code that does the real work, not prompt scaffolding.

  • Coverage.ts

How to Invoke

Say any of these to your assistant and LifeOS activates the Trim skill automatically:

  • "/trim"
  • "trim the context"
  • "trim OPERATIONAL_PREFERENCES"
  • "this file is too big"
  • "reduce a doctrine file"
  • "prune an always-loaded file"
  • "fold the proposal inbox"
  • "shrink CLAUDE.md or DA_IDENTITY"

Or invoke explicitly:

Skill("Trim")

Want LifeOS to do this for you?

Install LifeOS on your machine — your assistant gets the Trim skill plus 96 others, all hooked into one Life OS.