one go binary · apache 2.0 at first release
You pay for your setup
on every single turn.
Every skill, subagent, MCP server and instruction file you have installed is re-sent to the model — used or not, every session, every engineer on the team. slopmeter prints what that costs, names the units nothing has touched in thirty days, and scores the repo. Offline, no account. Inside Claude Code or Codex, the same findings can apply themselves — one plugin, only the ones you pick.
slopmeter repo — costscale.ai — 2026-09-10
Score C 75/100 commit health costs the grade: p90 935 lines, 40 of 173 commits over 400
Over-engineering 97/100 ▇▇▇▇▇▇▇▇▇▇ 3 findings · go 0.1/kLOC · ts 0.3/kLOC
js 0.0/kLOC
Test coverage 83/100 ▇▇▇▇▇▇▇▇░░ 15 of 105 logic files uncovered
Commit health 27/100 ▇▇▇░░░░░░░ p90 935 lines, churn proxy 16% (−1 churn penalty)
Corpus 74% — above 20 of the 27 public repositories scanned 2026-09-10
repo trend — main — last 12 weeks
commit size (p90 lines)
3160 ┤ █
│ █
120 ┤┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄█┄┄┄▆┄┄┄█┄ median 120
test share of code (%) — line ratio walked back from git, a coverage proxy
31 ┤ ▇ ▆ █
0 ┼──────────────────────────────────────█───█───█─ latest 31
└ Jun Jul ─────────── Aug ─────────────── Sep ───
lines of source 43.4k — 29.8k production / 13.6k tests
+33.5k since Aug 24 · +22.8k production · +10.7k tests
counted as git counts them, comments included — not the parser's LOC
first-parent on main · lockfiles and build output excluded
the last week runs to Sep 10 and is partial
Where the lines live 7 directories of source ▇ production ▁ tests
slopmeter 18.2k ▇▇▇▇▇▇▇▁▁▁▁▁ 61 files · 1 of 30 logic files uncovered
internal 5.3k ▇▇▁ 32 files · 1 of 17 logic files uncovered
gateway 5.1k ▇▇▁ 31 files · every logic file covered
cli 3.9k ▇▇▁ 27 files · 1 of 15 logic files uncovered
… three more directories, trimmed
Findings · 20 15× uncovered-logic · 3× forwarding-wrapper · 1× high-churn · 1× oversized-commits
1 oversized-commits —
p90 935 lines over 173 commits (40 over 400)
2 high-churn —
churn proxy 16% over 173 commits, warn above 15% (lines deleted within 7 days of being
added, not true churn)
3 uncovered-logic dashboard/src/components/charts.tsx
has logic, no test names AXIS_BAND, PAD, Point, usePlotBox, …
… seventeen more, trimmed for this page
Analysis
over-engineering: go 19.4k LOC (go/types) · ts 2.9k LOC (tree-sitter) · js 1.6k LOC (tree-sitter)
commits: 173 on main since 2026-06-12, first-parent, lockfiles and build output excluded
history: 12 days of history, first commit 2026-08-29
files: 121 source, 105 with logic, 74 testVerbatim output of 2026-09-10, cut where it says it is cut. The same report prints as --json, --md or a self-contained HTML page.
Paid again on every turn
A 16k block loaded once is a rounding error. Loaded on every turn by everyone on the team, it is a line on the invoice.
A list, not a lecture
Every finding names the unit, what it costs and the command that removes it — measured from the transcripts, not guessed from file sizes.
Nothing to sign up for
One binary, no account, no network call. Run it on a work laptop without asking anyone.
The list can apply itself
The same report, run as a skill inside Claude Code or Codex, moves the skill, disables the plugin or trims the hook it names — one finding at a time, never without asking.
01 — context economy
What a session costs before you type
Skills, subagents, MCP servers and instruction files load once and re-send on every turn after that. slopmeter counts what was injected, not what the files weigh.
Only the 16,488 is scored: the rest is the harness's own prompt and your first message. Your number will not be this one — this machine keeps MCP schemas out of the session, and a setup that loads them eagerly carries every schema, every turn.
02 — what it finds
Five numbers, and a list of what to do about them
A score on its own does not say whether 75 is bad, so the report places it against public repositories scanned the same way — ours sits above 20 of 27 — and maps the untested lines directory by directory.
A unit no session touched is not proof of waste, so slopmeter scores only what a session confirms and reports the rest as unmeasured.
03 — method, briefly
What counts as slop
Five constructs per 1,000 lines of non-test code, each decidable from a parse tree without knowing what the program is for:
- An interface with one implementor and no test double behind it.
- A wrapper that only forwards its arguments to a single call, adding a name and no behaviour.
- A config type built from the same literal everywhere it is constructed: a parameter never varied.
- Empty error handling a caught error that is neither handled, wrapped, nor returned.
- Commented-out code that still parses read by everyone, run by nothing.
Go through go/ast and go/types, seven other languages through a pure-Go tree-sitter runtime. A language the parser cannot handle prints n/a rather than counting as clean. The rest is in SPEC.md.
04 — limits
What it does not measure
Deliberate, and not on a roadmap.
- No productivity claim.
- Nothing it reads could establish that anyone is faster.
- No lines saved.
- It counts what is in the tree and in the sessions, not the counterfactual.
- Unmeasured, not unused.
- A unit no session touched is kept out of the ratio.
- Provenance on every number.
- measured or estimated, in the report and in the JSON.
- A report, not a gate.
- The exit status is 0 whatever the grade.
05 — output
Where the score lands
A page you can send
--html writes one self-contained page, laid out for A4 so Print → Save as PDF is the PDF. --md writes the same numbers for an agent.
A badge for the README
--badge writes one small SVG with the grade and the day it was measured. No service behind it: the run writes the file, the repository commits it.
A comment on the pull request
The Action scores the branch and its base, and leaves one comment with the two side by side. It never fails the build.
slopmeter repo --html slop.html ~/code/myproj slopmeter repo --badge .slopmeter/badge.svg . slopmeter env --fix | patch -p0 # the removals, applied by your own hand /slopmeter:cleanup # inside Claude Code or Codex, the same findings, applied one at a time
--fix prints the config lines the findings imply removing, as a unified diff, and stops there. It writes nothing, and there is no flag that makes it. What a diff cannot carry — a skill to move, a plugin to disable, a hook to trim — the slopmeter plugin carries out itself, inside the harness it is about, one finding at a time and only the ones you pick.
06 — install
Getting it
macOS and Linux, Intel and ARM. The script picks the build for your machine, checks its sha256 against the published SHA256SUMS, and puts one binary in ~/.local/bin:
curl -fsSL https://get.decost.dev/slopmeter/install.sh | sh
Inside Claude Code it also installs as a plugin, which is how the findings get to apply themselves. The catalog and the plugin sit beside the binaries, so this needs no account, no clone and no git:
/plugin marketplace add https://get.decost.dev/slopmeter/marketplace.json /plugin install slopmeter@slopmeter
The plugin carries the skill, not the binary — the skill runs slopmeter, so the line above comes first. Claude Code pins the plugin archive by sha256 and refuses a download whose digest moved. Codex registers the same plugin from a checkout, which arrives with the source. There is no Windows build on purpose: the module is pure Go and cross-compiles, but nothing here has been run on Windows, and a binary handed out untested is a claim rather than a tool.
07 — usage
Running it
slopmeter # env report for this machine slopmeter env --since 168h # the last seven days slopmeter repo ~/code/myproj # a codebase, and a twelve-week commit trend slopmeter github cli/cli # a repository you do not have a copy of slopmeter repo --lang go,ts --json slopmeter delta base.json head.json # the two scores, side by side
env and repo are offline: nothing is uploaded or written, and git is the only subprocess. github is the one that uses the network — it shallow-clones into a temporary directory, scores the tree and deletes the clone. The scored projects are that command run in public, each on a stated day.
08 — availability
Licence and source
A separate Go module inside the decost repository, with its own licence and tests. The builds above are published and checksummed; the source opens under Apache 2.0 with the first tagged release, and that tag does not exist yet.
Longer read: what Claude Code loads before you type, and what a session costs, request by request.
Ask to be told when the source opensOne pinned dependency: a pure-Go tree-sitter runtime, MIT, no cgo.
09 — questions
Common questions
- How many tokens does a Claude Code session cost before you type?
- On the machine measured here, 62,114 input tokens on the first turn, 16,488 of them configuration the developer chose. Published estimates range from 20,000 to 55,000 — which is why the useful figure is your own, read from the transcripts already on your disk.
- How is this different from /context?
- /context draws the window in front of you now. slopmeter reads thirty days of history across Claude Code and Codex together, costs each component in tokens, and names the units nothing has touched.
- Does it send anything anywhere?
- No. One binary that reads files and prints a report: no account, no daemon, no hook in your settings, nothing written. slopmeter github is the one command that uses the network, to clone the repository you named.
- Does it fix anything, or just report?
- The binary writes nothing you did not name as an output — an HTML report, a Markdown one, a badge — and never a config file or a line of your source. The slopmeter plugin is the opt-in exception: run as a skill inside Claude Code or Codex, it shows the same findings and edits only the ones you pick, one at a time — a moved skill, a disabled plugin, a trimmed hook.
- What does it score a codebase on?
- Over-engineering density per 1,000 lines of non-test code, test coverage of files that hold logic, and commit health from the git history. It maps the lines directory by directory and places the score against public repositories scanned the same way.
- Can it run in CI?
- Yes, as a GitHub Action: it scores the branch and its base and leaves one comment with the two side by side, edited in place on every push. It never fails the build.
- Is it free?
- Yes, and it is installable today: one checksummed binary from get.decost.dev, or a plugin inside Claude Code. The source opens under Apache 2.0 with its first tagged release, as a separate Go module inside the decost repository.