← Back to list

vibeflow-tdd
by mizkun
⭐ 1🍴 0📅 Jan 3, 2026
SKILL.md
name: vibeflow-tdd description: Execute TDD Red-Green-Refactor cycle. Use when implementing features with test-driven development.
VibeFlow TDD Cycle
When to Use
- When implementing new features
- When fixing bugs with regression tests
- When refactoring with test coverage
The Red-Green-Refactor Cycle
Phase 1: Red (Write Failing Tests)
Goal: Define expected behavior through tests that don't pass yet.
- Read the issue file and acceptance criteria
- Create test files:
- Unit tests:
tests/orsrc/**/__tests__/ - Integration tests:
tests/integration/ - E2E tests:
e2e/ortests/e2e/
- Unit tests:
- Write tests that define expected behavior
- Run tests and confirm they fail (RED)
- Commit:
test: Add failing tests for <feature>
Checklist:
- Tests cover all acceptance criteria
- Tests cover edge cases
- Tests are independent (no shared state)
- Test names are descriptive
Phase 2: Green (Make Tests Pass)
Goal: Write minimal code to pass all tests.
- Write the simplest code that makes tests pass
- Run tests after each small change
- Do NOT over-engineer at this stage
- Do NOT add features not covered by tests
- Commit:
feat: Implement <feature>
Checklist:
- All tests pass (GREEN)
- No new tests added in this phase
- Implementation is minimal
Phase 3: Refactor (Improve Code Quality)
Goal: Improve code structure while keeping tests green.
- Identify code smells:
- Duplication
- Long functions
- Poor naming
- Missing abstractions
- Make one refactoring change at a time
- Run tests after EVERY change
- Keep tests GREEN throughout
- Commit:
refactor: Improve <feature> code structure
Checklist:
- All tests still pass
- Code is DRY (Don't Repeat Yourself)
- Functions are small and focused
- Names are clear and descriptive
- No dead code
Common Test Patterns
Unit Test Pattern
describe('<Component/Function>', () => {
it('should <expected behavior> when <condition>', () => {
// Arrange
// Act
// Assert
});
});
Edge Cases to Consider
- Empty inputs
- Null/undefined values
- Boundary values
- Error conditions
- Concurrent operations
Examples
- "Implement user login with TDD"
- "Add validation with TDD cycle"
- "Refactor payment module keeping tests green"
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon