reduce

reduce is a skill for Claude Code, Codex from escoffier-labs/brigade. It costs 79 tokens per session (1,852 once invoked), scanned A, original, MIT.

A code-cleanup guide that simplifies code while keeping its behavior unchanged. Behavior includes the same results, side effects, errors, public interface, and evaluation order.

In plain words
What is it for?
Use it when making recently changed code clearer, shorter, or easier to maintain. It helps scope the work, find relevant tests, add tests that record current behavior when needed, and apply safe simplifications.
Why use it?
It reduces unnecessary complexity without turning a cleanup into an accidental rewrite. Tests or other evidence are used to check that the code still behaves the same.

Skill for Claude CodeCodex

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

Good fit Use it when making recently changed code clearer, shorter, or easier to maintain. It helps scope the work, find relevant tests, add tests that record current behavior when needed, and apply safe simplifications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/escoffier-labs/brigade/reduce
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 escoffier-labs/brigade --skill reduce
Clone the repo
git clone --depth 1 https://github.com/escoffier-labs/brigade

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 reduce

README.md
[![agentmods](https://agentmods.dev/badge/skills/escoffier-labs/brigade/reduce/github.svg)](https://agentmods.dev/skills/escoffier-labs/brigade/reduce)
Your own site
<a href="https://agentmods.dev/skills/escoffier-labs/brigade/reduce"><img src="https://agentmods.dev/badge/skills/escoffier-labs/brigade/reduce/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 reduce

Your own site · 80×15
<a href="https://agentmods.dev/skills/escoffier-labs/brigade/reduce"><img src="https://agentmods.dev/badge/skills/escoffier-labs/brigade/reduce.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,852 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00079 $0.01852
Opus 5.5 $0.00032 $0.00741
Sonnet 5.5 $0.00016 $0.00370
Haiku 4.5 $0.00008 $0.00185

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

Security

Grade A, and why

reduce 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 6d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • reduce — 98% identical, 40 lines differ
registry/skills/reduce/SKILL.md · 108 lines

How it starts

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

reduce

A reduction simmers a sauce to drive off the water and concentrate the flavor, and the dish tastes the same, only sharper. You do that to code: boil off the excess, concentrate the intent, and the behavior comes out identical. The cook who reduces too hard scorches the pan and changes the dish; the discipline is knowing when to pull it off the heat.

Core principle: same inputs, same outputs, same side effects, same errors, same public interface, same evaluation order. If the behavior moved, it was not a reduction, it was a rewrite. No behavior-preservation evidence, no applied simplification. Violating the letter of that is violating its spirit.

The behavior lock

Before you change a single line, establish the lock. This is the whole safety story; everything else is taste.

  1. Pin the scope. Default to the code that recently changed (see Scope). Know exactly which files and functions you are reducing before you start.
  2. Find the tests that cover it. Run them and confirm they exercise the code you are about to touch. If coverage is thin, write characterization tests first (taste) that capture the current behavior, edge cases included, only when that is safe and in scope. If you cannot lock the behavior with tests, drop to report mode.
  3. Baseline-verify green. Run the suite and read the output before touching anything. You are proving the starting point, not assuming it.
  4. Reduce in small steps, one category of simplification at a time (see What to reduce).
  5. Re-run the same verification after each meaningful change. Evidence in hand before any "behavior unchanged" claim (check). A reduction you did not re-run is a hypothesis.
  6. Cannot lock it? Switch to report mode or ask the user. Never apply a simplification you cannot prove safe.

Two modes

Apply is the default for recently changed code that has tests, or where characterization tests can be added safely. You make the edits, one category per commit, with the verification evidence.

Read the full file on GitHub · 108 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. 6d ago Changed 35bebd7531f8
  2. 1mo ago First seen · 108 lines · 79 tokens per session scan A 9164fb0b2070

Subscribe to this mod's changes

reduce is a skill published in the GitHub repository escoffier-labs/brigade (81 stars, last pushed today), licensed MIT. It adds 79 tokens to every session and 1,852 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

plur-create-engrams

Create or improve PLUR engrams from conversations, documents, decisions, observations, and explicit preferences. Use for memory extraction, engram authoring, or reviewing proposed memories, including global, scoped, pinned, retrieved, and provisional knowledge. Ordinary use of existing memories does not require this…

plur-ai/plur · 66 tokens

plur-memory

Persistent learning for AI agents. Open engram format. Your agent learns from corrections, remembers across sessions, and transfers knowledge across domains.

plur-ai/plur · 31 tokens

plur-session-end

Extract durable learnings at the end of a session. Saves corrections, preferences, and codebase patterns as engrams — nothing ephemeral, nothing sensitive.

plur-ai/plur · 35 tokens

plur-memory

Your memory stays on your machine. No cloud, no tracking, no API key. PLUR makes your OpenClaw remember — and shares that memory with every other tool you use.

plur-ai/plur · 41 tokens

binder-modeling

Binder data modeling — define entity types, fields, relations, constraints, views, and navigation. Use when asked to "create a type", "add a field", "define a schema", "set up relations", "model entities", "create a view", "set up navigation", "render entities as files", or design a binder workspace schema.

mpazik/Binder · 74 tokens

binder-app

Build a small HTTP app (dashboard, kanban board, admin panel, custom UI) on top of an existing Binder workspace. Use when asked to "create an app", "build a dashboard", "show records in a chart", "make a kanban/board", "build an admin panel", or "add a UI on top of binder".

mpazik/Binder · 74 tokens