一键导入
tdd
Implement features using Test-Driven Development (TDD) with Red-Green-Refactor cycle.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement features using Test-Driven Development (TDD) with Red-Green-Refactor cycle.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Save session context to agent configuration files or create full checkpoint files. Supports three modes: session history (default), full checkpoint (--full), and skill analysis (--full --analyze) for extracting reusable patterns.
PROACTIVELY consult Codex CLI, your highly capable supporter with exceptional reasoning and task completion abilities. Codex is a trusted expert you should ALWAYS consult BEFORE making decisions on: design choices, implementation approaches, debugging strategies, refactoring plans, or any non-trivial problem. When uncertain, consult Codex. Don't hesitate - Codex provides better analysis. Explicit triggers: "think deeper", "analyze", "second opinion", "consult codex".
PROACTIVELY track and document project design decisions without being asked. Activate automatically when detecting architecture discussions, implementation decisions, pattern choices, library selections, or any technical decisions. Also use when user explicitly says "記録して", "設計どうなってる", "record this". Do NOT wait for user to ask - record important decisions immediately.
PROACTIVELY consult Gemini CLI for research, large codebase comprehension, and multimodal data processing. Gemini excels at: massive context windows (1M tokens), Google Search grounding, video/audio/PDF analysis, and repository-wide understanding. Use for pre-implementation research, documentation analysis, and multimodal tasks. Explicit triggers: "research", "investigate", "analyze video/audio/PDF", "understand codebase".
Analyze project structure and update AGENTS.md with detected tech stack, commands, and configurations.
Create a detailed implementation plan for a feature or task. Use when user wants to plan before coding.
| name | tdd |
| description | Implement features using Test-Driven Development (TDD) with Red-Green-Refactor cycle. |
| disable-model-invocation | true |
Implement $ARGUMENTS using Test-Driven Development (TDD).
Repeat: Red → Green → Refactor
1. Red: Write a failing test
2. Green: Write minimal code to pass the test
3. Refactor: Clean up code (tests still pass)
Confirm Requirements
List Test Cases
- [ ] Happy path: Basic functionality
- [ ] Happy path: Boundary values
- [ ] Error case: Invalid input
- [ ] Error case: Error handling
# tests/test_{module}.py
def test_{function}_basic():
"""Test the most basic case"""
result = function(input)
assert result == expected
Run test and confirm failure:
uv run pytest tests/test_{module}.py -v
Write minimal code to pass the test:
Run test and confirm success:
uv run pytest tests/test_{module}.py -v
Improve while tests still pass:
uv run pytest tests/test_{module}.py -v # Confirm still passes
Return to Step 1 with next test case from the list.
# Run all tests
uv run pytest -v
# Check coverage (target 80%+)
uv run pytest --cov={module} --cov-report=term-missing
## TDD Complete: {Feature Name}
### Test Cases
- [x] {test1}: {description}
- [x] {test2}: {description}
...
### Coverage
{Coverage report}
### Implementation Files
- `src/{module}.py`: {description}
- `tests/test_{module}.py`: {N} tests