Notre avis
Ce skill fournit un processus structuré en 5 étapes pour le débogage, ainsi que des directives pour les tests et la vérification finale de la qualité du code.
Points forts
- Approche systématique en 5 étapes (reproduire, isoler, identifier, corriger, vérifier)
- Intègre le TDD avec des priorités de test claires
- Inclut une liste de vérification 'Definition of Done' et des 'Red Flags' pour éviter les erreurs courantes
Limites
- Principalement orienté TypeScript/Node, nécessite adaptation pour d'autres langages
- Ne couvre pas le débogage avancé (profiling, mémoire, perf)
- Suppose l'utilisation d'outils spécifiques (tsc, vitest, etc.)
Utilisez ce skill lorsque vous rencontrez un bogue, une erreur, un test qui échoue, ou pour appliquer une vérification de qualité avant de déclarer une tâche terminée.
Évitez de l'utiliser pour des tâches de développement rapide sans besoin de tests formels, ou lorsque le projet n'utilise pas TypeScript ni un framework de test compatible.
Analyse de sécurité
PrudenceThe skill uses Bash for essential development tasks like running TypeScript compiler, tests, linting, and grep searches. No destructive or exfiltrating patterns are present, but the presence of Bash warrants caution.
- •Includes Bash execution capability, which could be misused if the agent runs commands beyond the specified safe ones.
Exemples
My app crashes when I try to load a user profile that has null data. Use the quality skill to debug and fix it.Write unit tests for the createPost function following TDD and the test priorities from the quality skill.Run the final verification commands from the quality skill on my src/ directory and report any issues.name: quality description: "Debug, test, verify. Auto-use for bugs, errors, testing." version: 3.0.0 allowed-tools:
- Read
- Edit
- Write
- Bash
- Grep
- Glob
Quality
Auto-use when: bug, error, fix, debug, not working, broken, test, failing
Works with: All skills - final verification gate
Debugging (5 Steps)
1. REPRODUCE
# Create failing test or clear steps
it('should not crash with null profile', () => {
const user = { id: '1', profile: null }
expect(() => getAvatar(user)).not.toThrow()
})
2. ISOLATE
# Find exact location
git log --oneline -10 -- path/to/file.ts
git blame -L 40,50 path/to/file.ts
3. IDENTIFY ROOT CAUSE
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
4. FIX (Minimal)
// Before
return user.profile.avatar.url
// After
return user.profile?.avatar?.url ?? '/default.png'
5. VERIFY
npx tsc --noEmit # Types pass
npm test # Tests pass
# Check similar patterns in codebase
Testing
TDD Flow
RED -> Write failing test
GREEN -> Minimal code to pass
REFACTOR -> Clean up
Test Priority
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
Test Template
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')
})
})
Verification Commands
# 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/
Definition of Done
[] 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
Red Flags (STOP)
| 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 |
TDD Red-Green-Refactor
Testing
Skill qui guide Claude a travers le cycle TDD complet.
Audit d'Accessibilité Web
Testing
Réalise un audit d'accessibilité web complet selon les normes WCAG.
Générateur de Tests UAT
Testing
Génère des cas de test d'acceptation utilisateur structurés et complets.