/josecabralf-skills:assess-testfrom josecabralf-skills
Audit existing tests for quality and for whether each should be a different type of test. Use when reviewing a PR that touches tests, when tests are flaky, brittle or slow, or when asked if a test is worth keeping or should be another type. Not for writing new tests.
Ships in josecabralf-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.
Two questions per test: is it good as what it is? and should it be a different kind of test?
Read test bodies first, and open production code only when a gate can't be judged without it. For suites over ~30 tests, assess one representative per repeated pattern and list which tests share its verdict.
Tag each test with one type. Use cheap signals (imports, fixtures, path) before reading bodies:
| Type | Signals | Reference |
|---|---|---|
| Unit (example-based) | Hard-coded inputs → expected output; in-process; doubles for I/O | references/UNIT.md |
| Property-based | hypothesis, fast-check, proptest, quickcheck, jqwik, @given, fc.assert, generators | references/PROPERTY.md |
| Integration | Real DB / queue / filesystem / HTTP server, testcontainers, app factory + test client, several real modules wired | references/INTEGRATION.md |
| System (e2e) | Playwright, Cypress, Selenium, deployed env URL, full stack driven from outside | references/SYSTEM.md |
| Model-based (stateful PBT) | Random command sequences run against the SUT and a simple data model in lockstep, with shrinking: RuleBasedStateMachine, fc.commands, proptest-state-machine, jqwik actions, QuickCheck state machines | references/MODEL-STATEFUL.md |
| Model-based (graph) | A state machine / statechart walked to generate test paths for coverage, with event executors and per-state assertions: @xstate/graph / @xstate/test (createTestModel, getShortestPaths), GraphWalker, ModelJUnit | references/MODEL-GRAPH.md |
Load only the references for types actually present. Contract and approval tests: treat as integration and unit respectively, and say so in the output.
Never judge what a run can decide. Run the tests under review once with quiet output, skip reasons and durations (e.g. pytest -q -rs --durations=20). Ask before running anything that touches shared resources, and before any system test. If you don't run them, write Status: not run.
| Status | Meaning |
|---|---|
| pass | Green. |
| broken | Collection or import error. Never executed. |
| failing | Runs, red. It may be catching a real regression, so being red is never a reason to delete. |
| env | Red only because a DB / service / credential is missing. Never merge into broken. |
| skipped-dead | The skip/xfail condition can never be true again. Zero coverage that looks green. Delete or unskip. |
| skipped-live | The skip condition is still real. Note what would re-enable it. |
| slow | Over 1s for a unit/property test, over 5s for an integration test. On a shared host, rank relatively. |
slow is added on top of pass/failing. The status is reported next to the verdict and doesn't replace it.
Worth-existing. Does the code under test make a decision, and does being right about it matter? Skip-list: getters, setters, DTOs, config, DI wiring, generated code, framework behaviour, pure delegation, properties the type checker already proves, prototypes. Fail → delete, reason tests trivial code. Stop here. A test that targets a symbol / route / schema that no longer exists also fails this gate, reason targets removed code.
Right-type. Is the question the test asks answered best by its current type? Fail → convert.
| Signal in the test | Better type |
|---|---|
| Many examples (≥5) of one rule, table-driven edge cases, hand-picked boundaries | Property-based (keep found bugs as pinned unit examples) |
| Unit test with ≥4 doubles, or assertions only on calls to collaborators | Integration |
| Integration test exercising pure logic (containers spun up, logic never touches I/O) | Unit or property-based |
| Integration test whose value is a cross-service user journey | System |
| E2E test covering a branch / validation edge case / error message | Unit or integration (keep 1 happy path e2e) |
| Unit or property test replaying a sequence of calls against a stateful object | Model-based (stateful PBT) |
| Many hand-written e2e tests walking variations of one UI or workflow state machine | Model-based (graph) |
| Model-based test on stateless code, or sequences that never matter | Property-based |
| Graph model whose bugs hide in data values, not in which transitions are taken | Model-based (stateful PBT) |
| Stateful PBT whose real risk is UI/workflow transition coverage | Model-based (graph) |
| Property test whose "property" is one fixed example | Unit |
| Test checks another team's API shape | Contract |
Name the target type, not a vague "wrong layer".
Match against references/SMELLS.md, then the loaded type reference. Pick one smell, the dominant one. No match and assertions cover the public contract → no smell.
<test name / location> [<type>]
Status: pass | broken | failing | env | skipped-dead | skipped-live | not run (+ slow)
Verdict: keep | refactor | delete | convert → <type>
Smell: <catalogue name, or —>
Next action: <one line, or —>
testDoFoo) vs. behaviour (rejects_expired_token). Method-named tests tend to break when the code is refactored.references/INTEGRATION.md (opens in a new tab)references/MODEL-GRAPH.md (opens in a new tab)references/MODEL-STATEFUL.md (opens in a new tab)references/PROPERTY.md (opens in a new tab)references/SMELLS.md (opens in a new tab)references/SYSTEM.md (opens in a new tab)references/UNIT.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (josecabralf/skills) — no native marketplace selected
npx claudepluginhub p/josecabralf-josecabralf-skills21 skills in this plugin
/assess-unit-testsDEPRECATED, use assess-test instead. Audit existing unit tests and emit one verdict per test (keep / refactor / delete / wrong-layer) with the named smell and a one-line next action. Use when reviewing a PR that touches tests, when tests are described as flaky / brittle / fragile, when asked "is this test worth keeping?", or when a test-suite audit is requested. Filters out tests that should never have existed before naming smells in the survivors. Do not use for authoring new tests, integration tests, e2e tests, property-based tests, or contract tests./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./diagnosing-bugsOther plugins' skills for the same job