/unity-coding-skills:measure-spec-coverage <specification document path or URL>from unity-coding-skills
Measures specification coverage by modeling a spec document into coverage items and checking which are verified by tests marked with `// Test-basis:` comments. Use when asked how well a specification is tested or which behaviors lack test coverage.
Ships in unity-coding-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Measures how much of one specification document the tests verify, and lists the coverage items no test verifies.
The test analysis and test design knowledge lives in the test-designing-guide skill; this skill defines the procedure.
Take the specification document from the specification document path or URL argument: any document that states specifications, e.g., a requirements document, design docs, or an ADR, as a file path or a URL (e.g., an issue, a wiki page, or a Google Docs document).
If it is omitted or names neither a file nor a URL, use AskUserQuestion to ask the user for it.
If it names a test design document — a document whose ## <test class> sections hold ### Test basis, as the design-tests skill outputs it — do not measure it: its test cases are derived from the specifications, so measuring against it checks the tests only against the test design, and misses the specifications the test design left out.
Tell the user so, name the test bases it lists as the documents to pass instead, and stop.
Read a URL yourself and treat what you read as the specification document, since a subagent may lack the credentials to read it.
Read it with the access the user set up, e.g., an MCP server or a CLI of the service (gh issue view <URL> --comments for GitHub Issues).
For an issue, read its comments as well as its body: the comments often revise the body.
In this skill, the terms mean:
// Test-basis: <path or URL> line.
The test bases may be outdated or incomplete: use them only to find tests, never to judge what a test covers.Load the test-designing-guide skill — do not rely on automatic skill triggering — and extract the test targets from the specification document per its test analysis resource.
Counting a specification in two targets would count its coverage items twice, and counting one the resource leaves out would lower the coverage for tests that should not exist.
Measure each test target in its own general-purpose subagent, launched in parallel, so that the model and the test code of one target stay out of the others' context.
Before launching them, list the test files that name the specification document with ${CLAUDE_SKILL_DIR}/scripts/find_test_files.sh <specification document path or URL>: it prints the path of each .cs file with a // Test-basis: line naming the document, one per line, searching each repository level from the document's own repository, or for a URL from the current directory's repository, up to its superprojects, and exits with code 3 when none has one.
On exit code 3, proceed with an empty list: a project whose tests predate the // Test-basis: lines still has tests, and item 4 below finds them by name.
Give each subagent the test target with its assigned specifications, the constraints on its master data records if the test analysis recorded any with it, the list of test files, and the definitions of coverage item and test basis above, and instruct it to:
test-designing-guide skill — do not rely on automatic skill triggering — and model the target's specifications with the Test Techniques of its test design resource, with equivalence partition coverage as the test selection criterion of equivalence partitioning, reading the resource of each technique applied, into a list of coverage items.
List apart, as untestable, each coverage item whose test case would be unverifiable, undefined, or ambiguous.
List apart also, as specification issues, the other issues the Assessment of the test design resource records, each with its proposed remedy and, for a contradiction, the modeling result that reveals it, but without the Assessment's label.
Finish the list before reading any test code[Ignore]<ClassName>Test, and check it off the same way: a test without the // Test-basis: line still verifies the coverage item.
Mark each test class found only this way| Coverage item | Technique | Verified by |, with <TestClass>.<TestMethod> or — in the last column — followed by the untestable coverage items, the specification issues, and the test classes marked in item 4Report to the user in the conversation:
// Test-basis: line: suggest adding // Test-basis: <path> to their files, so that the next run finds them directlyThe coverage items depend on the modeling of each run: compare the unchecked coverage items between runs, not the percentages.
What SKILL.md sets; muted values are Claude Code's defaults
12 skills in this plugin
/code-writing-guideProvides coding guidelines for Unity projects. Make sure to use this skill whenever writing, creating, editing, or modifying code files. This includes implementing new features, fixing bugs, refactoring, adding tests, or any task that results in code changes. Even for small edits or one-line fixes, load this skill to ensure project conventions are followed./design-testsDesigns tests from a specification, whatever document states it — a requirements document, design docs, or an ADR: extracts the test targets, then creates test cases for each target at the test level of its subject — e.g., integration tests for a scene or prefab, unit tests for a class's API. Use this skill whenever the specification is settled and the next step is to design the tests./npx claudepluginhub nowsprinting/unity-coding-skills --plugin unity-coding-skillsOther plugins' skills for the same job