Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

assertion-quality

БесплатноБез исполняемых скриптовНе проверен

Analyze weak, shallow, trivial, self-referential, assertion-free, or presence-only assertions; Contains fragments or totals replacing predictable generated…

dotnetот dotnet★ 6 430 звёзд на GitHub1 установка в других каталогах

Об этом скилле

Assertion Quality Analysis

Analyze whether assertions reject wrong observable outcomes, not merely whether they use varied APIs. Prioritize incomplete checks of predictable output, then assertion-free and vacuous tests. A single exact comparison can fully protect a contract; many fragment checks can leave most of it unprotected. Report diversity metrics only when they help explain a behavioral gap or the caller requests them.

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.

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

When Not to Use

  • User wants to write new tests (use code-testing for any language, or writing-mstest-tests for MSTest specifically)
  • User wants to detect anti-patterns beyond assertions (use test-anti-patterns)
  • User wants to fix or rewrite assertions (use writing-mstest-tests for MSTest or code-testing for other frameworks)
  • User asks about code coverage percentages (out of scope — this analyzes assertion quality, not line coverage)

Inputs

Input Required Description
Test code Yes One or more test files or a test project directory to analyze
Production code No Discover the relevant producer, fixtures, and assertion helpers in the requested scope to establish what output is predictable

Workflow

Step 1: Detect language and load extension

Identify the language and test framework. Read the corresponding file in extensions/ relative to the supplied test-analysis-extensions catalog. Use that catalog for other language filenames. Check only that known directory when necessary; an unavailable reference changes the evidence limit, not the workspace root or the requested review.

Step 2: Gather the test code

Read all test files the user provides. If the user points to a directory or project, scan for all test files using the markers in the language extension file (e.g., [TestMethod] for MSTest, def test_* for pytest, it() / test() for Jest, func TestXxx for Go).

Inventory every in-scope method before triage. For supplied files, account for each method as weak, meaningful, intentionally partial, or unassessed with a reason. Do not silently drop diagnostic or summary tests because the request's area label emphasizes another output. An exact check of a test-local literal or collection is not production verification; trace the asserted value to the producer before crediting it.

Step 3: Classify every assertion

First check predictable-output completeness

For output-focused tests, read the full body, setup/input, producer, and assertion helpers before counting assertion categories. Inspect nearby tests for existing exact-output or parsing helpers, but never credit their assertions to the weak test. Treat searches for Contains, substring membership, regexes, Any, or totals as candidates, not findings.

Establish the test's claimed contract and independently expected output. Ask whether a wrong output can preserve every checked fragment or aggregate while breaking that contract. Check content, cardinality, duplicates, ordering when promised, and association with the correct test/provider/stream. A count plus membership checks is not enough if duplicates or substituted records still pass.

Output under test Defect fragment/aggregate checks can miss Focused repair
Generated source or registry Extra/duplicate registrations, missing surrounding syntax, wrong registration target Compare the complete expected generated source, preferably a raw string or existing approved snapshot. Assert the full generated-file set when claimed; compilation/diagnostics complement but do not replace content checks.
JSON embedded in HTML or a report A matching fragment inside unrelated text; correct totals with results assigned to the wrong test Extract the intended payload with the repository helper, parse JSON, and compare the complete stable structure: result identities, outcomes, counts, and unexpected entries. Do not substring-search JSON or depend on property order.
CLI --info or provider listings Correct lines under the wron
Полный SKILL.md на GitHub

Установить assertion-quality в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл assertion-quality?

Analyze weak, shallow, trivial, self-referential, assertion-free, or presence-only assertions; Contains fragments or totals replacing predictable generated code, JSON, CLI, report, or protocol output. Supports MSTest, Jest, pytest, and Go. DO NOT USE for direct assertion fixes (writing-mstest-tests for MSTest, code-testing for other frameworks), new cases (code-testing), missing scenarios or identified production changes (test-gap-analysis), or general severity-ranked audits (test-anti-patterns).

Как установить скилл assertion-quality?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл assertion-quality запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить assertion-quality с