trim

trim is a skill for Claude Code, Codex from fmind/dot. It costs 18 tokens per session (938 once invoked), scanned A, original, MIT.

A procedure for shortening documentation, prompts, skills, or configuration without changing their meaning or behavior. It measures the original text and tracks the facts, rules, commands, and settings that must remain.

In plain words
What is it for?
Use it to reduce word count or complexity in text and configuration files. For configuration, it compares the effective settings before and after the edit.
Why use it?
It removes repetition and empty wording while protecting important instructions and configuration effects. It distinguishes tightening a deliverable from summarising it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to reduce word count or complexity in text and configuration files. For configuration, it compares the effective settings before and after the edit.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fmind/dot/trim
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fmind/dot --skill trim
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trim

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/trim/github.svg)](https://agentmods.dev/skills/fmind/dot/trim)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/trim"><img src="https://agentmods.dev/badge/skills/fmind/dot/trim/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for trim

Your own site · 80×15
<a href="https://agentmods.dev/skills/fmind/dot/trim"><img src="https://agentmods.dev/badge/skills/fmind/dot/trim.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 938 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.00938
Opus 5.5 $0.00007 $0.00375
Sonnet 5.5 $0.00004 $0.00188
Haiku 4.5 $0.00002 $0.00094

Measured 9d ago against content hash 52c9a9e84c3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

trim scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/trim/SKILL.md · 45 lines

How it starts

The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Trim

Treat /trim <path> or "too verbose", "too complex", "simplify this" as a request to remove words, lines, and settings that carry nothing, while every fact, behavior, and the author's voice survive. Trimming is not summarizing: when the text is the deliverable (an article, a talk) and the user did not ask for a length, tighten sentences but keep its substance and length class. Arguments can set a target (to 300 words, -40%) or a scope. For code, repository-maintenance owns dead code and abstractions; apply these rules only with tests proving behavior.

Workflow

  1. Measure: record lines, words, and estimated tokens (characters / 4) before editing; for skill catalogs and instruction files also run dot agent context --project . --details (add --source . inside the fmind/dot checkout).

    wc -lwm <path>
    
  2. Map what must survive: list each claim, rule, number, command, flag, link, warning, and authority boundary. For configuration, capture the effective result so the trim can prove it changed nothing: mise cfg and mise settings, dprint resolved-config, ruff check --show-settings <file>, docker compose config, chezmoi cat <target>, or yq -o json for plain data.

  3. Cut, in this order:

    • Duplication: the same rule stated twice; keep it at its owner and link from elsewhere.
    • Restated defaults: settings equal to the installed tool's default, after verifying that default in its current docs or --help (defaults change between versions).
    • Filler: introductions, hedges, recaps, "note that", tool narration, history ("previously…"), and generic tutorials the reader's tools already know.
    • Dead entries: options for tools, paths, or features that no longer exist (prove absence with rg or fd).
    • Verbose constructions: lists that can be one sentence, sentences that can be a clause, examples that only repeat the rule.
  4. Never cut: facts with their evidence, numbers and dates, exact commands and flags, non-obvious gotchas with their reason, security and authority boundaries, links and citations, required structure (frontmatter, anchored headings, generated-index markers), the documentation URL comment at the top of a configuration, comments explaining a non-default choice, and anything the user asked to keep. Preserve the author's voice and stance; do not rewrite into a different style.

  5. Prove equivalence: re-capture the effective configuration and diff it (it must be identical); re-run affected checks and tests; for prose, walk the survival list and confirm each item is still present or deliberately dropped with a reason. Run the repository's formatter and link checks for edited files.

  6. Report: before/after lines, words, and tokens with the percentage, the categories removed, and any candidate cut you kept because it looked load-bearing. Ask before removing anything ambiguous instead of guessing.

Read the full file on GitHub · 45 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago Changed 52c9a9e84c3d
  2. 11d ago Changed 6c56add1fece
  3. 12d ago First seen · 45 lines · 18 tokens per session scan A 400d4dd02158

Subscribe to this mod's changes

trim is a skill published in the GitHub repository fmind/dot (11 stars, last pushed yesterday), licensed MIT. It adds 18 tokens to every session and 938 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-05.

Related

Other skills, from other repositories

dotfiles-bootstrap

Bootstrap a workstation with the dotfiles framework. Takes a GitHub user / owner+repo / explicit clone URL and runs dot init (which shells out to chezmoi) with the right safety prompts. Honors the active agent profile (ask / plan / apply / audit) so it defaults to dry-run in safer modes and full apply in apply.

sebastienrousseau/dotfiles · 88 tokens

vibe

Delegate a coding task to a cheap AI model (Mistral Vibe by default, but any provider Vibe knows about — DeepSeek, Gemini Flash, etc.) and supervise the result via git diff. Claude orchestrates, the cheap model codes. Claude consumes 500-1500 tokens per delegation regardless of how many file reads the delegate does…

sebastienrousseau/dotfiles · 137 tokens

go-stack

Build Go projects, libraries, CLIs, TUIs, web apps, or ADK agents with the standard package layout and pinned tooling.

fmind/dotfiles · 31 tokens

python-stack

Build typed Python projects with uv, Ruff, ty, pytest, Litestar, and Typer. Use for packages, CLIs, web apps, tests, typing, or API verification.

fmind/dotfiles · 41 tokens

hugo

Canonical Hugo static-site stack with the Hextra docs theme — Hugo Modules, mise tasks, dprint, lefthook, and GitHub Pages deploy. Use for documentation sites, project docs, and static websites.

fmind/dotfiles · 46 tokens

k8s-local

Create and manage local Kubernetes clusters (k3d or kind) and deploy to them with kubectl, helm, helmfile, and skaffold. Use for local k8s cluster setup, dev loops, and debugging.

fmind/dotfiles · 50 tokens