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 3mo 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.
- 3mo ago First seen · 84 lines · 109 tokens per session scan A 7ad02cce7eed
crap-analyzer is a skill published in the GitHub repository swingerman/engineer (166 stars, last pushed 20d 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.
crap-analyzer compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| crap-analyzerswingerman/engineer | Skill | 166 | 20d ago | MIT | A | 109 | Claude Code |
| eu-ai-act-checkpitimon/8-habit-ai-dev | Skill | 3 | 20d ago | MIT | A | 24 | Claude Code |
| workflowpitimon/8-habit-ai-dev | Skill | 3 | 20d ago | MIT | A | 36 | Claude Code |
| analyze-github-issueTNT-Likely/honeycomb | Skill | 3 | 1mo ago | MIT | A | 166 | Claude Code |
| gate-wiringObsidian-Owl/specwright | Skill | 9 | 7mo ago | MIT | A | 40 | Claude Code |
| sdd-validaterubenzarroca/sdd-plugin | Skill | 7 | 8mo ago | MIT | A | 67 | Claude Code |
| sw-designObsidian-Owl/specwright | Skill | 9 | 7mo ago | MIT | A | 29 | Claude Code |