{"id":"2a30acc2-0e79-463e-9cff-c620a480a5ba","shortId":"EGzgxy","kind":"skill","title":"tdd-workflows-tdd-cycle","tagline":"Use when working with tdd workflows tdd cycle","description":"## Use this skill when\n\n- Working on tdd workflows tdd cycle tasks or workflows\n- Needing guidance, best practices, or checklists for tdd workflows tdd cycle\n\n## Do not use this skill when\n\n- The task is unrelated to tdd workflows tdd cycle\n- You need a different domain or tool outside this scope\n\n## Instructions\n\n- Clarify goals, constraints, and required inputs.\n- Apply relevant best practices and validate outcomes.\n- Provide actionable steps and verification.\n- If detailed examples are required, open `resources/implementation-playbook.md`.\n\nExecute a comprehensive Test-Driven Development (TDD) workflow with strict red-green-refactor discipline:\n\n[Extended thinking: This workflow enforces test-first development through coordinated agent orchestration. Each phase of the TDD cycle is strictly enforced with fail-first verification, incremental implementation, and continuous refactoring. The workflow supports both single test and test suite approaches with configurable coverage thresholds.]\n\n## Configuration\n\n### Coverage Thresholds\n- Minimum line coverage: 80%\n- Minimum branch coverage: 75%\n- Critical path coverage: 100%\n\n### Refactoring Triggers\n- Cyclomatic complexity > 10\n- Method length > 20 lines\n- Class length > 200 lines\n- Duplicate code blocks > 3 lines\n\n## Phase 1: Test Specification and Design\n\n### 1. Requirements Analysis\n- Use Task tool with subagent_type=\"comprehensive-review::architect-review\"\n- Prompt: \"Analyze requirements for: $ARGUMENTS. Define acceptance criteria, identify edge cases, and create test scenarios. Output a comprehensive test specification.\"\n- Output: Test specification, acceptance criteria, edge case matrix\n- Validation: Ensure all requirements have corresponding test scenarios\n\n### 2. Test Architecture Design\n- Use Task tool with subagent_type=\"unit-testing::test-automator\"\n- Prompt: \"Design test architecture for: $ARGUMENTS based on test specification. Define test structure, fixtures, mocks, and test data strategy. Ensure testability and maintainability.\"\n- Output: Test architecture, fixture design, mock strategy\n- Validation: Architecture supports isolated, fast, reliable tests\n\n## Phase 2: RED - Write Failing Tests\n\n### 3. Write Unit Tests (Failing)\n- Use Task tool with subagent_type=\"unit-testing::test-automator\"\n- Prompt: \"Write FAILING unit tests for: $ARGUMENTS. Tests must fail initially. Include edge cases, error scenarios, and happy paths. DO NOT implement production code.\"\n- Output: Failing unit tests, test documentation\n- **CRITICAL**: Verify all tests fail with expected error messages\n\n### 4. Verify Test Failure\n- Use Task tool with subagent_type=\"tdd-workflows::code-reviewer\"\n- Prompt: \"Verify that all tests for: $ARGUMENTS are failing correctly. Ensure failures are for the right reasons (missing implementation, not test errors). Confirm no false positives.\"\n- Output: Test failure verification report\n- **GATE**: Do not proceed until all tests fail appropriately\n\n## Phase 3: GREEN - Make Tests Pass\n\n### 5. Minimal Implementation\n- Use Task tool with subagent_type=\"backend-development::backend-architect\"\n- Prompt: \"Implement MINIMAL code to make tests pass for: $ARGUMENTS. Focus only on making tests green. Do not add extra features or optimizations. Keep it simple.\"\n- Output: Minimal working implementation\n- Constraint: No code beyond what's needed to pass tests\n\n### 6. Verify Test Success\n- Use Task tool with subagent_type=\"unit-testing::test-automator\"\n- Prompt: \"Run all tests for: $ARGUMENTS and verify they pass. Check test coverage metrics. Ensure no tests were accidentally broken.\"\n- Output: Test execution report, coverage metrics\n- **GATE**: All tests must pass before proceeding\n\n## Phase 4: REFACTOR - Improve Code Quality\n\n### 7. Code Refactoring\n- Use Task tool with subagent_type=\"tdd-workflows::code-reviewer\"\n- Prompt: \"Refactor implementation for: $ARGUMENTS while keeping tests green. Apply SOLID principles, remove duplication, improve naming, and optimize performance. Run tests after each refactoring.\"\n- Output: Refactored code, refactoring report\n- Constraint: Tests must remain green throughout\n\n### 8. Test Refactoring\n- Use Task tool with subagent_type=\"unit-testing::test-automator\"\n- Prompt: \"Refactor tests for: $ARGUMENTS. Remove test duplication, improve test names, extract common fixtures, and enhance test readability. Ensure tests still provide same coverage.\"\n- Output: Refactored tests, improved test structure\n- Validation: Coverage metrics unchanged or improved\n\n## Phase 5: Integration and System Tests\n\n### 9. Write Integration Tests (Failing First)\n- Use Task tool with subagent_type=\"unit-testing::test-automator\"\n- Prompt: \"Write FAILING integration tests for: $ARGUMENTS. Test component interactions, API contracts, and data flow. Tests must fail initially.\"\n- Output: Failing integration tests\n- Validation: Tests fail due to missing integration logic\n\n### 10. Implement Integration\n- Use Task tool with subagent_type=\"backend-development::backend-architect\"\n- Prompt: \"Implement integration code for: $ARGUMENTS to make integration tests pass. Focus on component interaction and data flow.\"\n- Output: Integration implementation\n- Validation: All integration tests pass\n\n## Phase 6: Continuous Improvement Cycle\n\n### 11. Performance and Edge Case Tests\n- Use Task tool with subagent_type=\"unit-testing::test-automator\"\n- Prompt: \"Add performance tests and additional edge case tests for: $ARGUMENTS. Include stress tests, boundary tests, and error recovery tests.\"\n- Output: Extended test suite\n- Metric: Increased test coverage and scenario coverage\n\n### 12. Final Code Review\n- Use Task tool with subagent_type=\"comprehensive-review::architect-review\"\n- Prompt: \"Perform comprehensive review of: $ARGUMENTS. Verify TDD process was followed, check code quality, test quality, and coverage. Suggest improvements.\"\n- Output: Review report, improvement suggestions\n- Action: Implement critical suggestions while maintaining green tests\n\n## Incremental Development Mode\n\nFor test-by-test development:\n1. Write ONE failing test\n2. Make ONLY that test pass\n3. Refactor if needed\n4. Repeat for next test\n\nUse this approach by adding `--incremental` flag to focus on one test at a time.\n\n## Test Suite Mode\n\nFor comprehensive test suite development:\n1. Write ALL tests for a feature/module (failing)\n2. Implement code to pass ALL tests\n3. Refactor entire module\n4. Add integration tests\n\nUse this approach by adding `--suite` flag for batch test development.\n\n## Validation Checkpoints\n\n### RED Phase Validation\n- [ ] All tests written before implementation\n- [ ] All tests fail with meaningful error messages\n- [ ] Test failures are due to missing implementation\n- [ ] No test passes accidentally\n\n### GREEN Phase Validation\n- [ ] All tests pass\n- [ ] No extra code beyond test requirements\n- [ ] Coverage meets minimum thresholds\n- [ ] No test was modified to make it pass\n\n### REFACTOR Phase Validation\n- [ ] All tests still pass after refactoring\n- [ ] Code complexity reduced\n- [ ] Duplication eliminated\n- [ ] Performance improved or maintained\n- [ ] Test readability improved\n\n## Coverage Reports\n\nGenerate coverage reports after each phase:\n- Line coverage\n- Branch coverage\n- Function coverage\n- Statement coverage\n\n## Failure Recovery\n\nIf TDD discipline is broken:\n1. **STOP** immediately\n2. Identify which phase was violated\n3. Rollback to last valid state\n4. Resume from correct phase\n5. Document lesson learned\n\n## TDD Metrics Tracking\n\nTrack and report:\n- Time in each phase (Red/Green/Refactor)\n- Number of test-implementation cycles\n- Coverage progression\n- Refactoring frequency\n- Defect escape rate\n\n## Anti-Patterns to Avoid\n\n- Writing implementation before tests\n- Writing tests that already pass\n- Skipping the refactor phase\n- Writing multiple features without tests\n- Modifying tests to make them pass\n- Ignoring failing tests\n- Writing tests after implementation\n\n## Success Criteria\n\n- 100% of code written test-first\n- All tests pass continuously\n- Coverage exceeds thresholds\n- Code complexity within limits\n- Zero defects in covered code\n- Clear test documentation\n- Fast test execution (< 5 seconds for unit tests)\n\n## Notes\n\n- Enforce strict RED-GREEN-REFACTOR discipline\n- Each phase must be completed before moving to next\n- Tests are the specification\n- If a test is hard to write, the design needs improvement\n- Refactoring is NOT optional\n- Keep test execution fast\n- Tests should be independent and isolated\n\nTDD implementation for: $ARGUMENTS\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["tdd","workflows","cycle","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding"],"capabilities":["skill","source-sickn33","skill-tdd-workflows-tdd-cycle","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/tdd-workflows-tdd-cycle","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34460 github stars · SKILL.md body (8,844 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T06:51:58.749Z","embedding":null,"createdAt":"2026-04-18T21:45:54.582Z","updatedAt":"2026-04-22T06:51:58.749Z","lastSeenAt":"2026-04-22T06:51:58.749Z","tsv":"'1':185,190,837,880,1010 '10':170,684 '100':165,1096 '11':730 '12':779 '2':241,295,842,888,1013 '20':173 '200':177 '3':182,300,413,848,895,1019 '4':356,523,852,899,1025 '5':418,630,1030,1125 '6':473,726 '7':528 '75':161 '8':578 '80':157 '9':635 'accept':211,228 'accident':507,941 'action':78,820 'ad':861,907 'add':451,749,900 'addit':753 'agent':116 'alreadi':1070 'analysi':192 'analyz':206 'anti':1059 'anti-pattern':1058 'api':663 'appli':70,552 'approach':146,859,905 'appropri':411 'architect':203,432,698,793 'architect-review':202,792 'architectur':243,260,282,288 'argument':209,262,323,378,442,494,547,597,659,704,758,800,1179 'ask':1213 'autom':256,316,488,592,652,747 'avoid':1062 'backend':428,431,694,697 'backend-architect':430,696 'backend-develop':427,693 'base':263 'batch':911 'best':29,72 'beyond':466,951 'block':181 'boundari':762,1221 'branch':159,997 'broken':508,1009 'case':215,231,330,734,755 'check':499,806 'checklist':32 'checkpoint':915 'clarif':1215 'clarifi':64 'class':175 'clear':1119,1188 'code':180,340,370,436,465,526,529,541,569,702,781,807,890,950,975,1098,1110,1118 'code-review':369,540 'common':605 'complet':1142 'complex':169,976,1111 'compon':661,712 'comprehens':91,200,222,790,797,876 'comprehensive-review':199,789 'configur':148,151 'confirm':394 'constraint':66,463,572 'continu':135,727,1106 'contract':664 'coordin':115 'correct':381,1028 'correspond':238 'cover':1117 'coverag':149,152,156,160,164,501,513,616,624,775,778,812,954,987,990,996,998,1000,1002,1051,1107 'creat':217 'criteria':212,229,1095,1224 'critic':162,347,822 'cycl':5,13,23,37,52,123,729,1050 'cyclomat':168 'data':274,666,715 'defect':1055,1115 'defin':210,267 'describ':1192 'design':189,244,258,284,1159 'detail':83 'develop':95,113,429,695,829,836,879,913 'differ':56 'disciplin':104,1007,1137 'document':346,1031,1121 'domain':57 'driven':94 'due':679,934 'duplic':179,556,600,978 'edg':214,230,329,733,754 'elimin':979 'enforc':109,126,1131 'enhanc':608 'ensur':234,276,382,503,611 'entir':897 'environ':1204 'environment-specif':1203 'error':331,354,393,765,929 'escap':1056 'exampl':84 'exceed':1108 'execut':89,511,1124,1168 'expect':353 'expert':1209 'extend':105,769 'extra':452,949 'extract':604 'fail':129,298,304,319,326,342,351,380,410,639,655,670,673,678,840,887,926,1088 'fail-first':128 'failur':359,383,400,932,1003 'fals':396 'fast':291,1122,1169 'featur':453,1078 'feature/module':886 'final':780 'first':112,130,640,1102 'fixtur':270,283,606 'flag':863,909 'flow':667,716 'focus':443,710,865 'follow':805 'frequenc':1054 'function':999 'gate':403,515 'generat':989 'goal':65 'green':102,414,448,551,576,826,942,1135 'guidanc':28 'happi':334 'hard':1155 'identifi':213,1014 'ignor':1087 'immedi':1012 'implement':133,338,390,420,434,462,545,685,700,719,821,889,923,937,1049,1064,1093,1177 'improv':525,557,601,620,628,728,814,818,981,986,1161 'includ':328,759 'increas':773 'increment':132,828,862 'independ':1173 'initi':327,671 'input':69,1218 'instruct':63 'integr':631,637,656,674,682,686,701,707,718,722,901 'interact':662,713 'isol':290,1175 'keep':456,549,1166 'last':1022 'learn':1033 'length':172,176 'lesson':1032 'limit':1113,1180 'line':155,174,178,183,995 'logic':683 'maintain':279,825,983 'make':415,438,446,706,843,963,1084 'match':1189 'matrix':232 'meaning':928 'meet':955 'messag':355,930 'method':171 'metric':502,514,625,772,1035 'minim':419,435,460 'minimum':154,158,956 'miss':389,681,936,1226 'mock':271,285 'mode':830,874 'modifi':961,1081 'modul':898 'move':1144 'multipl':1077 'must':325,518,574,669,1140 'name':558,603 'need':27,54,469,851,1160 'next':855,1146 'note':1130 'number':1045 'one':839,867 'open':87 'optim':455,560 'option':1165 'orchestr':117 'outcom':76 'output':220,225,280,341,398,459,509,567,617,672,717,768,815,1198 'outsid':60 'pass':417,440,471,498,519,709,724,847,892,940,947,965,972,1071,1086,1105 'path':163,335 'pattern':1060 'perform':561,731,750,796,980 'permiss':1219 'phase':119,184,294,412,522,629,725,917,943,967,994,1016,1029,1043,1075,1139 'posit':397 'practic':30,73 'principl':554 'proceed':406,521 'process':803 'product':339 'progress':1052 'prompt':205,257,317,372,433,489,543,593,653,699,748,795 'provid':77,614 'qualiti':527,808,810 'rate':1057 'readabl':610,985 'reason':388 'recoveri':766,1004 'red':101,296,916,1134 'red-green-refactor':100,1133 'red/green/refactor':1044 'reduc':977 'refactor':103,136,166,524,530,544,566,568,570,580,594,618,849,896,966,974,1053,1074,1136,1162 'relev':71 'reliabl':292 'remain':575 'remov':555,598 'repeat':853 'report':402,512,571,817,988,991,1039 'requir':68,86,191,207,236,953,1217 'resources/implementation-playbook.md':88 'resum':1026 'review':201,204,371,542,782,791,794,798,816,1210 'right':387 'rollback':1020 'run':490,562 'safeti':1220 'scenario':219,240,332,777 'scope':62,1191 'second':1126 'simpl':458 'singl':141 'skill':16,42,1183 'skill-tdd-workflows-tdd-cycle' 'skip':1072 'solid':553 'source-sickn33' 'specif':187,224,227,266,1150,1205 'state':1024 'statement':1001 'step':79 'still':613,971 'stop':1011,1211 'strategi':275,286 'stress':760 'strict':99,125,1132 'structur':269,622 'subag':197,249,309,364,425,481,535,585,645,691,740,787 'substitut':1201 'success':476,1094,1223 'suggest':813,819,823 'suit':145,771,873,878,908 'support':139,289 'system':633 'task':24,45,194,246,306,361,422,478,532,582,642,688,737,784,1187 'tdd':2,4,10,12,20,22,34,36,49,51,96,122,367,538,802,1006,1034,1176 'tdd-workflow':366,537 'tdd-workflows-tdd-cycl':1 'test':93,111,142,144,186,218,223,226,239,242,253,255,259,265,268,273,281,293,299,303,313,315,321,324,344,345,350,358,376,392,399,409,416,439,447,472,475,485,487,492,500,505,510,517,550,563,573,579,589,591,595,599,602,609,612,619,621,634,638,649,651,657,660,668,675,677,708,723,735,744,746,751,756,761,763,767,770,774,809,827,833,835,841,846,856,868,872,877,883,894,902,912,920,925,931,939,946,952,959,970,984,1048,1066,1068,1080,1082,1089,1091,1101,1104,1120,1123,1129,1147,1153,1167,1170,1207 'test-autom':254,314,486,590,650,745 'test-by-test':832 'test-driven':92 'test-first':110,1100 'test-implement':1047 'testabl':277 'think':106 'threshold':150,153,957,1109 'throughout':577 'time':871,1040 'tool':59,195,247,307,362,423,479,533,583,643,689,738,785 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'track':1036,1037 'treat':1196 'trigger':167 'type':198,250,310,365,426,482,536,586,646,692,741,788 'unchang':626 'unit':252,302,312,320,343,484,588,648,743,1128 'unit-test':251,311,483,587,647,742 'unrel':47 'use':6,14,40,193,245,305,360,421,477,531,581,641,687,736,783,857,903,1181 'valid':75,233,287,623,676,720,914,918,944,968,1023,1206 'verif':81,131,401 'verifi':348,357,373,474,496,801 'violat':1018 'within':1112 'without':1079 'work':8,18,461 'workflow':3,11,21,26,35,50,97,108,138,368,539 'write':297,301,318,636,654,838,881,1063,1067,1076,1090,1157 'written':921,1099 'zero':1114","prices":[{"id":"419550e2-e8d5-48ca-83af-41a626557152","listingId":"2a30acc2-0e79-463e-9cff-c620a480a5ba","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:45:54.582Z"}],"sources":[{"listingId":"2a30acc2-0e79-463e-9cff-c620a480a5ba","source":"github","sourceId":"sickn33/antigravity-awesome-skills/tdd-workflows-tdd-cycle","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/tdd-workflows-tdd-cycle","isPrimary":false,"firstSeenAt":"2026-04-18T21:45:54.582Z","lastSeenAt":"2026-04-22T06:51:58.749Z"}],"details":{"listingId":"2a30acc2-0e79-463e-9cff-c620a480a5ba","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"tdd-workflows-tdd-cycle","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34460,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-22T06:40:00Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"63dbd10ea1cbd966ba0ec43f2d115c7e4b66127d","skill_md_path":"skills/tdd-workflows-tdd-cycle/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/tdd-workflows-tdd-cycle"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"tdd-workflows-tdd-cycle","description":"Use when working with tdd workflows tdd cycle"},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/tdd-workflows-tdd-cycle"},"updatedAt":"2026-04-22T06:51:58.749Z"}}