Agent skill

Code Quality Crap

by macalbert in macalbert/envilder

CRAP score quality gate for code complexity and test coverage.

MITAuto-check passedTesting & QA

Install Code Quality Crap

skills CLI
$ npx skills add macalbert/envilder --skill code-quality-crap -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install macalbert/envilder code-quality-crap --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/macalbert/envilder.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/code-quality-crap .claude/skills/code-quality-crap && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-quality-crap
GitHub stars
138
Token cost
~468 tokens
SKILL.md length
198 words
Files
1
Skills in repo
30
Repo updated
First seen
Licence
MIT

At a glance

CRAP score quality gate for code complexity and test coverage.

  • Reviewing methods for complexity risk
  • SKILL.md covers When to Use, Formula, Quality Gate and Coverage Thresholds, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Deciding whether to split methods

What it does

Code Quality Crap is an agent skill from macalbert/envilder. 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.

Its SKILL.md is about 470 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Code quality, Quality gates and Test coverage. The repository describes itself as: One secret mapping for local dev, CI/CD, and runtime. Envilder resolves cloud secrets from your own vaults without SaaS middlemen, duplicated config, or .env drift. The licence is MIT.

When your agent uses it

  • Reviewing methods for complexity risk
  • Deciding whether to split methods
  • Interpreting complexity and coverage risk without manufacturing tests

Example prompts

  • “/code-quality-crap”

What it can do on your machine

Read from SKILL.md and the folder at commit b6a0327. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Quality Crap loads about 468 tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 198 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~468

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from macalbert/envilder at commit b6a0327, republished under its MIT licence (© macalbert). 198 words, ~468 tokens.

Download SKILL.mdSave it as .claude/skills/code-quality-crap/SKILL.md (or your agent's skills folder).
name
code-quality-crap
description
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.

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)

© macalbert, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/code-quality-crap of macalbert/envilder.

Open the folder on GitHubat commit b6a0327

Compare with similar skills

Code Quality Crap next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Quality Crap compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Quality Crap this skillmacalbert/envilder138—~468Automated safety check: PassMIT
Dev ReviewFHIR/fhir-codegen154—~5kAutomated safety check: PassMIT
Quality CImanagedcode/dotnet-skills486—~2.1kAutomated safety check: PassMIT
Constraint-Driven Developmentaddyosmani/agent-skills102k2 repos~5.2kAutomated safety check: PassMIT
Supercovsupercorp-ai/supercov1481 repos~415Automated safety check: PassMIT
Coverage Analysis for .NETdotnet/skills5.6k1 repos~2.8kAutomated safety check: PassMIT

Similar skills

  • Dev Review

    FHIR/fhir-codegen

    Performs a two-track code-quality and QA review in the roles of a staff-level Engineering Lead and QA Lead, then synthesizes both critiques into a single analysis.md.

    154 GitHub stars~5k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Quality CI

    managedcode/dotnet-skills

    Set up or refine open-source .NET code-quality gates for CI: formatting, .editorconfig, SDK analyzers, third-party analyzers, coverage, mutation testing, architecture tests, and security scanning.

    486 GitHub stars~2.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Constraint-Driven Development

    addyosmani/agent-skills

    Records a project's quality bar in CONSTRAINTS.md and watches diffs for signs an agent quietly weakened it, such as suppressions, skipped tests or lowered thresholds.

    102k GitHub starsUsed in 2 repos~5.2k tokens
    DevelopmentAuto-check passed
  • Supercov

    supercorp-ai/supercov

    Measures test coverage and code quality in a repository with the supercov CLI, and turns what it finds into small, focused tests or fixes.

    148 GitHub starsUsed in 1 repo~415 tokens
    Testing & QAAuto-check passed
  • Official

    Interprets .NET coverage reports to explain line and branch gaps, target arithmetic and, on request, CRAP-based risk hotspots, without rerunning tests.

    5.6k GitHub starsUsed in 1 repo~2.8k tokens
    Testing & QAAuto-check passed
  • Audit Code

    danielvm-git/bigpowers

    Self-review checklist for the coding agent to run before dispatching a reviewer.

    256 GitHub stars~1.6k tokensUpdated 16 days ago
    Testing & QAAuto-check: notes

More from macalbert/envilder

All 30 skills in this repo
  • Code Review Perspectives

    macalbert/envilder

    Five independent analysis perspectives for code review: correctness, architecture, security, conventions, and complexity.

    138 GitHub stars~1k tokensUpdated 2 days ago
    Auto-check passed
  • Index of Architecture Decision Records (ADRs) for cross-cutting technical decisions.

    138 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Common Git

    macalbert/envilder

    Git commit messages, PR workflow, and branching strategy using Conventional Commits and Semantic Versioning.

    138 GitHub stars~991 tokensUpdated 2 days ago
    Auto-check passed
  • Common Testing Conventions

    macalbert/envilder

    Mandatory testing conventions including the narrow diagnostic exception for testing test-only code, AAA pattern, test naming, and assertions across all stacks (.NET, TypeScript, Python).

    138 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Doc Maintenance

    macalbert/envilder

    Workflow for maintaining changelogs, READMEs, and documentation files.

    138 GitHub stars~904 tokensUpdated 2 days ago
    Auto-check passed
  • Doc Sync

    macalbert/envilder

    Audit and synchronize documentation across website, READMEs, and docs/.

    138 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed

Questions about Code Quality Crap

What does Code Quality Crap do?

CRAP score quality gate for code complexity and test coverage. Code Quality Crap is an agent skill from macalbert/envilder. CRAP score quality gate for code complexity and test coverage.

When should I use Code Quality Crap?

Code Quality Crap fits situations like: reviewing methods for complexity risk; deciding whether to split methods; interpreting complexity and coverage risk without manufacturing tests.

How do I install Code Quality Crap in Claude Code?

Run `npx skills add macalbert/envilder --skill code-quality-crap -a claude-code`. Or copy the skill folder (.github/skills/code-quality-crap in macalbert/envilder) into .claude/skills/code-quality-crap in your project. Claude Code loads it when a task matches its description.

How do I install Code Quality Crap in Codex?

Run `npx skills add macalbert/envilder --skill code-quality-crap -a codex`. Or copy the skill folder (.github/skills/code-quality-crap in macalbert/envilder) into .agents/skills/code-quality-crap in your project. Codex loads it when a task matches its description.

Can I use Code Quality Crap in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add macalbert/envilder --skill code-quality-crap -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-quality-crap, .gemini/skills/code-quality-crap, .github/skills/code-quality-crap and .opencode/skills/code-quality-crap in your project.

What does Code Quality Crap need to run?

SKILL.md names no scripts, command-line tools or credentials: Code Quality Crap is instructions for the agent only.

Does Code Quality Crap access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Quality Crap safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Quality Crap use?

Code Quality Crap is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Quality Crap use?

About 468 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Quality Crap?

Skills that share tags, products or a category with Code Quality Crap: Dev Review (FHIR/fhir-codegen, 154 stars), Quality CI (managedcode/dotnet-skills, 486 stars), Constraint-Driven Development (addyosmani/agent-skills, 102k stars) and Supercov (supercorp-ai/supercov, 148 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Quality Crap?

macalbert (a GitHub user) maintains it in macalbert/envilder, which has 138 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on October 5, 2026.

Source: macalbert/envilder on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.