بنقرة واحدة
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when implementing any feature or bugfix, before writing implementation code
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Explore ideas and create designs before implementation
Use when about to claim work is complete or before committing - enforces verification and proposes a commit
Fetch current library and framework documentation from Context7 instead of relying on training data
Use when you have a written implementation plan to execute - direct execution by default, subagents for complex tasks
Use when encountering any bug, test failure, or unexpected behavior — find root cause before proposing any fix
Use when starting substantive work to choose the right workflow skill without adding unnecessary ceremony to trivial interactions
| name | test-driven-development |
| description | Use when implementing any feature or bugfix, before writing implementation code |
| license | MIT |
| compatibility | opencode |
| metadata | {"category":"development-process","workflow":"tdd"} |
Write the test first. Watch it fail. Write minimal code to pass.
Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Write code before the test? Delete it. Start over. Do not keep it as "reference" — delete means delete.
| Rationalization | Reality |
|---|---|
| "Too simple to test" | Simple code breaks too. Test takes 30 seconds. |
| "I'll write tests after" | Tests passing immediately prove nothing. |
| "Already manually tested" | Ad-hoc ≠ systematic. You can't re-run it. |
| "Deleting X hours is wasteful" | Sunk cost. Keeping unverified code is technical debt. |
| "TDD will slow me down" | TDD is faster than debugging. |
| "Keep as reference, write tests first" | You'll adapt it. That's testing after. Delete means delete. |
Any of these? Delete code. Start over with TDD.
skills/test-driven-development/examples.md only when needed