jest-coverage
Installation
SKILL.md
Jest Coverage
Determine whether the current React branch has enough Jest coverage to support a PR. Treat coverage as an evidence-gathering task: do not modify source, tests, configuration, lockfiles, generated reports, or dependencies.
1. Confirm the project and inputs
- Find the nearest
package.jsonthat owns the current workspace. Confirm that it is a React project by checking its dependencies or devDependencies forreactorreact-dom.- In a monorepo, identify every affected package from the changed paths. Assess each affected React package with its own config, scripts, lockfile, and coverage report. A package with no usable coverage command is
BLOCKED; do not silently omit it.
- In a monorepo, identify every affected package from the changed paths. Assess each affected React package with its own config, scripts, lockfile, and coverage report. A package with no usable coverage command is
- Read the repository instructions that apply to testing, including
AGENTS.md,CONTRIBUTING.md, and local agent instructions when present. Follow their commands and restrictions. - Inspect
git status --shortand the branch history. Include both committed and uncommitted work:- For committed branch changes, compare
HEADwith the merge base of the current branch and its default branch. - Include staged and unstaged changes in the working tree.
- If the default branch or merge base cannot be determined, ask for a base ref or report
BLOCKED; do not guess.
- For committed branch changes, compare
- Accept an explicit base ref or target percentage from the user when supplied. Otherwise infer both from the repository.
- If there are no committed, staged, or unstaged source changes and the user did not provide an explicit base ref or file scope, stop with
BLOCKED. State that this skill requires a change scope and show how to provide one.
If the repository is not a React project, or Jest and a usable coverage command are absent, stop with BLOCKED and explain the exact prerequisite that is missing.