macalbert/envilder/code-quality-crap

Claude Code and agent skill by macalbert/envilder

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

CRAP score quality gate for code complexity and test coverage. Use when reviewing methods for complexity risk, deciding whether to split methods, or interpreting complexity and coverage risk without manufacturing tests.

Install

npx vskill@latest install macalbert/envilder/code-quality-crap

SKILL.md

Code Quality: CRAP Score

CRAP (Change Risk Anti-Patterns) measures the risk of a method based on cyclomatic complexity and test coverage.

When to Use

  • Reviewing new or changed methods for complexity risk
  • Deciding whether a method needs splitting
  • Interpreting coverage risk for a given complexity
  • During PURE_REFACTOR implementation or candidate review

Formula

$$\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)$ = test coverage ratio (0 to 1) of method $m$

Quality Gate

Every method MUST have a CRAP score below 6.

Coverage Thresholds

These thresholds are intentionally stricter than the mathematical minimum, providing a safety margin:

ComplexityRecommended coverage for CRAP < 6
10% (any)
2> 0%
340%+
460%+
580%+
6+Not achievable: must split to reduce complexity

Actions by Scenario

ScenarioAction
CRAP >= 6 due to high complexityExtract complex branches into smaller methods
CRAP >= 6 due to low coverageFirst reduce complexity; if important behavior lacks evidence, route a separate verification contract rather than adding coverage-only tests
Complexity 6+ regardless of coverageMust split: CRAP floor equals complexity

Severity Classification

  • Medium: complexity 4–5 without proportional test coverage
  • High: complexity 6+ (must split, no amount of testing fixes it)

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
135
Repository forks
4
7-day trend score
25

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/macalbert/envilder/code-quality-crap/badge)](https://verified-skill.com/skills/macalbert/envilder/code-quality-crap)

Something wrong with this skill or its page? Tell us.