doc-detective/.github/tdd-coverage
Claude Code and agent skill by doc-detective/.github
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install doc-detective/.github/tdd-coverageSKILL.md
TDD and Coverage Skill
Type: Rigid (follow exactly)
When to Use
Use this skill when:
- Creating new functionality
- Modifying existing code
- Fixing bugs
- Refactoring
Mandatory Process
1. Test First (TDD)
Before writing or modifying any implementation code:
- Write the test(s) that describe the expected behavior
- Run the test - it should FAIL (red)
- Write the implementation to make the test pass
- Run the test - it should PASS (green)
- Refactor if needed, keeping tests passing
2. Coverage Verification
After any code change:
Coverage must not decrease. If ratchet check fails:
- Add tests for uncovered code
- Re-run coverage until ratchet passes
3. Coverage Thresholds
Current thresholds are in coverage-thresholds.json. These values must only increase:
| Metric | Threshold | |
|---|---|---|
| Lines | 100% | |
| Statements | 100% | |
| Functions | 100% | |
| Branches | 100% |
4. Test Location
| Code | Test File | |
|---|---|---|
src/validate.js | test/validate.test.js | |
src/resolvePaths.js | test/resolvePaths.test.js | |
src/files.js | test/files.test.js | |
| Schema validation | test/schema.test.js |
5. Test Structure Pattern
6. Checklist
Before completing any code change:
- [ ] Tests written BEFORE implementation (or for existing code: tests added)
- [ ] All tests pass (
npm test) - [ ] Coverage hasn't decreased (
npm run test:coverage:ratchet) - [ ] New code has corresponding test coverage
- [ ] Error paths are tested (not just happy paths)
Commands Reference
Common Patterns
Testing async functions
Mocking with Sinon
Testing error handling
Testing transformations
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcommon/.claude/skills/tdd-coverage/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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/doc-detective/.github/tdd-coverage)