From claude-quality
Debugs issues via 5-step process (reproduce, isolate, root cause, minimal fix, verify), provides TDD test templates, verification commands (tsc, npm test, lint), and definition-of-done checklists. Auto-triggers on bugs/errors/tests.
npx claudepluginhub bulbulogludemir/claude-code-pluginsThis skill is limited to using the following tools:
**Auto-use when:** bug, error, fix, debug, not working, broken, test, failing
Orchestrates test-driven bug-fixing: clarifies symptoms, reproduces with failing tests via project-specific SME agents, diagnoses root causes, implements fixes, verifies, and documents.
Guides test-driven development using RED-GREEN-REFACTOR cycle and Prove-It pattern for implementing logic, fixing bugs, and modifying behavior.
Suggests manual /compact at logical task boundaries in long Claude Code sessions and multi-phase tasks to avoid arbitrary auto-compaction losses.
Share bugs, ideas, or general feedback.
Auto-use when: bug, error, fix, debug, not working, broken, test, failing
Works with: All skills - final verification gate
# Create failing test or clear steps
it('should not crash with null profile', () => {
const user = { id: '1', profile: null }
expect(() => getAvatar(user)).not.toThrow()
})
# Find exact location
git log --oneline -10 -- path/to/file.ts
git blame -L 40,50 path/to/file.ts
Why crash? → profile is null
Why null? → API returns null for new users
Why not handled? → Assumed profile always exists
ROOT CAUSE: Missing null handling
// Before
return user.profile.avatar.url
// After
return user.profile?.avatar?.url ?? '/default.png'
npx tsc --noEmit # Types pass
npm test # Tests pass
# Check similar patterns in codebase
RED → Write failing test
GREEN → Minimal code to pass
REFACTOR → Clean up
P0: Happy path works
P0: Auth blocks unauthorized
P0: Ownership blocks others' data
P1: Validation rejects bad input
P1: Edge cases handled
P2: Error states work
import { describe, it, expect, vi } from 'vitest'
describe('createPost', () => {
it('creates for authenticated user', async () => {
vi.mocked(auth).mockResolvedValue({ userId: 'user-1' })
const result = await createPost({ title: 'Test' })
expect(result.authorId).toBe('user-1')
})
it('rejects unauthenticated', async () => {
vi.mocked(auth).mockResolvedValue({ userId: null })
await expect(createPost({ title: 'Test' })).rejects.toThrow('Unauthorized')
})
})
# MUST pass before "done"
npx tsc --noEmit # TypeScript
npm test # Tests
npm run lint # Lint
npm run build # Build
# Check for lazy patterns
grep -r "TODO\|FIXME" src/
grep -r ": any" src/
grep -r "console\.log" src/
grep -rE "mock|fake" src/
□ tsc --noEmit = 0 errors
□ Tests pass
□ No TODO comments
□ No any types
□ No mock data
□ No console.log
□ All UI states handled
□ Error handling present
When given a QA report, fix all issues:
npx tsc --noEmit + npm testRules: Stay scoped to report issues. Don't refactor adjacent code.
| If You See | Action |
|---|---|
TODO: | Implement now |
: any | Add types |
mockData | Wire to API |
console.log(error) | Show to user |
| Missing loading state | Add skeleton |
| Missing error state | Add error UI |
catch {} (empty) | Handle error |