From project-plugin
Automates TDD loop: detects test commands for Node.js/Python/Rust/Go, runs tests, applies minimal fixes to failures, refactors clean code while keeping tests green.
How this skill is triggered — by the user, by Claude, or both
Slash command
/project-plugin:project-test-loophaikuThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run automated TDD cycle: test → fix → refactor.
Run automated TDD cycle: test → fix → refactor.
Note: Configure project-specific test/build commands in CLAUDE.md or .claude/rules/ for automatic detection.
Steps:
Detect test command (if not already configured):
package.json for scripts.test (Node.js)pytest or python -m unittest (Python)cargo test (Rust)go test ./... (Go)Makefile for test targetRun test suite:
# Run detected test command
[test_command]
Analyze results:
If tests FAIL:
If tests PASS:
Repeat until:
OR stop if:
Report results:
🧪 Test Loop Results:
Cycles: [N] iterations
Fixes Applied:
- [Fix 1]: [Brief description]
- [Fix 2]: [Brief description]
Refactorings Performed:
- [Refactor 1]: [Brief description]
- [Refactor 2]: [Brief description]
Current Status:
✅ All tests pass
✅ Code refactored
📝 Ready for commit
OR
⚠️ Blocked: [Reason]
📝 Next steps: [Recommendation]
TDD Cycle Details:
Common Failure Patterns:
Pattern: Missing Implementation
undefined is not a function, NameError, etc.Pattern: Wrong Return Value
Expected X but got YPattern: Missing Edge Case
Pattern: Integration Issue
Refactoring Opportunities:
Look for:
Don't:
Auto-Stop Conditions:
Stop and report if:
Integration with Blueprint Development:
This command applies project-specific skills:
npx claudepluginhub laurigates/claude-plugins --plugin project-pluginEnforces a red-green-refactor TDD cycle with automated test runs. Use when implementing, fixing, or refactoring behavior in codebases that already have tests.
Enforces the Red-Green-Refactor TDD cycle when implementing features or bugfixes. Routes to test quality guidance, rationalization handling, worked examples, or stuck-state recovery.