# Trim

Shrinks an always-on LifeOS context file through a human-gated pass: deterministic GC...

- Repository: https://github.com/danielmiessler/LifeOS (19669 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-28
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add danielmiessler/LifeOS --skill Trim -g -a claude-code -y`
Codex: `npx skills add danielmiessler/LifeOS --skill Trim -g -a codex -y`
Cursor: `npx skills add danielmiessler/LifeOS --skill Trim -g -a cursor -y`
Gemini CLI: `npx skills add danielmiessler/LifeOS --skill Trim -g -a gemini-cli -y`

## Description

Shrinks an always-on LifeOS context file through a human-gated pass: deterministic GC of stale entries, then semantic merges and relocations, never dropping a directive. USE WHEN /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. NOT FOR code refactoring, trimming audio or video media (AudioEditor for audio), removing AI patterns from prose.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Trim

Shrink an always-on context file that has gotten too big. `/trim <file>` walks the reduction, safest cuts first, never dropping a rule.

## 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

The rest: https://github.com/danielmiessler/LifeOS/blob/HEAD/LifeOS/install/skills/Trim/SKILL.md
