tdd
Test-Driven Development
Collaborating skills
- Refactor: skill:
refactorfor systematic code improvement during the refactor phase - Vitest: skill:
vitestfor JavaScript/TypeScript testing with Vitest framework - Design Patterns: skill:
design-pattern-adopterfor applying design patterns when refactoring test-covered code
Guide for Red-Green-Refactor workflow. Supports Python (pytest) and Ruby (RSpec).
Quick Reference
| Python (pytest) | Ruby (RSpec) | |
|---|---|---|
| Naming | test_<fn>_<scenario>_<expected> |
describe ".method" / "#method" |
| Structure | Mirror src/ in tests/ |
One expectation per it |
| Data | @pytest.fixture + type hints |
let / let! |
| Variants | @pytest.mark.parametrize |
context blocks |
| Exceptions | pytest.raises(Error, match=) |
expect { }.to raise_error |
More from mguinada/ai-coding-toolkit
refactor
TDD-based code refactoring preserving behavior through tests. Use Red-Green-Refactor cycles to apply refactoring patterns one test-verified change at a time. **TRIGGERS**: 'clean up code', 'make code simpler', 'reduce complexity', 'refactor this', 'apply DRY', 'extract method', 'remove duplication'. **DISTINCT FROM**: Adding features (use /tdd) or fixing bugs. **PROACTIVE**: Auto-invoke when test-covered code has complexity (functions >50 lines, high cyclomatic complexity, duplication).
1ai-engineering
Build AI agents and agentic workflows. Use when designing/building/debugging agentic systems: choosing workflows vs agents, implementing prompt patterns (chaining/routing/parallelization/orchestrator-workers/evaluator-optimizer), building autonomous agents with tools, designing ACI/tool specs, or troubleshooting/optimizing implementations. **PROACTIVE ACTIVATION**: Auto-invoke when building agentic applications, designing workflows vs agents, or implementing agent patterns. **DETECTION**: Check for agent code (MCP servers, tool defs, .mcp.json configs), or user mentions of \"agent\", \"workflow\", \"agentic\", \"autonomous\". **USE CASES**: Designing agentic systems, choosing workflows vs agents, implementing prompt patterns, building agents with tools, designing ACI/tool specs, troubleshooting/optimizing agents.
1design-pattern-adopter
|
1