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.
npx skills add swingerman/engineer --skill crap-analyzergit clone --depth 1 https://github.com/swingerman/engineerWrote 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.
[](https://agentmods.dev/skills/swingerman/engineer/crap-analyzer)<a href="https://agentmods.dev/skills/swingerman/engineer/crap-analyzer"><img src="https://agentmods.dev/badge/skills/swingerman/engineer/crap-analyzer/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.
<a href="https://agentmods.dev/skills/swingerman/engineer/crap-analyzer"><img src="https://agentmods.dev/badge/skills/swingerman/engineer/crap-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00109 | $0.01165 |
| Opus 5.5 | $0.00044 | $0.00466 |
| Sonnet 5.5 | $0.00022 | $0.00233 |
| Haiku 4.5 | $0.00011 | $0.00117 |
Grade A, and why
crap-analyzer 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CRAP Analyzer
CRAP (Change Risk Anti-Patterns) flags functions that are both complex and poorly tested — the worst-risk code to ship.
CRAP(m) = comp(m)² × (1 − cov(m))³ + comp(m)
This skill scopes analysis to a diff, ranks findings worst-first, and turns each finding into a concrete refactor + test-stub proposal.
Workflow
-
Determine the diff. First that works:
gh pr diff/gh pr diff <number>if a GitHub PR is referenced.git diff --merge-base <main-branch>— detect the main branch withgit remote show origin | grep 'HEAD branch'.git diff --cachedfor staged changes.git diff HEAD~N..HEADfor a named commit range.- Explicit file list if the user names files.
Pipe the diff to
scripts/compute_crap.py --diff -. -
Locate or generate coverage. Let the script auto-discover coverage files first (lcov, Cobertura, JaCoCo, Clover, Go
coverage.out, coverage.py JSON). If nothing is found, follow references/coverage-discovery.md to detect the toolchain, then ask before running it. On decline, proceed with coverage=0% and flag it in the report header. -
Run the analyzer.
python3 <skill-dir>/scripts/compute_crap.py --diff - --repo-root <repo> --threshold <N> --format bothDefault threshold is 20. Read
.crap-analyzer.jsonat repo root if present and pass itsthresholdthrough. Full flag list and output JSON shape: references/script-reference.md. -
Present the report. Show the markdown table. For each finding, link
file:start_line. If more than ~8 findings, surface the top 5 and mention the rest. -
Propose fixes per finding, worst-first. For each function above threshold:
- Read the function. Score alone is not enough — look at the code.
- Refactor proposal. Extract-method diff or guard-clause rewrite. Patterns: references/refactor-patterns.md.
- Test stubs. Cover each uncovered branch in the repo's test framework. Templates: references/test-stub-templates.md.
- Respect codebase conventions. Read nearby code and match naming, error handling, DI, async patterns.
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 84 lines · 109 tokens per session scan A 7ad02cce7eed
crap-analyzer is a skill published in the GitHub repository swingerman/engineer (157 stars, last pushed 23d ago), licensed MIT. It adds 109 tokens to every session and 1,165 once invoked, about $0.0004 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.
Other skills, from other repositories
brooks-test
Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…
Behat BDD Testing
PHP BDD testing with Behat framework using Gherkin feature files, Mink browser extension, context classes, and Symfony integration for behavior-driven acceptance testing.
pre-pr-audit
Pre-PR confidence audit with 5-dimension scoring. Use when: final check before commit/push/PR, evaluating PR readiness, assessing test quality + risk + coverage holistically. Triggers: pre-pr, readiness check, confidence audit, final verification, ready to PR, how confident. Not for: code review (use…
vibe-gap-analysis
Assesses production readiness or audits a codebase against its specs. Supports quick static mode, deep 17-dimension audit, or single-dimension focus. Use before a production launch, after a major refactor, when inheriting a codebase, or when someone asks how done the project is.
spike-consumer-adversarial
OI-3 spike harness — heavy consumer, ADVERSARIAL arm. Worst-case early-exit test: the mid-workflow Skill call has no continuation guardrail and the guidance skill ends with a final-sounding anchor. Use only when explicitly invoked by the spike harness with a TRIALID and data path.
Behave BDD Testing
Python BDD testing with Behave framework using Gherkin feature files, step definitions, environment hooks, and Selenium integration for behavior-driven acceptance testing.