dotnet-techne-crap-analysis

dotnet-techne-crap-analysis is a skill for Claude Code from Metalnib/dotnet-episteme-skills. It costs 50 tokens per session (2,840 once invoked), scanned C, a copy of crap-analysis, MIT.

A .NET code-risk analysis guide based on CRAP scores, which combine code complexity with test coverage.

In plain words
What is it for?
Use it to find testing gaps, prioritise refactoring, and set coverage targets for a .NET project or its build checks.
Why use it?
It helps identify code that is difficult to change and not well tested, so effort can be focused where failures are more likely.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the dotnet-episteme-skills plugin — 14 skills, 3 commands, 2 hooks, 1 MCP server shipped together

Good fit Use it to find testing gaps, prioritise refactoring, and set coverage targets for a .NET project or its build checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/metalnib/dotnet-episteme-skills/dotnet-techne-crap-analysis
Install

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.

Any agent
npx skills add Metalnib/dotnet-episteme-skills --skill dotnet-techne-crap-analysis
Clone the repo
git clone --depth 1 https://github.com/Metalnib/dotnet-episteme-skills

Made for: Claude Code.

Or install dotnet-episteme-skills, the plugin that ships this one along with the rest of its 14 skills, 3 commands, 2 hooks, 1 MCP server.

Wrote 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.

agentmods badge for dotnet-techne-crap-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/metalnib/dotnet-episteme-skills/dotnet-techne-crap-analysis/github.svg)](https://agentmods.dev/skills/metalnib/dotnet-episteme-skills/dotnet-techne-crap-analysis)
Your own site
<a href="https://agentmods.dev/skills/metalnib/dotnet-episteme-skills/dotnet-techne-crap-analysis"><img src="https://agentmods.dev/badge/skills/metalnib/dotnet-episteme-skills/dotnet-techne-crap-analysis/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.

agentmods 80×15 button for dotnet-techne-crap-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/metalnib/dotnet-episteme-skills/dotnet-techne-crap-analysis"><img src="https://agentmods.dev/badge/skills/metalnib/dotnet-episteme-skills/dotnet-techne-crap-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,840 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 91% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.02840
Opus 5.5 $0.00020 $0.01136
Sonnet 5.5 $0.00010 $0.00568
Haiku 4.5 $0.00005 $0.00284

Measured 3mo ago against content hash 080be18e129c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

dotnet-techne-crap-analysis scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf coverage/ TestResults/
Origin

This is a copy

91% identical to crap-analysis — 15 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/dotnet-techne-crap-analysis/SKILL.md · 398 lines

How it starts

The opening of the file, as written. The whole thing — 398 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CRAP Score Analysis

When to Use This Skill

Use this skill when:

  • Evaluating code quality and test coverage before changes
  • Identifying high-risk code that needs refactoring or testing
  • Setting up coverage collection for a .NET project
  • Prioritizing which code to test based on risk
  • Establishing coverage thresholds for CI/CD pipelines

What is CRAP?

CRAP Score = Complexity x (1 - Coverage)^2

The CRAP (Change Risk Anti-Patterns) score combines cyclomatic complexity with test coverage to identify risky code.

CRAP Score Risk Level Action Required
< 5 Low Well-tested, maintainable code
5-30 Medium Acceptable but watch complexity
> 30 High Needs tests or refactoring

Why CRAP Matters

  • High complexity + low coverage = danger: Code that's hard to understand AND untested is risky to modify
  • Complexity alone isn't enough: A complex method with 100% coverage is safer than a simple method with 0%
  • Focuses effort: Prioritize testing on complex code, not simple getters/setters

CRAP Score Examples

Method Complexity Coverage Calculation CRAP
GetUserId() 1 0% 1 x (1 - 0)^2 1
ParseToken() 54 52% 54 x (1 - 0.52)^2 12.4
ValidateForm() 20 0% 20 x (1 - 0)^2 20
ProcessOrder() 45 20% 45 x (1 - 0.20)^2 28.8
ImportData() 80 10% 80 x (1 - 0.10)^2 64.8

Coverage Collection Setup

coverage.runsettings

Create a coverage.runsettings file in your repository root. The OpenCover format is required for CRAP score calculation because it includes cyclomatic complexity metrics.

<?xml version="1.0" encoding="utf-8" ?>
<RunSettings>
  <DataCollectionRunSettings>
    <DataCollectors>
      <DataCollector friendlyName="XPlat code coverage">
        <Configuration>
          <!-- OpenCover format includes cyclomatic complexity for CRAP scores -->
          <Format>cobertura,opencover</Format>

          <!-- Exclude test and benchmark assemblies -->
          <Exclude>[*.Tests]*,[*.Benchmark]*,[*.Migrations]*</Exclude>

          <!-- Exclude generated code, obsolete members, and explicit exclusions -->
          <ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute,ExcludeFromCodeCoverageAttribute</ExcludeByAttribute>

          <!-- Exclude source-generated files, Blazor generated code, and migrations -->
          <ExcludeByFile>**/obj/**/*,**/*.g.cs,**/*.designer.cs,**/*.razor.g.cs,**/*.razor.css.g.cs,**/Migrations/**/*</ExcludeByFile>

          <!-- Exclude test projects -->
          <IncludeTestAssembly>false</IncludeTestAssembly>

          <!-- Optimization flags -->
          <SingleHit>false</SingleHit>
          <UseSourceLink>true</UseSourceLink>
          <SkipAutoProps>true</SkipAutoProps>
        </Configuration>
      </DataCollector>
    </DataCollectors>
  </DataCollectionRunSettings>
</RunSettings>

Read the full file on GitHub · 398 lines

Changes

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.

  1. 3mo ago First seen · 398 lines · 50 tokens per session scan C 080be18e129c

Subscribe to this mod's changes

dotnet-techne-crap-analysis is a skill published in the GitHub repository Metalnib/dotnet-episteme-skills (13 stars, last pushed 2mo ago), licensed MIT. It adds 50 tokens to every session and 2,840 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). It is 91% identical to crap-analysis, differing in 15 lines, and is treated as a copy.

Related

dotnet-techne-crap-analysis compared with skills from other repositories

dotnet-techne-crap-analysis next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dotnet-techne-crap-analysisMetalnib/dotnet-episteme-skillsSkill132mo agoMITC50Claude Code
necessary-code-auditdanhuaxiansheng/claude-code-cleanup-skillsSkill15mo agoMITA119Claude Code, Codex
unused-code-auditdanhuaxiansheng/claude-code-cleanup-skillsSkill15mo agoMITA93Claude Code, Codex
godot-code-reviewjame581/GodotPrompterSkill1.0k5d agoMITA67Claude Code
graphify-dotnetmanagedcode/dotnet-skillsSkill530yesterdayMITA125Claude Code, Codex
resharper-cltmanagedcode/dotnet-skillsSkill530yesterdayMITA107Claude Code, Codex
agent-design-best-practicesmajiayu000/claude-skill-registrySkill756yesterdayMITA0Claude Code, Codex