Agent skill

Trim

by daseinlabs in daseinlabs/parsec

Stage a det+dir compaction of this session — a deterministic needed-set trim of the transcript plus a standing-directives block, injected automatically after /clear.

MITAuto-check passed

Install Trim

skills CLI
$ npx skills add daseinlabs/parsec --skill trim -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install daseinlabs/parsec trim --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/daseinlabs/parsec.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/plugin/skills/trim .claude/skills/trim && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
trim
GitHub stars
130
Token cost
~751 tokens
SKILL.md length
397 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Stage a det+dir compaction of this session — a deterministic needed-set trim of the transcript plus a standing-directives block, injected automatically after /clear.

  • Works in 5 steps: Run "${CLAUDE_PLUGIN_ROOT}/bin/parsec"… → Now write the STANDING DIRECTIVES block… → Stage the directives (heredoc keeps the… → …
  • Context is nearly full and the user wants a better /compact
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Trim is an agent skill from daseinlabs/parsec. Stage a det+dir compaction of this session — a deterministic needed-set trim of the transcript plus a standing-directives block, injected automatically after /clear. Use when context is nearly full and the user wants a better /compact.

Its SKILL.md is about 750 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Agent runtime optimization with Small Language Models. The licence is MIT.

When your agent uses it

  • Context is nearly full and the user wants a better /compact

Example prompts

  • “/trim”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Run "${CLAUDE_PLUGIN_ROOT}/bin/parsec" trim --json.
  2. Now write the STANDING DIRECTIVES block from your own in-context history.
  3. Stage the directives (heredoc keeps the artifact on disk complete before
  4. When the binary prints ready, tell the user: run /clear now — the next
  5. If step 3 fails for any reason, say so plainly and tell the user the

What it can do on your machine

Read from SKILL.md and the folder at commit e97063c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Trim loads about 751 tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 397 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~751

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from daseinlabs/parsec at commit e97063c, republished under its MIT licence (© daseinlabs). 397 words, ~751 tokens.

Download SKILL.mdSave it as .claude/skills/trim/SKILL.md (or your agent's skills folder).
name
trim
description
Stage a det+dir compaction of this session — a deterministic needed-set trim of the transcript plus a standing-directives block, injected automatically after /clear. Use when context is nearly full and the user wants a better /compact.

Follow these steps in order. Every number you report from step 1 is an ESTIMATE (chars/4) — always say "estimated", never present it as measured.

If the parsec MCP tools trim_stage and trim_finalize are available, use them instead of the shell commands below: trim_stage (optionally with level) replaces step 1 and trim_finalize (directives as the argument) replaces step 3 — no heredoc needed. Everything else is unchanged.

  1. Run "${CLAUDE_PLUGIN_ROOT}/bin/parsec" trim --json.

    • If the user asked for a specific trim aggressiveness, add --level N (1 = low trimming / keep more, 5 = very high). Omit it otherwise — the default (3) is the only measured configuration; the other levels shift what counts as "used later" and are estimates all the way down.
    • Exit code 2 means the session is too short to trim (or no transcript was found) — relay the binary's message plainly and stop.
    • Otherwise present the stats conversationally: kept X of Y chunks, roughly A of B estimated tokens. This is the deterministic trim — the parts of this session that were actually re-read, edited, or used later.
  2. Now write the STANDING DIRECTIVES block from your own in-context history. You are the compaction assistant here; the history is already in your context. Your job is NOT to summarize the work. Extract ONLY the STANDING DIRECTIVES: durable rulings, policies, quantitative floors, model/tool choices, scope decisions, and the north-star — the things the user established that must keep governing behavior AFTER compaction. Exclude one-off task steps and transient state. Output a terse pinned-constraints list, each line an imperative the agent must keep obeying. If a directive was stated with force or repeated, keep its force. Keep the list under roughly 3,000 tokens.

  3. Stage the directives (heredoc keeps the artifact on disk complete before anything else happens):

    "${CLAUDE_PLUGIN_ROOT}/bin/parsec" trim --finalize <<'PARSEC_DIRECTIVES'
    <the directives list>
    PARSEC_DIRECTIVES
  4. When the binary prints ready, tell the user: run /clear now — the next session in this project starts with the trimmed context injected automatically. Mention it expires unused after 30 minutes, and that it fires on /clear (or a fresh start), not on resume.

  5. If step 3 fails for any reason, say so plainly and tell the user the deterministic trim alone is still staged and will be injected without the directives block after /clear (that is the designed fallback, not an error state).

Show full SKILL.md (20 more words)Show less

Never estimate savings the ledger does not show, and never run /clear yourself — the user decides when the session ends.

© daseinlabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packages/plugin/skills/trim of daseinlabs/parsec.

Open the folder on GitHubat commit e97063c

Compare with similar skills

Trim next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Trim compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trim this skilldaseinlabs/parsec130—~751Automated safety check: PassMIT
Strategic Compactaffaan-m/ECC276k1 repos~2.1kAutomated safety check: PassMIT
Strategic Compactaffaan-m/ECC276k2 repos~434Automated safety check: PassMIT
Strategic Compactaffaan-m/ECC276k2 repos~724Automated safety check: PassMIT
Strategic Compactaffaan-m/ECC276k3 repos~943Automated safety check: PassMIT
Compactcatlog22/Claude-Code-Workflow2.1k—~3.2kAutomated safety check: PassMIT

Similar skills

  • Strategic Compact

    affaan-m/ECC

    Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.

    276k GitHub starsUsed in 1 repo~2.1k tokens
    Agent WorkflowsAuto-check passed
  • Strategic Compact

    affaan-m/ECC

    任意の自動コンパクションではなく、タスクフェーズを通じてコンテキストを保持するための論理的な間隔での手動コンパクションを提案します。

    276k GitHub starsUsed in 2 repos~434 tokens
    Auto-check passed
  • Strategic Compact

    affaan-m/ECC

    임의의 자동 컴팩션 대신 논리적 간격에서 수동 컨텍스트 압축을 제안하여 작업 단계를 통해 컨텍스트를 보존합니다.

    276k GitHub starsUsed in 2 repos~724 tokens
    Auto-check passed
  • Strategic Compact

    affaan-m/ECC

    建议在逻辑间隔处手动压缩上下文,以在任务阶段中保留上下文,而非任意的自动压缩。

    276k GitHub starsUsed in 3 repos~943 tokens
    Auto-check passed
  • Compact

    catlog22/Claude-Code-Workflow

    Compact current session memory into structured text for session recovery.

    2.1k GitHub stars~3.2k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Deterministic Design

    sickn33/agentic-awesome-skills

    Render the UI and prove it's balanced + usable: a deterministic layout audit (centroid / optical-center / pixel-oracle balance via explicit math + annotated screenshot) plus a vision-judged Nielsen…

    47k GitHub starsUsed in 1 repo~736 tokens
    Frontend & DesignAuto-check passed

More from daseinlabs/parsec

All 8 skills in this repo
  • Desktop

    daseinlabs/parsec

    Route Claude Desktop's Cowork / Agent-mode traffic through the local parsec proxy so it gets curation and savings too.

    130 GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check passed
  • Login

    daseinlabs/parsec

    Sign in to Parsec so token savings show up in the user's dashboard.

    130 GitHub stars~502 tokensUpdated 3 days ago
    Auto-check passed
  • Setup

    daseinlabs/parsec

    Activate parsec — write the Claude Code routing env (ANTHROPICBASEURL → local proxy), install the savings status line, and start the proxy.

    130 GitHub stars~549 tokensUpdated 3 days ago
    Auto-check passed
  • Proxy

    daseinlabs/parsec

    Restart the local parsec proxy if it was killed mid-session — brings the supervisor back on the routed port so requests stop failing.

    130 GitHub stars~382 tokensUpdated 3 days ago
    Auto-check passed
  • Uninstall

    daseinlabs/parsec

    Cleanly remove parsec from this machine — undo Claude Code routing, stop the local proxy, delete downloaded models and data, then uninstall the plugin itself.

    130 GitHub stars~491 tokensUpdated 3 days ago
    Auto-check passed
  • Savings

    daseinlabs/parsec

    Show measured token savings — re-reads blocked and command loops broken by the parsec no-reread hook, from the local ledger, never estimated.

    130 GitHub stars~273 tokensUpdated 3 days ago
    Auto-check passed

Questions about Trim

What does Trim do?

Stage a det+dir compaction of this session — a deterministic needed-set trim of the transcript plus a standing-directives block, injected automatically after /clear. Trim is an agent skill from daseinlabs/parsec. Stage a det+dir compaction of this session — a deterministic needed-set trim of the transcript plus a standing-directives block, injected automatically after /clear.

When should I use Trim?

Trim fits situations like: context is nearly full and the user wants a better /compact.

How do I install Trim in Claude Code?

Run `npx skills add daseinlabs/parsec --skill trim -a claude-code`. Or copy the skill folder (packages/plugin/skills/trim in daseinlabs/parsec) into .claude/skills/trim in your project. Claude Code loads it when a task matches its description.

How do I install Trim in Codex?

Run `npx skills add daseinlabs/parsec --skill trim -a codex`. Or copy the skill folder (packages/plugin/skills/trim in daseinlabs/parsec) into .agents/skills/trim in your project. Codex loads it when a task matches its description.

Can I use Trim in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add daseinlabs/parsec --skill trim -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trim, .gemini/skills/trim, .github/skills/trim and .opencode/skills/trim in your project.

What does Trim need to run?

SKILL.md names no scripts, command-line tools or credentials: Trim is instructions for the agent only.

Does Trim access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Trim safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Trim use?

Trim is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trim use?

About 751 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Trim?

Skills that share tags, products or a category with Trim: Strategic Compact (affaan-m/ECC, 276k stars), Strategic Compact (affaan-m/ECC, 276k stars), Strategic Compact (affaan-m/ECC, 276k stars) and Strategic Compact (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trim?

daseinlabs (a GitHub organization) maintains it in daseinlabs/parsec, which has 130 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 6, 2026.

Source: daseinlabs/parsec on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.