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 agentmods add skills/managedcode/mcpgateway/crap-scorenpx skills add managedcode/MCPGateway --skill crap-scoregit clone --depth 1 https://github.com/managedcode/MCPGatewayWhat 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 | $0.00101 | $0.01894 |
| Opus 5 | $0.00051 | $0.00947 |
| Sonnet 5 | $0.00020 | $0.00379 |
| Haiku 4.5 | $0.00010 | $0.00189 |
Grade A, and why
crap-score 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 yesterday.
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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CRAP Score Analysis
Calculate CRAP (Change Risk Anti-Patterns) scores for .NET methods to identify code that is both complex and undertested.
Background
The CRAP score combines cyclomatic complexity and code coverage into a single metric:
$$\text{CRAP}(m) = \text{comp}(m)^2 \times (1 - \text{cov}(m))^3 + \text{comp}(m)$$
Where:
- $\text{comp}(m)$ = cyclomatic complexity of method $m$
- $\text{cov}(m)$ = code coverage ratio (0.0 to 1.0) of method $m$
| CRAP Score | Risk Level | Interpretation |
|---|---|---|
| < 5 | Low | Simple and well-tested |
| 5-15 | Moderate | Acceptable for most code |
| 15-30 | High | Needs more tests or simplification |
| > 30 | Critical | Refactor and add coverage urgently |
A method with 100% coverage has CRAP = complexity (the minimum). A method with 0% coverage has CRAP = complexity^2 + complexity.
When to Use
- User wants to assess which methods are risky due to low coverage and high complexity
- User asks for CRAP score of specific methods, classes, or files
- User wants to prioritize which code to test next
- User wants to evaluate test quality beyond simple coverage percentages
When Not to Use
- User just wants to run tests (use
run-testsskill) - User wants to write new tests (use
writing-mstest-testsskill or general coding assistance) - User only wants a coverage percentage without complexity analysis
Inputs
| Input | Required | Description |
|---|---|---|
| Target scope | Yes | Method name, class name, or file path to analyze |
| Test project path | No | Path to the test project. Defaults to discovering test projects in the solution. |
| Source project path | No | Path to the source project under analysis |
Workflow
Step 1: Collect code coverage data
If no coverage data exists yet (no Cobertura XML available), always run dotnet test with coverage collection first and mention the exact command in your response. Do not skip this step -- CRAP scores require coverage data.
What ships with it
1 file 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.
- yesterday First seen · 154 lines · 101 tokens per session scan A 02eefbf6cbf8
crap-score is a skill published in the GitHub repository managedcode/MCPGateway (5 stars, last pushed 2d ago), licensed MIT. It adds 101 tokens to every session and 1,894 once invoked, about $0.0005 per session on Opus 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-31.
Other skills, from other repositories
t2i
Use the t2i CLI to generate AI images from text prompts via Microsoft Foundry providers (FLUX.2, MAI-Image-2). Activate when the user asks to generate images, automate image creation in scripts, or set up image generation for CI/CD.
performance-tracking
Status: Active Domain: Diagnostics, SLA Validation, Benchmarking Created: 2026-04-28 Author: Rachael (CLI/UX Dev).
benchmark-parity-triage
Use this when a benchmark harness exists but parity with an upstream reference implementation is unproven.
cli-wiring
Bug class: Commands implemented in packages/squad-cli/src/cli/commands/ but never routed in cli-entry.ts.
init-mode
Team initialization flow (Phase 1 proposal + Phase 2 creation).
distributed-mesh
How to coordinate with squads on different machines using git as transport.