Best for
- Use when the user asks to "review my tests", "check my test quality", "are these tests good enough", "review testing", or after completing a feature implementation that includes tests.
posit-dev/skills/posit-dev/review-testing/SKILL.md
Review test code for quality, design, and completeness after implementing a feature or fixing a bug. Use when the user asks to "review my tests", "check my test quality", "are these tests good enough", "review testing", or after completing a feature implementation that includes tests. Also use when tests feel brittle, flaky, or superficial. Cross-references production code to find coverage gaps.
Decision brief
Identify what to review:
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/posit-dev/skills --skill "posit-dev/review-testing"Inspect the Agent Skill "review-testing" from https://github.com/posit-dev/skills/blob/b58a92e7c479b7795f4f003490b046c01e345fce/posit-dev/review-testing/SKILL.md at commit b58a92e7c479b7795f4f003490b046c01e345fce. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Identify what to review:
The most common weakness in generated tests: asserting only the obvious output and missing the full "blast radius" of a state change.
Weigh each test against four qualities:
The most common weakness in generated tests: asserting only the obvious output and missing the full "blast radius" of a state change.
Each test should have exactly one Arrange-Act-Assert cycle. If a test acts and asserts multiple times in sequence, it's testing multiple behaviors and should be split.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 485 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
You are reviewing test code written alongside a feature implementation or bug fix. Ensure the tests are well-designed, thorough, and maintainable — not just that they pass. Tests that merely mirror implementation details create false confidence and become a maintenance burden during refactoring.
Identify what to review:
Read test files first, before production code. If you can infer the feature's requirements and edge cases from the tests alone, that's a sign the tests are well-written. If you need to read the implementation to understand what the tests are doing, that's a finding worth reporting.
Weigh each test against four qualities:
Regression protection — Does this test actually catch bugs? A test that exercises trivial code or skips complex branches protects against nothing. Check: does the test touch business-critical logic, or only verify the happy path of a simple getter?
Refactoring resilience — Will this test break when someone restructures code without changing behavior? Tests coupled to internal method names, call sequences, or private state punish every cleanup with false failures, eroding trust in the suite.
Fast feedback — Unit tests should run in milliseconds. If a test hits the filesystem, network, or database unnecessarily, that's a design issue. But don't confuse speed with value — an integration test verifying a real database query is better than a fast unit test that mocks everything and verifies nothing.
Maintainability — Can someone unfamiliar with this code read the test and understand what it verifies and why? Tests with sprawling setup, cryptic names, or deeply nested mocking fail this check.
The most common weakness in generated tests: asserting only the obvious output and missing the full "blast radius" of a state change.
When a test triggers an action, ask what else changed. If a test adds an item to a cart, does it only check the item count? Or does it also verify the price calculation, subtotal update, and that other items are unaffected?
Flag when:
Each test should have exactly one Arrange-Act-Assert cycle. If a test acts and asserts multiple times in sequence, it's testing multiple behaviors and should be split.
Flag when:
How test data is created determines whether the suite is maintainable at scale. Inline setup (data created in the test body) is fine for simple tests but painful when constructor signatures change across many tests. Implicit setup (shared beforeEach/setUp blocks) eliminates duplication but obscures what each test actually depends on. Delegated setup (factory functions or builders called explicitly) keeps tests readable while centralizing construction logic.
Flag when:
Mocks are essential for isolation, but overuse turns tests into mirrors of the implementation.
The key principle: mock at architectural boundaries, not at every function call. Use stubs (canned data) for query-type dependencies and mocks (interaction verification) only for commands with side effects like sending emails or writing to external systems.
Respect the codebase's existing mocking convention. Flag inconsistency within the project, not deviation from a universal rule.
Flag when:
| Smell | What It Looks Like | Why It Matters |
|---|---|---|
| Assertion Roulette | Multiple assertions with no failure messages | Can't tell which assertion broke without debugging |
| Eager Test | One test exercises several unrelated methods | Failures are ambiguous — which behavior broke? |
| Lazy Test | Multiple tests call the same method with identical inputs | Redundant maintenance cost, no coverage gain |
| Sleepy Test | Hard-coded sleep()/Sys.sleep()/setTimeout() | Flaky in CI, slow everywhere. Use polling or explicit waits. |
| Rotten Green | Assertions inside try/tryCatch or conditional branches | Test always passes because the assertion is never reached |
| Sensitive Equality | Asserting against toString()/print() output | Breaks on formatting changes; assert structural properties instead |
| Print Statement | print()/console.log() instead of assertions | Debugging leftovers that verify nothing |
| Snapshot Abuse | Snapshots as a substitute for behavioral assertions | Any change triggers failure, developers blindly update. Good uses: one snapshot of an HTML component's structure (not every prop combination), error message text, CLI output. Bad: snapshotting entire objects or rendering every variant. |
| Implementation Mirror | Expected values computed using the same logic as production code | Test and production code will always agree — even when both are wrong. Hardcode expected values from a known-good source. |
Test names should describe behavior, not implementation. A well-named test suite reads like a feature specification.
Flag when:
test_processData_returns_true) — break on renametest1, test_it_works, test_basic)Prefer behavioral names: test_expired_subscription_blocks_access, delivery_with_past_date_is_invalid, empty_cart_shows_zero_total.
Cross-reference production code changes against the test suite:
Walk through the implementation and note every decision point — each if, match, switch, error handler, or early return. Check whether the test suite exercises both sides of that decision.
When reviewing R tests using testthat, check if the testing-r-packages skill is available and invoke it for R-specific conventions and patterns.
## Summary
[Overall assessment: How well do these tests protect the codebase?]
## Critical Issues (Blocking)
[Tests that provide false confidence or will cause real problems.]
## Required Changes
[Design problems that weaken the test suite.]
## Strong Suggestions
[Improvements to test quality and maintainability.]
## Noted
[Minor style or convention issues. Mention once, then move on.]
## Verdict
Request Changes | Needs Discussion | Approve
## Next Steps
[Options for proceeding]
Use file:line references for every finding. Quote the specific test code that demonstrates the issue and show what better code looks like.
At the end of the review, offer the user these options:
Discuss and address findings: Use the AskUserQuestion tool to walk through the issues. Group by severity or topic, offer resolution options, and mark the recommended choice.
Fix the issues: Offer to apply fixes directly in priority order — blocking issues first, then required changes, then suggestions. Confirm before continuing after each group.
Add to a pull request: When reviewing in context of a PR, offer to post the review as a PR comment. Include attribution: "Review assisted by the review-testing skill."
If operating as a subagent, skip the next steps and output only the review findings.
Frequently asked questions
Identify what to review:
The source record exposes this install command: npx skills add https://github.com/posit-dev/skills --skill "posit-dev/review-testing". Inspect the command and pinned source before running it.
Alternatives
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
narrative-io/narrative-skills-marketplace
Translate a fuzzy analytical question into a rigorous investigation plan. Interrogates the ask, grounds the plan in the available data dictionary, applies analytical best practices, and produces a structured brief of query specifications for a downstream query-writing skill. Plans, does not write SQL. Use when: "why did X drop", "is there a relationship between A and B", "who are our highest-value customers", "what's driving the change in Y", "investigate this trend", "design an analysis for", "
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
vasilyu1983/AI-Agents-public
Consumer-neuroscience primitives for attention, arousal, bonding, narrative, memory, and reward. Use when shaping ethical UX, neuro study design, or DMCC/AI Act gates.