test-smell-detection

test-smell-detection is a skill for Claude Code, Codex from managedcode/dotnet-skills. It costs 157 tokens per session (2,083 once invoked), scanned A, a copy of test-smell-detection, MIT.

A test-audit tool that checks existing tests for named test smells, meaning patterns in test code that can make failures harder to understand or trust.

In plain words
What is it for?
It is for reviewing selected tests, assigning recognised smell categories and severity, and suggesting fixes suited to the project's framework.
Why use it?
It gives a formal, evidence-based review of problems such as unclear assertions or overly complicated tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for reviewing selected tests, assigning recognised smell categories and severity, and suggesting fixes suited to the project's framework.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/managedcode/dotnet-skills/test-smell-detection
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 managedcode/dotnet-skills --skill test-smell-detection
Clone the repo
git clone --depth 1 https://github.com/managedcode/dotnet-skills

Made for: Claude Code, Codex.

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 test-smell-detection

README.md
[![agentmods](https://agentmods.dev/badge/skills/managedcode/dotnet-skills/test-smell-detection/github.svg)](https://agentmods.dev/skills/managedcode/dotnet-skills/test-smell-detection)
Your own site
<a href="https://agentmods.dev/skills/managedcode/dotnet-skills/test-smell-detection"><img src="https://agentmods.dev/badge/skills/managedcode/dotnet-skills/test-smell-detection/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 test-smell-detection

Your own site · 80×15
<a href="https://agentmods.dev/skills/managedcode/dotnet-skills/test-smell-detection"><img src="https://agentmods.dev/badge/skills/managedcode/dotnet-skills/test-smell-detection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 157 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,083 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 95% 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.00157 $0.02083
Opus 5.5 $0.00063 $0.00833
Sonnet 5.5 $0.00031 $0.00417
Haiku 4.5 $0.00016 $0.00208

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

Security

Grade A, and why

test-smell-detection 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 1mo 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.

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.

Origin

This is a copy

95% identical to test-smell-detection — 0 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.

catalog/Testing/Official-DotNet-Test/skills/test-smell-detection/SKILL.md · 164 lines

How it starts

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

Test Smell Detection

Audit test code with the academic taxonomy, code evidence, calibrated framework idioms, and fixes native to the codebase.

Scope

  • Audit only staged or named tests. Search the current workspace before asking for code; never claim a file is missing until that search finds no relevant test.
  • Read production code only when it changes a verdict.
  • For unfamiliar framework APIs, read the matching language file relative to the caller-provided or runtime-listed test-analysis-extensions catalog, not a skill invocation. If absent, use the framework and rules here and report the missing reference; do not search installation directories.
  • Read the complete catalog when the caller requests all 19 smells, asks for citations, or the code may contain a smell outside the high-signal set below. Do not load it for a narrow question that this file answers.

Audit Workflow

  1. Search for and read the staged tests; detect language, framework, boundaries, and integration markers. This is the first action even when no path is named.
  2. Read the tests and only verdict-changing production context.
  3. For each candidate, verify the executed check, choose the formal category, calibrate, then assign severity. Report proven non-catalog test-validity defects separately; do not relabel them as smells.
  4. Rank confirmed findings by risk of false confidence or flakiness, then by maintenance cost.
  5. Give a framework-correct replacement for each actionable finding. Never use .NET terminology or APIs in another ecosystem.

High-Signal Decisions

Evidence Academic finding Do Never
Assertion behavior changes behind if, switch, or branching loops Conditional Test Logic Split cases or parameterize them Flag table-driven or parametrized tests merely because a runner loop exists
A test relies on an undeclared file, network service, environment value, or database Mystery Guest or Resource Optimism Make the dependency explicit and hermetic; distinguish the two using the full catalog Condemn an integration test merely for exercising its declared real resource
Fixed wall-clock sleep waits for an outcome Sleepy Test Await or poll the condition with a timeout Downgrade it only because the test is an integration test
Executable test has no assertion, expected-exception marker, or mock verification Unknown Test Assert the observable outcome Call an empty body Unknown Test; the formal name is Empty Test
Async assertion/coroutine is created but not awaited or returned Critical non-catalog false-pass defect Report it separately and show the required await/return Force it into Unknown Test; the assertion statement exists
One test exercises many unrelated production behaviors Eager Test Separate behavior-focused tests Flag a deliberate end-to-end workflow without considering its scope
Expected numeric literal has no local meaning Magic Number Test Name the domain value or derive it from setup Flag count == 3 immediately after adding three items
Assertion depends on ToString, repr, description, or display formatting that is not the contract Sensitive Equality Assert stable fields or use a structural matcher Flag a test whose explicit contract is the formatted string
Test manually manages expected exception flow Exception Handling Use the framework's exception assertion and check meaningful details Claim a capture-and-assert test verifies nothing
Shared setup creates state irrelevant to the tests that receive it General Fixture Remove unused state or narrow the fixture; rank cheap state low Condemn relevant shared setup merely because it is shared
Test is disabled or skipped Ignored Test Report every skip, but rank a tracked, reasoned skip below an unexplained one Clear a skip because its reason is good, or give both the same urgency

Read the full file on GitHub · 164 lines

Files

What ships with it

2 files 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.

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. 1mo ago Changed · +2 lines ea63c61cadcd
  2. 2mo ago Changed · +5 lines 4aa11579a991
  3. 2mo ago First seen · 157 lines · 157 tokens per session scan A 04aa0b2ae942

Subscribe to this mod's changes

test-smell-detection is a skill published in the GitHub repository managedcode/dotnet-skills (527 stars, last pushed 16d ago), licensed MIT. It adds 157 tokens to every session and 2,083 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 95% identical to test-smell-detection, differing in 0 lines, and is treated as a copy.

Related

test-smell-detection compared with skills from other repositories

test-smell-detection next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-smell-detectionmanagedcode/dotnet-skillsSkill52716d agoMITA157Claude Code, Codex
windbg-kernel-lock-deadlock-triagemicrosoft/win-dev-skillsSkill52113d agoMITA56Claude Code
fuzzy-selectingSebastienDegodez/copilot-instructionsSkill19923d agoApache-2.0A25Claude Code, Codex
rust-developmentnavikt/copilotSkill65yesterdayMITA27Claude Code, Codex
spring-boot-scaffoldnavikt/copilotSkill65yesterdayMITA32Claude Code, Codex
tlc-discovertech-leads-club/agent-skillsSkill7.2k2d agononeA76Claude Code, Codex
repo-baseline-auditnavikt/copilotSkill65yesterdayMITA122Claude Code, Codex