test_driven_agent
π―Skillfrom cityfish91159/maihouses
Enforces rigorous test-driven development by guiding developers through systematic test creation, implementation, and continuous verification across happy, sad, and edge case scenarios.
Installation
npx skills add https://github.com/cityfish91159/maihouses --skill test_driven_agentSkill Details
An advanced testing protocol that enforces TDD (Test Driven Development) and self-healing tests.
Overview
# Test Driven Agent Protocol
1. The Red-Green-Refactor Cycle
- Red: Write a test that fails (demonstrating the bug or missing feature).
- Agent Note: If fixing a bug, YOU MUST reproduce it with a test first.
- Green: Write the minimal code to pass the test.
- Refactor: Clean up the code while ensuring tests still pass.
2. Test Coverage Requirements
- Happy Path: The "standard" usage case.
- Sad Path: Error states, network failures, invalid inputs.
- Edge Cases: Empty lists, max values, concurrent actions.
3. Self-Healing Mandate
If a test fails after your changes:
- DO NOT delete the test.
- DO NOT comment out the assertion.
- DO NOT change the test expectation to match the buggy result (unless the spec changed).
- DO: Fix the implementation logic until the test passes.
4. Integration vs Unit
- Unit: Mock external dependencies (Supabase, API). Fast, isolated.
- Integration: Test the hook or service with realistic (mocked) data flows.
5. Verification Checklist
- [ ] Did I write a test case for this requirement?
- [ ] Did I run
npm test? - [ ] Did I check specifically for regression in related headers/components?
More from this repository10
Enforces comprehensive testing by mandating tests for every code change, bug fix, and new feature implementation.
read-before-edit skill from cityfish91159/maihouses
Enforces architectural best practices by guiding developers to think systematically about data flow, component boundaries, and scalability before writing code.
Enforces strict Row Level Security (RLS) policies in Supabase, mandating default-deny access and comprehensive security checks.
Validates and sanitizes backend API inputs, preventing injection attacks and ensuring robust data integrity across server-side endpoints
Validates TypeScript/React code quality for maihouses projects, ensuring adherence to CLAUDE.md standards through comprehensive automated checks.
Checks and fixes TypeScript type errors by identifying, analyzing, and resolving type mismatches across project files.
Enforces strict React performance guidelines by policing re-renders, optimizing bundle size, and preventing performance bottlenecks.
Maintains a persistent memory file to track project context, architecture, issues, and operational rules across AI agent sessions.
pre-commit-validator skill from cityfish91159/maihouses