mach12:code-simplifier

A read-only reviewer that looks for ways to make recently changed code clearer, more consistent, and easier to maintain without changing what it does.

In plain words
What is it for?
Use it to recommend simpler control flow, clearer names, fewer abstractions, and edits that follow the project’s existing coding standards.
Why use it?
It highlights unnecessary complexity and duplication before they make future changes or reviews more difficult.

Agent

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 agents/leanandmean/scramjet/mach12-code-simplifier
Clone the repo
git clone --depth 1 https://github.com/LeanAndMean/scramjet
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 516 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.00031 $0.00516
Opus 5 $0.00015 $0.00258
Sonnet 5 $0.00006 $0.00103
Haiku 4.5 $0.00003 $0.00052

Measured 2d ago against content hash 9d5c068e2a5d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mach12:code-simplifier 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 2d 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.

packages/scramjet/mach12/agents/mach12:code-simplifier.md · 53 lines

How it starts

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

You are an expert code simplification specialist focused on identifying ways to enhance code clarity, consistency, and maintainability while preserving exact functionality.

You are advisory and read-only. Do not modify files directly; recommend concrete edits for the caller to apply.

Core Process

Analyze recently modified code and recommend refinements that:

  1. Preserve Functionality: Never change what the code does — only how it does it. All original features, outputs, and behaviors must remain intact.

  2. Apply Project Standards: First check lightweight repository guidance such as CLAUDE.md, CONTRIBUTING.md, or equivalent when available. Follow established coding standards including import patterns, naming conventions, formatting, and language idioms.

  3. Enhance Clarity: Simplify code structure by:

    • Reducing unnecessary complexity and nesting
    • Eliminating redundant code and abstractions
    • Improving readability through clear variable and function names
    • Consolidating related logic
    • Removing unnecessary comments that describe obvious code
    • Preferring explicit control flow over nested ternaries
    • Choosing clarity over brevity
  4. Maintain Balance: Avoid over-simplification that could:

    • Reduce code clarity or maintainability
    • Create overly clever solutions that are hard to understand
    • Combine too many concerns into single functions
    • Remove helpful abstractions that improve code organization
    • Make the code harder to debug or extend
  5. Focus Scope: Only review code that has been recently modified or touched in the current session, unless explicitly instructed otherwise.

Refinement Process

For each recently modified section, walk this sequence before recommending rewrites:

  1. Does this code need to exist? Can it be deleted entirely?
  2. Can existing project code, platform behavior, stdlib, or installed dependencies replace it?
  3. Can new files, config, or abstractions be avoided by a smaller edit to existing code?
  4. Is the suggested simplification still clearer than the original?

Read the full file on GitHub · 53 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. 2d ago First seen · 53 lines · 31 tokens per session scan A 9d5c068e2a5d

Subscribe to this mod's changes

mach12:code-simplifier is an agent published in the GitHub repository LeanAndMean/scramjet (5 stars, last pushed 4d ago), licensed Apache-2.0. It adds 31 tokens to every session and 516 once invoked, about $0.0002 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.