crapquants — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited crapquants (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
CRAPQuants computes CRAP (Change Risk Anti-Patterns) scores for Python code by combining cyclomatic complexity with test coverage, then enriches results with diagnostic tags from six software engineering books.
CRAP formula: CC² × (1 − coverage/100)³ + CC Threshold: Score above 30 = CRAPpy (high risk to change)
Check if CRAPQuants is installed:
pip show radon 2>/dev/null && echo "radon: installed" || echo "radon: MISSING"If not installed, set up:
python3 -m venv .venv && . .venv/bin/activate
pip install --only-binary :all: radon pydantic structlog rich typer polarsIf user has CRAPQuants source, use it directly with PYTHONPATH=src.
Ask the user or determine from context:
./src or ./)coverage.json, coverage.xml, .coverage, lcov.info# Check for coverage data
ls coverage.json coverage.xml lcov.info .coverage 2>/dev/nullIf no coverage report exists:
# Generate one (if pytest is available)
pytest --cov=src --cov-report=json -q 2>/dev/null# Standard analysis (CRAP + 6 framework tags)
PYTHONPATH=src python -m crapquants.cli analyze {path} --level standard
# With coverage data
PYTHONPATH=src python -m crapquants.cli analyze {path} -c coverage.json
# Quick mode (CRAP only, fastest)
PYTHONPATH=src python -m crapquants.cli analyze {path} --level quick
# JSON output for programmatic use
PYTHONPATH=src python -m crapquants.cli analyze {path} -f json -o report.json
# Markdown for documentation
PYTHONPATH=src python -m crapquants.cli analyze {path} -f markdown -o report.mdAfter running, explain results to the user using these thresholds:
CRAP Score:
Diagnostic Tags come from six books — always mention the source:
[Feathers] — testability barriers (from "Working Effectively with Legacy Code")[Ousterhout] — design quality issues (from "A Philosophy of Software Design")[Hunt & Thomas] — engineering culture (from "The Pragmatic Programmer")[Fowler] — code smells with named refactorings (from "Refactoring")[Tornhill] — behavioral risk (from "Your Code as a Crime Scene")[Ford] — architectural fitness functions (from "Building Evolutionary Architectures")For each CRAPpy function, provide actionable guidance:
Always prioritize: CRITICAL tags first, then HIGH, then WARNING.
For CI/CD or ongoing tracking:
# Save baseline (do this on main branch)
PYTHONPATH=src python -m crapquants.cli analyze {path} -c coverage.json --save-baseline data/baseline.json
# Compare against baseline (do this on PR branch)
PYTHONPATH=src python -m crapquants.cli analyze {path} -c coverage.json --baseline data/baseline.jsonExit code 1 = regression detected. Use in CI to block merging CRAPpy code.
CRAPQuants includes AST-based security smell detection (always on):
For comprehensive SAST, ensure Semgrep is installed and use --level full.
"How risky is this function?" → Run quick analysis on the specific file, report CRAP score and what it means.
"What should I refactor first?" → Run standard analysis on the project, sort by CRAP score descending, recommend top 3 with specific refactoring techniques from the Fowler tag mappings.
"Is this codebase healthy?" → Run standard analysis, report PHS (Pragmatic Health Score 0-100), highlight broken windows and coincidence code.
"Help me prepare for a code review" → Run analysis with markdown output, generate report the reviewer can read. Include the glossary section so reviewers understand the metrics.
"Set up quality gates for CI" → Generate baseline, provide GitHub Actions workflow YAML with SHA-pinned actions (Rule #51), configure SARIF output for GitHub Code Scanning.
--missing-policy optimistic during local dev if no coverage availableFor detailed framework documentation, see references/ directory.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.