review-tests

Reviews whether implementation changes are followed by corresponding tests and Stories in git diffs.

Updated Dec 25, 2021
One-click install
npx skills add https://github.com/kotahashihama/dotfiles --skill review-tests-kotahashihama
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-tests
Source: https://github.com/kotahashihama/dotfiles/tree/main/home/.claude/skills/review-tests
Command: npx skills add https://github.com/kotahashihama/dotfiles --skill review-tests-kotahashihama

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When committing code or opening a pull request, it is easy to forget adding tests for new logic or to accidentally remove test coverage for features that still exist. This Skill inspects your working tree or PR diff and reports whether tests (and Stories for frontend repos) properly track the implementation changes. ## Core Features & Use Cases - Test Follow-up Check: Verifies that every changed implementation file has a corresponding test, while respecting repository exemption rules and coverage already provided by higher-level integration tests. - Deletion Audit: Compares before/after test case counts with git show to confirm removed tests correspond only to removed features, and that remaining variants are still fully covered. - Story Review (frontend): Checks that Storybook stories still cover all existing UI states after changes, rather than just counting stories. - Use Case: Before creating a PR, run the check on your working tree diff to get a table of missing tests with reasons, or a clean "no gaps" confirmation with the counts verified. ## Quick Start Ask the assistant to review whether tests and Stories follow the changes in your current working tree diff before committing.

Frequently Asked Questions about review-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if my code changes have enough tests before committing?

Run the review on your working tree diff, which is the default when no target is specified. It lists changed implementation files, matches each against existing test files, and reports any gaps in a table with the file, missing test, and reason it is needed.

How to verify removed tests match removed features in a PR?

The review compares before and after test case counts using git show on the base version of each file. It confirms each removed case corresponds to deleted functionality and counts that all remaining variants, such as enum members or branches, still have tests.

Does this check work for frontend Storybook stories?

Yes, for frontend repositories it also reviews Stories, detected via the repository name or the presence of package.json without go.mod. It checks whether UI states remain covered after changes rather than simply counting stories, and skips this section entirely for non-frontend repos.

Will it automatically write the missing tests for me?

No, it only reports deficiencies and explicitly does not write tests. The output is a table of missing coverage with reasons, and it waits for your explicit instruction before any test code is created.

What if my repository has no testing conventions at all?

For repositories without a testing culture, such as infrastructure or schema-only repos, it does not force findings. It simply reports in one line that no tests exist and stops, avoiding noise in projects where tests are not expected.