thoreinstein/agents/add-test-coverage
Claude Code and agent skill by thoreinstein/agents
- community
Checking that the SKILL.md file is still in the repository.
Analyze git HEAD commit changes and implement comprehensive test coverage. Supports unit tests, integration tests, and E2E tests. Automatically detects language and testing frameworks from the repository.
Install
npx vskill@latest install thoreinstein/agents/add-test-coverageSKILL.md
Add Test Coverage
Analyze the most recent commit (HEAD) and implement all tests required to cover new and modified code.
When to Use This Skill
- After completing a feature or fix, to ensure adequate test coverage before merge
- When a commit introduces new functions, methods, or API endpoints
- When modifying existing behavior that may not have sufficient tests
- During code review when test coverage gaps are identified
Workflow
Phase 1: Change Analysis
- Identify changes in the latest commit:
- Diff HEAD against its parent (HEAD~1), or against the appropriate base branch if more accurate
- Classify each changed file by type based on file extensions and project structure:
- Backend code (e.g.,
.go,.py,.java,.rb) - Frontend code (e.g.,
.js,.ts,.jsx,.tsx,.vue,.svelte) - Integration/API surfaces (e.g., handlers, controllers, routes)
- Config, infrastructure, or test-only changes
- For each changed area, determine:
- What behavior was added or modified
- Which existing tests (if any) already cover this behavior
- Where new or expanded tests are needed
Phase 2: Test Plan Design
Draft a concrete test plan for this commit:
- Scenarios to cover:
- List specific behaviors that need tests
- Identify edge cases and error conditions
- Test layers to use:
- Unit tests for individual functions/methods
- Integration tests for cross-component behavior
- E2E tests for user-visible flows (if applicable)
- Test dependencies:
- Required fixtures, mocks, or test data
- Any setup/teardown requirements
- Prioritization criteria:
- Safety-critical paths
- Public/externally visible behavior
- Complex logic and branching
- Previously under-tested areas
Phase 3: Test Implementation
Implement the tests specified in your plan:
- Follow existing conventions:
- Use existing test directories and naming patterns
- Reuse shared test utilities and helpers
- Match the style of existing tests in the repository
- Test quality standards:
- Each test should be focused on a single behavior
- Tests must be deterministic (no flaky tests)
- Tests should be readable and self-documenting
- Include clear assertion messages
Phase 4: Execution and Refinement
- Incremental testing:
- Run only the relevant tests while developing
- Use focused test commands (specific packages, files, or test names)
- Validation:
- Once confident, run a broader test subset to check for regressions
- Ensure all new tests pass consistently
- Failure diagnosis:
- If tests fail, prefer fixing implementation bugs exposed by the tests
- Only adjust tests when they don't match the correct intended behavior
Phase 5: Summary
Produce a concise summary including:
- Which files changed in the commit
- What tests were added or modified (by file and purpose)
- What behaviors are now covered that were not before
- The exact commands to run the relevant test suites
Constraints
- Do not remove or disable existing tests unless clearly invalid; explain any such changes
- Do not introduce new frameworks or major structural changes; work within the existing test stack
- Keep changes tightly scoped to covering the latest commit's behavior, not the entire repository
Examples
Example: New HTTP Handler in Go
Commit changes: Added internal/api/users.go with a CreateUser handler
Phase 1 output:
Phase 2 output:
Phase 3 output:
Phase 5 summary:
Begin by performing the diff-based analysis for HEAD and drafting the test plan before writing or modifying any tests.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/add-test-coverage/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thoreinstein/agents/add-test-coverage)