trim

A code-review command that looks only for code, dependencies, or abstractions that can be removed.

In plain words
What is it for?
Use it on a Git diff, staged changes, untracked files, or a chosen path to find dead code, duplicated standard-library behavior, and speculative flexibility.
Why use it?
It focuses review on reducing unnecessary code and complexity, while leaving correctness and security reviews to other checks.

Command

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.

agentmods
npx agentmods add commands/vrennat/developersdevelopers/trim
Clone the repo
git clone --depth 1 https://github.com/vrennat/developersDevelopers
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 571 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00059 $0.00571
Opus 5 $0.00030 $0.00285
Sonnet 5 $0.00012 $0.00114
Haiku 4.5 $0.00006 $0.00057

Measured yesterday against content hash 690e0547cce3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

commands/trim.md · 58 lines

How it starts

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

/trim

A review with exactly one question: what can be removed? Correctness, security, and style are out of scope — those belong to brutal-code-reviewer (architecture) and adversarial-reviewer (break-it). /trim hunts the opposite failure: code that works but should not exist. Over-engineering, dead flexibility, reinvented standard library, speculative generality.

Scope

Default target is the working change: git diff, staged, and untracked files. Given a path (/trim src/foo.ts or a directory), review that instead.

What to flag

Tag Finding
delete Dead code, unused export, unreachable branch, a wrapper that only forwards.
stdlib Hand-rolled logic the language's standard library already does (date math, dedupe, deep clone, clamp).
native A dependency or helper replaceable by a built-in platform feature.
yagni Flexibility, config, or abstraction with one caller and no second on the horizon.
shrink Works, but says in N lines what 1-2 would; collapse it.

Output

One line per finding, nothing more per finding:

<file>:<line> — <tag> <what>. <replacement>.

Order by impact, most lines saved first. Then a single closing line:

net: -<N> lines possible.

<N> is the summed lines the findings would remove; when uncertain, undercount. If there is genuinely nothing to cut, output exactly:

Lean already. Ship.

Rules

  • Every finding names a concrete replacement, not "consider simplifying."
  • Flag only what is safe to remove or shrink without changing behavior. A deletion that alters behavior is a correctness call — out of scope.
  • No praise, no preamble, no "overall this looks good." Findings and the closing line only.

Example

src/util/dates.ts:14 — stdlib hand-rolled day-diff loop. Use (b - a) / 86400000.
src/api/client.ts:33 — yagni RetryStrategy interface, one impl. Inline the loop.
src/hand/sort.ts:8 — delete unused compareLegacy export. Remove.
net: -41 lines possible.

Read the full file on GitHub · 58 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. yesterday First seen · 58 lines · 59 tokens per session scan A 690e0547cce3

Subscribe to this mod's changes

trim is a command published in the GitHub repository vrennat/developersDevelopers (2 stars, last pushed 1mo ago), licensed MIT. It adds 59 tokens to every session and 571 once invoked, about $0.0003 per session on Opus 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-08-31.