Open-source developer tool

crapkit

Know where the code needs attention.

crapkit brings complexity, test coverage and change history together to help developers and coding agents decide what to improve next.

My role
Creator & maintainer
License
MIT
crapkit / worklist

$ crapkit worklist

classifycalc/grade.py:7
Complexity
14
Test coverage
50%
CRAP score
38.5

One function. Complexity and test coverage, in view.

Documentation example, presented visually. See the original output

The problem

Where should the next
hour of work go?

Code can be easy to generate and hard to change with confidence. A passing test suite or a repository-wide coverage percentage does not tell you which functions combine complicated logic with gaps in testing.

I created crapkit to make that work visible at the function level, and to make the same evidence usable by people, coding agents and automated checks.

01

Measure the function

Combine cyclomatic complexity with test coverage using the existing CRAP metric. Where coverage is unavailable, show complexity on its own rather than imply that testing was measured.

02

Choose the next change

Use change history to rank the work. A complicated function that changes often deserves a different level of attention from code that rarely moves.

03

Keep progress from slipping

Record existing debt as a baseline, then check changes against it. The ratchet allows recorded scores to improve but prevents them from rising.

Built for the way teams work.

Use it from the command line, connect a coding agent through MCP, or run it in a GitHub Actions workflow. Analysis and scoring run locally without telemetry; configured test and other commands retain their own behavior.

Behind the tools

What do we ask
of the systems we build?

My writing explores human agency, intent and accountability. crapkit addresses one practical part of building software: making the evidence for code changes easier to inspect.