assertion-quality

assertion-quality is a skill for Claude Code, Codex from managedcode/dotnet-skills. It costs 114 tokens per session (4,325 once invoked), scanned A, a copy of assertion-quality, MIT.

A test-analysis tool that examines how varied and meaningful existing assertions are. Assertions are checks in a test that verify whether the code behaved correctly.

In plain words
What is it for?
Reviewing assertion quality, finding trivial or always-true checks, and measuring whether tests cover outputs, errors, state changes, side effects, and invariants.
Why use it?
Tests can pass while checking only that a value exists or matches one simple result. This report reveals shallow tests and areas where important behavior is not being checked.

Skill for Claude CodeCodex

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

Good fit Reviewing assertion quality, finding trivial or always-true checks, and measuring whether tests cover outputs, errors, state changes, side effects, and invariants.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/managedcode/dotnet-skills/assertion-quality
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 assertion-quality
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 assertion-quality

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/managedcode/dotnet-skills/assertion-quality"><img src="https://agentmods.dev/badge/skills/managedcode/dotnet-skills/assertion-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,325 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 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.00114 $0.04325
Opus 5.5 $0.00046 $0.01730
Sonnet 5.5 $0.00023 $0.00865
Haiku 4.5 $0.00011 $0.00432

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

Security

Grade A, and why

assertion-quality 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

91% identical to assertion-quality — 184 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/assertion-quality/SKILL.md · 215 lines

How it starts

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

Assertion Diversity Analysis

Analyze test code in any supported language to measure how varied and meaningful the assertions are. Produce a metrics report that reveals whether tests verify different facets of correctness — not just "output equals X" but also structure, exceptions, state transitions, side effects, and invariants.

Language-specific guidance: Read the caller-provided or runtime-listed test-analysis-extensions catalog, then its matching language file (dotnet.md, python.md, typescript.md, go.md, etc.). test-analysis-extensions is reference-only; do not invoke it as a skill. If the bundle is absent, use the pinned framework and this skill's rules, report the missing reference, and do not search installation directories.

Why Assertion Diversity Matters

Low assertion diversity signals shallow testing. Tests may pass while bugs hide in unasserted logic. Common symptoms:

Problem Symptom Consequence
Trivial assertions Test contains only Assert.IsNotNull(result) / assert result is not None / expect(x).toBeDefined() Test passes but doesn't verify correctness
Single-value obsession Always check one field or return value Bugs in unasserted logic slip through
No negative assertions Never check what shouldn't happen Regressions sneak in through false positives
No state checks Don't verify object state changes Missed side-effects or lifecycle issues
No structural checks Only assert top-level value Bugs in nested objects go unnoticed
Assertion-free tests Tests that call but don't verify Code coverage lies; false security

When to Use

  • User asks to evaluate assertion quality or depth
  • User asks "are my tests actually testing anything meaningful?"
  • User wants to know if test assertions are too shallow or trivial
  • User asks for assertion coverage metrics or diversity analysis
  • User suspects tests give false confidence despite passing
  • The test-engineer agent (or any test-generation workflow) calls this skill as a pre-completion self-review step on freshly generated tests, before declaring the run finished

Read the full file on GitHub · 215 lines

Files

What ships with it

1 file 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 · +9 lines 6c6cc5d4646a
  2. 1mo ago Changed · -1 tokens per session e2be84298f30
  3. 2mo ago Changed · +9 lines · +24 tokens per session 4c895a35d9f9
  4. 2mo ago First seen · 197 lines · 91 tokens per session scan A c5baee57d3f2

Subscribe to this mod's changes

assertion-quality is a skill published in the GitHub repository managedcode/dotnet-skills (527 stars, last pushed 16d ago), licensed MIT. It adds 114 tokens to every session and 4,325 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to assertion-quality, differing in 184 lines, and is treated as a copy.

Related

assertion-quality compared with skills from other repositories

assertion-quality next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
assertion-qualitymanagedcode/dotnet-skillsSkill52716d agoMITA114Claude Code, Codex
rust-developmentnavikt/copilotSkill65yesterdayMITA27Claude Code, Codex
infra-testsrnichols/plan-forgeSkill625d agoMITA43Claude Code
test-sweepsrnichols/plan-forgeSkill625d agoMITA38Claude Code
precommitsd0xdev/sd0x-harnessSkill1965d agoMITA15Claude Code
loom-ccosmix/loomSkill66todayMITA25Claude Code, Codex
finding-filesSebastienDegodez/copilot-instructionsSkill19923d agoApache-2.0A28Claude Code, Codex