nairon-ai/flux/flux-tdd
Claude Code and agent skill by nairon-ai/flux
- community
Checking that the SKILL.md file is still in the repository.
Test-driven development with red-green-refactor vertical slices. Use when implementing features or fixes TDD-style, when user says "TDD", "test first", "red green refactor", or wants to build a feature one test at a time. Triggers on literal `/flux:tdd`. Works standalone or inside /flux:work.
Install
npx vskill@latest install nairon-ai/flux/flux-tddSKILL.md
The same SKILL.md was published earlier as nairon-ai/flux/flux-tdd.
TDD — Test-Driven Development
Build features and fix bugs one vertical slice at a time: write ONE test (RED), write minimal code to pass (GREEN), repeat. Refactor only after all tests pass.
"Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't."
IMPORTANT: This plugin uses .flux/ for ALL task tracking. Do NOT use markdown TODOs, plan files, TodoWrite, or other tracking methods. All task state must be read and written via fluxctl.
CRITICAL: fluxctl is BUNDLED — NOT installed globally. which fluxctl will fail (expected). Always use:
Session Phase Tracking
On entry, set the session phase:
On completion, reset:
Agent Compatibility: This skill works across Codex, OpenCode, and legacy Claude environments. See agent-compat.md for tool differences.
Question Tool: Use the appropriate tool for your agent:
- Claude:
AskUserQuestion - OpenCode:
mcp_question - Codex:
AskUserTool - Other: Output question as text, wait for response
Input
Full request: $ARGUMENTS
Anti-Pattern: Horizontal Slices
DO NOT write all tests first, then all implementation. This produces bad tests:
- Tests written in bulk test imagined behavior, not actual behavior
- You test the shape of things (data structures, function signatures) rather than user-facing behavior
- Tests become insensitive to real changes — they pass when behavior breaks, fail when behavior is fine
Workflow
1. Planning
Before writing any code:
- Confirm with user what interface changes are needed
- Confirm which behaviors to test (prioritize — you can't test everything)
- Look for opportunities to build deep modules (small interface, deep implementation)
- Design interfaces for testability
- List the behaviors to test (not implementation steps)
- Get user approval on the plan
Ask: "What should the public interface look like? Which behaviors are most important to test?"
2. Tracer Bullet
Write ONE test that confirms ONE thing about the system:
This proves the path works end-to-end.
3. Incremental Loop
For each remaining behavior:
Rules:
- One test at a time
- Only enough code to pass current test
- Don't anticipate future tests
- Keep tests focused on observable behavior
4. Refactor
After all tests pass, look for refactor candidates:
- Extract duplication
- Deepen modules (move complexity behind simple interfaces)
- Apply SOLID principles where natural
- Consider what new code reveals about existing code
Never refactor while RED. Get to GREEN first.
Per-Cycle Checklist
When to Mock
Mock at system boundaries only:
- External APIs (payment, email, etc.)
- Databases (prefer test DB when possible)
- Time/randomness
- File system (sometimes)
Don't mock:
- Your own classes/modules
- Internal collaborators
- Anything you control
See references/mocking.md for patterns.
Update Check (End of Command)
ALWAYS run at the very end of /flux:tdd execution:
If update available, append to output:
If no update: Show nothing (silent).
Gotchas
- If the project has no test runner configured, detect and set up vitest/jest/pytest before starting.
- Vertical slicing feels slow at first — that's the point. Each test responds to what you learned from the previous cycle.
- "Write minimal code" means minimal. Don't add error handling, validation, or edge cases until a test demands them.
- If a test is hard to write, the interface is probably wrong. Redesign the interface, don't force the test.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/flux-tdd/SKILL.md
Popularity
- Repository stars
- 7
- Repository forks
- 1
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 10 Oct 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nairon-ai/flux/flux-tdd)