SeverinAlexB

Craprs — Development skill for Claude Code

Development community

A skill implementing the CRAP formula for rust.

How to install Craprs

This entry records only its repository, not the path inside it, so there is no exact command to give. Open SeverinAlexB/craprs and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Craprs does

A skill implementing the CRAP formula for rust. Easy to adjust to other testers.

Alternatives in Development

  • Implement Plan — You are tasked with implementing an approved technical plan from thoughts/shared/plans/ 10k ★
  • Review Resume — PM resume review against 10 best practices including XYZ+S formula 7.8k ★
  • Agent Of Empires — Manage multiple Claude Code, OpenCode agents from either TUI or Web for easy access on mobile 3.1k ★

README

craprs

**CRAP** (Change Risk Anti-Pattern) metric for Rust projects.

Combines cyclomatic complexity with test coverage to identify functions that are both complex and under-tested — the riskiest code to change.

Quick Start

Install a coverage tool:

cargo install cargo-tarpaulin    # default
# or
cargo install cargo-llvm-cov

Run from your project root:

cargo install --path .           # install craprs
craprs                           # deletes old lcov.info, runs tarpaulin, analyzes

Or run directly from the craprs source:

cargo run                        # same thing, via cargo

Output

CRAP Report
===========
Function                       Module                               CC   Cov%     CRAP
---------------------------------------------------------------------------------------
complex_fn                     my_crate::module                     12   45.0%    130.2
simple_fn                      my_crate::module                      1  100.0%      1.0

Filtering

Pass module name fragments as arguments to filter:

craprs complexity coverage       # only files matching "complexity" or "coverage"

Options

craprs [OPTIONS] [MODULE_FILTERS...]

Options:
  --coverage-tool    Coverage tool [default: tarpaulin]
  --skip-coverage                        Reuse existing lcov.info
  -C, --project-dir                 Project / workspace root [default: .]
  --src                             Source directory per crate [default: src]
  -p, --package                    Limit analysis (and coverage) to workspace members
  --min-crap                          Hide entries with CRAP below N [default: 0]
  --top                               Show only the top N entries
  --include-uninstrumented               List files missing from lcov.info (rendered with `—`)
  -V, --version                          Print version

Workspace behavior

When the project r