Skills for Real Engineers. Straight from my .agents directory.
crap-analysis
Agent skill fromAaronontheweb/dotnet-skills
Analyze code coverage and CRAP (Change Risk Anti-Patterns) scores to identify high-risk code. Use OpenCover format with ReportGenerator for Risk Hotspots showing cyclomatic complexity and untested code paths.
How to install crap-analysis
npx skills add Aaronontheweb/dotnet-skills# or add only this skill to Claude Code: copy the folder
skills/crap-analysis/
# into
~/.claude/skills/crap-analysis/ (all projects)
.claude/skills/crap-analysis/ (one project)
1# CRAP Score Analysis23## When to Use This Skill45Use this skill when:6- Evaluating code quality and test coverage before changes7- Identifying high-risk code that needs refactoring or testing8- Setting up coverage collection for a .NET project9- Prioritizing which code to test based on risk10- Establishing coverage thresholds for CI/CD pipelines1112---1314## What is CRAP?1516**CRAP Score = Complexity x (1 - Coverage)^2**1718The CRAP (Change Risk Anti-Patterns) score combines cyclomatic complexity with test coverage to identify risky code.1920| CRAP Score | Risk Level | Action Required |21|------------|------------|-----------------|22| **< 5** | Low | Well-tested, maintainable code |23| **5-30** | Medium | Acceptable but watch complexity |24| **> 30** | High | Needs tests or refactoring |2526### Why CRAP Matters2728- **High complexity + low coverage = danger**: Code that's hard to understand AND untested is risky to modify29- **Complexity alone isn't enough**: A complex method with 100% coverage is safer than a simple method with 0%30- **Focuses effort**: Prioritize testing on complex code, not simple getters/setters3132### CRAP Score Examples3334| Method | Complexity | Coverage | Calculation | CRAP |35|--------|------------|----------|-------------|------|36| `GetUserId()` | 1 | 0% | 1 x (1 - 0)^2 | **1** |37| `ParseToken()` | 54 | 52% | 54 x (1 - 0.52)^2 | **12.4** |38| `ValidateForm()` | 20 | 0% | 20 x (1 - 0)^2 | **20** |39| `ProcessOrder()` | 45 | 20% | 45 x (1 - 0.20)^2 | **28.8** |40…
Excerpt shown under the repository's MIT license.
More skills in dotnet-skills
Similar skill repositories
Public repository for Agent Skills
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Production-grade engineering skills for AI coding agents.
The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create motion, prototypes, websites, apps, dashboards, presentations, images, and videos with your team and AI agents. Share work, exchange feedback, and iterate together in one workspace.
Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
