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.
npx skills add managedcode/dotnet-skills --skill test-smell-detectiongit clone --depth 1 https://github.com/managedcode/dotnet-skillsWrote 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.
[](https://agentmods.dev/skills/managedcode/dotnet-skills/test-smell-detection)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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-extensionscatalog, 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
- 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.
- Read the tests and only verdict-changing production context.
- 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.
- Rank confirmed findings by risk of false confidence or flakiness, then by maintenance cost.
- 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 |
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.
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.
- 1mo ago Changed · +2 lines ea63c61cadcd
- 2mo ago Changed · +5 lines 4aa11579a991
- 2mo ago First seen · 157 lines · 157 tokens per session scan A 04aa0b2ae942
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.
test-smell-detection compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| test-smell-detectionmanagedcode/dotnet-skills | Skill | 527 | 16d ago | MIT | A | 157 | Claude Code, Codex |
| windbg-kernel-lock-deadlock-triagemicrosoft/win-dev-skills | Skill | 521 | 13d ago | MIT | A | 56 | Claude Code |
| fuzzy-selectingSebastienDegodez/copilot-instructions | Skill | 199 | 23d ago | Apache-2.0 | A | 25 | Claude Code, Codex |
| rust-developmentnavikt/copilot | Skill | 65 | yesterday | MIT | A | 27 | Claude Code, Codex |
| spring-boot-scaffoldnavikt/copilot | Skill | 65 | yesterday | MIT | A | 32 | Claude Code, Codex |
| tlc-discovertech-leads-club/agent-skills | Skill | 7.2k | 2d ago | none | A | 76 | Claude Code, Codex |
| repo-baseline-auditnavikt/copilot | Skill | 65 | yesterday | MIT | A | 122 | Claude Code, Codex |