/test-coverage
Analyze test coverage gaps and generate tests for uncovered code paths.
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/test-coverage
Context preview
What this command does when you run it.
Analyze test coverage gaps and generate tests for uncovered code paths.
Command definition
test-coverage.mdAnalyze test coverage gaps and generate tests for uncovered code paths.
Steps
1. Run Coverage Analysis
- Detect the test framework and run coverage:
- **JS/TS**: `npx vitest run --coverage` or `npx jest --coverage`
- **Python**: `pytest --cov=src --cov-report=term-missing`
- **Go**: `go test -coverprofile=cover.out ./... && go tool cover -func=cover.out`
- **Rust**: `cargo tarpaulin --out Stdout`
2. Identify Gaps
- List files below 80% line coverage.
- For each low-coverage file, identify:
- Uncovered branches (if/else, switch cases, error paths).
- Uncovered functions or methods.
- Edge cases not exercised (null inputs, empty collections, boundary values).
3. Prioritize
- Rank gaps by risk: business logic > data access > utilities > configuration.
- Focus on branches where bugs are most likely to hide: error handling, boundary conditions, type coercion.
4. Generate Tests
- Write tests for the highest-priority uncovered paths.
- Each test targets a specific uncovered branch or function.
- Use existing test patterns and conventions from the codebase.
- Follow the Arrange-Act-Assert structure.
5. Verify
- Re-run coverage to confirm the gaps are filled.
- Ensure no existing tests broke.
Rules
- Do not write tests purely to increase numbers. Every test must assert meaningful behavior.
- Exclude generated code, type definitions, and configuration from coverage targets.
- Target 80% line coverage and 75% branch coverage as minimums.
- If a function is genuinely untestable (e.g., thin wrappers), document why rather than writing a meaningless test.
Read more
Analyze test coverage gaps and generate tests for uncovered code paths.
Steps
1. Run Coverage Analysis
- Detect the test framework and run coverage:
- **JS/TS**: `npx vitest run --coverage` or `npx jest --coverage`
- **Python**: `pytest --cov=src --cov-report=term-missing`
- **Go**: `go test -coverprofile=cover.out ./... && go tool cover -func=cover.out`
- **Rust**: `cargo tarpaulin --out Stdout`
2. Identify Gaps
- List files below 80% line coverage.
- For each low-coverage file, identify:
- Uncovered branches (if/else, switch cases, error paths).
- Uncovered functions or methods.
- Edge cases not exercised (null inputs, empty collections, boundary values).
3. Prioritize
- Rank gaps by risk: business logic > data access > utilities > configuration.
- Focus on branches where bugs are most likely to hide: error handling, boundary conditions, type coercion.
4. Generate Tests
- Write tests for the highest-priority uncovered paths.
- Each test targets a specific uncovered branch or function.
- Use existing test patterns and conventions from the codebase.
- Follow the Arrange-Act-Assert structure.
5. Verify
- Re-run coverage to confirm the gaps are filled.
- Ensure no existing tests broke.
Rules
- Do not write tests purely to increase numbers. Every test must assert meaningful behavior.
- Exclude generated code, type definitions, and configuration from coverage targets.
- Target 80% line coverage and 75% branch coverage as minimums.
- If a function is genuinely untestable (e.g., thin wrappers), document why rather than writing a meaningless test.
The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.
Repo: rohitg00/awesome-claude-code-toolkit
Other commands on rohitg00-claude-code-toolkit.
- /adr
Write an Architecture Decision Record documenting a significant technical decision.
Open command - /design-review
Conduct a structured design review of a module, feature, or system component.
Open command - /diagram
Generate Mermaid diagrams from codebase analysis or description.
Open command - /migrate
Plan and execute a framework or library migration incrementally.
Open command - /plan
Create a structured implementation plan for the requested feature or change.
Open command - /refactor
Perform a systematic refactoring of the specified code area.
Open command

