[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DRRZ5VJQFS92KQFE4QB6T3":3,"skill-same:01M6DRRZ5VJQFS92KQFE4QB6T3":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":53,"install":54,"resources":67},"01M6DRRZ5VJQFS92KQFE4QB6T3","tdd:write-tests",null,"Systematically add test coverage for all local code changes using specialized review and development agents. Add tests for uncommitted changes (including untracked files), or if everything is commited, then will cover latest commit.","AntifragileTech\u002Fantifragile-claude-code","AntifragileTech","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F174357194?v=4","01M6DQCYMK4CDSQQAN0ZC72NTV","01M6DQCYS9YPW1WKMQ5TJMPQ43",9,"MIT","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fwrite-tests\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"write","tdd:write tests","tests","write tests","tdd","commit","add test","development","code","specialized","review","coverage","test coverage","modules","files","focus","local","test","2026-11-10 10:12:30",false,"---\nname: tdd:write-tests\ndescription: Systematically add test coverage for all local code changes using specialized review and development agents. Add tests for uncommitted changes (including untracked files), or if everything is commited, then will cover latest commit.\nargument-hint: what tests or modules to focus on\n---\n\n# Cover Local Changes with Tests\n\n## User Arguments\n\nUser can provide a what tests or modules to focus on:\n\n```\n$ARGUMENTS\n```\n\nIf nothing is provided, focus on all changes in current git diff that not commited. If everything is commited, then will cover latest commit.\n\n## Context\n\nAfter implementing new features or refactoring existing code, it's critical to ensure all business logic changes are covered by tests. This command orchestrates automated test creation for local changes using coverage analysis and specialized agents.\n\n## Goal\n\nAchieve comprehensive test coverage for all critical business logic in local code changes.\n\n## Important Constraints\n\n- **Focus on critical business logic** - not every line needs 100% coverage\n- **Preserve existing tests** - only add new tests, don't modify existing ones\n- \"Analyse complexity of changes\" - \n  - if there 2 or more changed files, or one file with complex logic, then **Do not write tests yourself** - only orchestrate agents!\n  - if there is only one changed file, and it's a simple change, then you can write tests yourself.\n\n## Workflow Steps\n\n### Preparation\n\n1. **Read sadd skill if available**\n   - If available, read the sadd skill to understand best practices for managing agents\n\n2. **Discover test infrastructure**\n   - Read @README.md and package.json (or equivalent project config)\n   - Identify commands to run tests and coverage reports\n   - Understand project structure and testing conventions\n\n3. **Run all tests**\n   - Execute full test suite to establish baseline\n\n### Analysis\n\nDo steps 4-5 in parallel using haiku agents:\n\n4. **Verify single test execution**\n   - Choose any passing test file\n   - Launch haiku agent with instructions to find proper command to run this only test file\n     - Ask him to iterate until you can reliably run individual tests\n   - After he complete try running a specific test file if it exists\n   - This ensures agents can run tests in isolation\n\n5. **Analyze local changes**\n   - Run `git status -u` to identify all changed files (including untracked files)\n     - If there no uncommited changes, then run `git show --name-status` to get the list of files that were changed in the latest commit.\n   - Filter out non-code files (docs, configs, etc.)\n   - Launch separate haikue agent per changed file to analyze file itself, and the complexity of the changes, and prepare short summary of it.\n   - Extract list of files with actual logic changes\n\n### Test Writing\n\n#### Simple Single File Flow\n\nIf there is only one changed file, and it's a simple change, then you can write tests yourself. Following this guidline:\n\n1. Read TDD skill for best practices on writing tests\n2. Read the target file {FILE_PATH} and understand the logic\n3. Review existing test files for patterns and style, if not exists then create it.\n4. Analyse which tests cases should be added to cover the changes.\n5.  Create comprehensive tests for all identified cases\n6.  Run the test command identified before.\n7.  Iterate and fix any issues until all tests pass\n\nEnsure tests are:\n  - Clear and maintainable\n  - Follow project conventions\n  - Test behavior, not implementation\n  - Cover edge cases and error paths\n\n#### Multiple Files or Complex File Flow\n\nIf there are multiple changed files, or one file with complex logic, then you need to use specialized agents to cover the changes. Following this guidline:\n\n6. **Launch `code-review:test-coverage-reviewer` agents (parallel)** (Sonnet or Opus models)\n   - Launch one coverage-reviewer agent per changed file\n   - Provide each agent with:\n     - **Context**: What changed in this file (git diff)\n     - **Target**: Which specific file to analyze\n     - **Resources**: Read README and relevant documentation\n     - **Goal**: Identify what test suites need to be added\n     - **Output**: List of test cases needed for critical business logic\n   - Collect all coverage review reports\n\n7. **Launch `developer` agents for test file (parallel)** (Sonnet or Opus models)\n   - Launch one developer agent per changed file that needs tests\n   - Provide each agent with:\n     - **Context**: Coverage review report for this file\n     - **Target**: Which specific file to create tests for\n     - **Test cases**: List from coverage-reviewer agent\n     - **Guidance**: Read TDD skill (if available) for best practices on writing tests.\n     - **Resources**: Read README and test examples\n     - **Command**: How to run tests for this file\n     - **Goal**: Create comprehensive tests for all identified cases\n     - **Constraint**: Add new tests, don't modify existing logic (unless clearly broken)\n\n8. **Verify coverage (iteration)** (Sonnet or Opus models)\n   - Launch `code-review:test-coverage-reviewer` agents again per file\n   - Provide:\n     - **Context**: Original changes + new tests added\n     - **Goal**: Verify all critical business logic is covered\n     - **Output**: Confirmation or list of missing coverage\n\n9.  **Iterate if needed**\n   - If any files still lack coverage: Return to step 5\n   - Launch new developer agents only for files with gaps\n   - Provide specific instructions on what's still missing\n   - Continue until all critical business logic is covered\n\n10.  **Final verification**\n\n- Run full test suite to ensure all tests pass\n- Generate coverage report if available\n- Verify no regressions in existing tests\n\n## Success Criteria\n\n- All critical business logic in changed files has test coverage ✅\n- All tests pass (new and existing) ✅\n- Test quality verified by coverage-reviewer agents ✅\n\n## Agent Instructions Templates\n\n### Coverage Review Agent (Initial Analysis)\n\n```\nAnalyze the file {FILE_PATH} for test coverage needs.\n\nContext: This file was modified in local changes:\n{GIT_DIFF_OUTPUT}\n\nYour task:\n1. Read the changed file and understand the business logic\n2. Identify all critical code paths that need testing:\n   - New functions\u002Fmethods added\n   - Modified business logic\n   - Edge cases and error handling\n   - Integration points\n3. Review existing tests (if any) to avoid duplication\n4. Create a list of test cases needed, prioritized by importance:\n   - CRITICAL: Core business logic, data mutations\n   - IMPORTANT: Error handling, validations\n   - NICE_TO_HAVE: Edge cases, performance\n\nOutput format:\n- List of test cases with descriptions\n- Priority level for each\n- Suggested test file location\n```\n\n### Developer Agent (Test Creation)\n\n```\nCreate tests for file {FILE_PATH} based on coverage analysis.\n\nCoverage review identified these test cases:\n{TEST_CASES_LIST}\n\nYour task:\n1. Read TDD skill (if available) for best practices on writing tests\n2. Read @README.md for project context and testing conventions\n3. Read the target file {FILE_PATH} and understand the logic\n4. Review existing test files for patterns and style\n5. Create comprehensive tests for all identified cases\n6. Run the tests: {TEST_COMMAND}\n7. Iterate until all tests pass\n8. Ensure tests are:\n   - Clear and maintainable\n   - Follow project conventions\n   - Test behavior, not implementation\n   - Cover edge cases and error paths\n\nTest command: {TEST_COMMAND}\n```\n\n### Coverage Review Agent (Verification)\n\n```\nVerify test coverage for file {FILE_PATH}.\n\nContext: Tests were added to cover local changes in this file.\n\nYour task:\n1. Read the changed file {FILE_PATH}\n2. Read the new test file(s) created\n3. Verify all critical business logic is covered:\n   - All new functions have tests\n   - All modified logic has tests\n   - Edge cases are tested\n   - Error handling is tested\n4. Identify any gaps in coverage\n5. Confirm test quality (clear, maintainable, follows TDD principles)\n\nOutput:\n- PASS: All critical business logic is covered ✅\n- GAPS: List specific missing test cases that need to be added\n```\n","# Cover Local Changes with Tests\n\n## User Arguments\n\nUser can provide a what tests or modules to focus on:\n\n```\n$ARGUMENTS\n```\n\nIf nothing is provided, focus on all changes in current git diff that not commited. If everything is commited, then will cover latest commit.\n\n## Context\n\nAfter implementing new features or refactoring existing code, it's critical to ensure all business logic changes are covered by tests. This command orchestrates automated test creation for local changes using coverage analysis and specialized agents.\n\n## Goal\n\nAchieve comprehensive test coverage for all critical business logic in local code changes.\n\n## Important Constraints\n\n- **Focus on critical business logic** - not every line needs 100% coverage\n- **Preserve existing tests** - only add new tests, don't modify existing ones\n- \"Analyse complexity of changes\" - \n  - if there 2 or more changed files, or one file with complex logic, then **Do not write tests yourself** - only orchestrate agents!\n  - if there is only one changed file, and it's a simple change, then you can write tests yourself.\n\n## Workflow Steps\n\n### Preparation\n\n1. **Read sadd skill if available**\n   - If available, read the sadd skill to understand best practices for managing agents\n\n2. **Discover test infrastructure**\n   - Read @README.md and package.json (or equivalent project config)\n   - Identify commands to run tests and coverage reports\n   - Understand project structure and testing conventions\n\n3. **Run all tests**\n   - Execute full test suite to establish baseline\n\n### Analysis\n\nDo steps 4-5 in parallel using haiku agents:\n\n4. **Verify single test execution**\n   - Choose any passing test file\n   - Launch haiku agent with instructions to find proper command to run this only test file\n     - Ask him to iterate until you can reliably run individual tests\n   - After he complete try running a specific test file if it exists\n   - This ensures agents can run tests in isolation\n\n5. **Analyze local changes**\n   - Run `git status -u` to identify all changed files (including untracked files)\n     - If there no uncommited changes, then run `git show --name-status` to get the list of files that were changed in the latest commit.\n   - Filter out non-code files (docs, configs, etc.)\n   - Launch separate haikue agent per changed file to analyze file itself, and the complexity of the changes, and prepare short summary of it.\n   - Extract list of files with actual logic changes\n\n### Test Writing\n\n#### Simple Single File Flow\n\nIf there is only one changed file, and it's a simple change, then you can write tests yourself. Following this guidline:\n\n1. Read TDD skill for best practices on writing tests\n2. Read the target file {FILE_PATH} and understand the logic\n3. Review existing test files for patterns and style, if not exists then create it.\n4. Analyse which tests cases should be added to cover the changes.\n5.  Create comprehensive tests for all identified cases\n6.  Run the test command identified before.\n7.  Iterate and fix any issues until all tests pass\n\nEnsure tests are:\n  - Clear and maintainable\n  - Follow project conventions\n  - Test behavior, not implementation\n  - Cover edge cases and error paths\n\n#### Multiple Files or Complex File Flow\n\nIf there are multiple changed files, or one file with complex logic, then you need to use specialized agents to cover the changes. Following this guidline:\n\n6. **Launch `code-review:test-coverage-reviewer` agents (parallel)** (Sonnet or Opus models)\n   - Launch one coverage-reviewer agent per changed file\n   - Provide each agent with:\n     - **Context**: What changed in this file (git diff)\n     - **Target**: Which specific file to analyze\n     - **Resources**: Read README and relevant documentation\n     - **Goal**: Identify what test suites need to be added\n     - **Output**: List of test cases needed for critical business logic\n   - Collect all coverage review reports\n\n7. **Launch `developer` agents for test file (parallel)** (Sonnet or Opus models)\n   - Launch one developer agent per changed file that needs tests\n   - Provide each agent with:\n     - **Context**: Coverage review report for this file\n     - **Target**: Which specific file to create tests for\n     - **Test cases**: List from coverage-reviewer agent\n     - **Guidance**: Read TDD skill (if available) for best practices on writing tests.\n     - **Resources**: Read README and test examples\n     - **Command**: How to run tests for this file\n     - **Goal**: Create comprehensive tests for all identified cases\n     - **Constraint**: Add new tests, don't modify existing logic (unless clearly broken)\n\n8. **Verify coverage (iteration)** (Sonnet or Opus models)\n   - Launch `code-review:test-coverage-reviewer` agents again per file\n   - Provide:\n     - **Context**: Original changes + new tests added\n     - **Goal**: Verify all critical business logic is covered\n     - **Output**: Confirmation or list of missing coverage\n\n9.  **Iterate if needed**\n   - If any files still lack coverage: Return to step 5\n   - Launch new developer agents only for files with gaps\n   - Provide specific instructions on what's still missing\n   - Continue until all critical business logic is covered\n\n10.  **Final verification**\n\n- Run full test suite to ensure all tests pass\n- Generate coverage report if available\n- Verify no regressions in existing tests\n\n## Success Criteria\n\n- All critical business logic in changed files has test coverage ✅\n- All tests pass (new and existing) ✅\n- Test quality verified by coverage-reviewer agents ✅\n\n## Agent Instructions Templates\n\n### Coverage Review Agent (Initial Analysis)\n\n```\nAnalyze the file {FILE_PATH} for test coverage needs.\n\nContext: This file was modified in local changes:\n{GIT_DIFF_OUTPUT}\n\nYour task:\n1. Read the changed file and understand the business logic\n2. Identify all critical code paths that need testing:\n   - New functions\u002Fmethods added\n   - Modified business logic\n   - Edge cases and error handling\n   - Integration points\n3. Review existing tests (if any) to avoid duplication\n4. Create a list of test cases needed, prioritized by importance:\n   - CRITICAL: Core business logic, data mutations\n   - IMPORTANT: Error handling, validations\n   - NICE_TO_HAVE: Edge cases, performance\n\nOutput format:\n- List of test cases with descriptions\n- Priority level for each\n- Suggested test file location\n```\n\n### Developer Agent (Test Creation)\n\n```\nCreate tests for file {FILE_PATH} based on coverage analysis.\n\nCoverage review identified these test cases:\n{TEST_CASES_LIST}\n\nYour task:\n1. Read TDD skill (if available) for best practices on writing tests\n2. Read @README.md for project context and testing conventions\n3. Read the target file {FILE_PATH} and understand the logic\n4. Review existing test files for patterns and style\n5. Create comprehensive tests for all identified cases\n6. Run the tests: {TEST_COMMAND}\n7. Iterate until all tests pass\n8. Ensure tests are:\n   - Clear and maintainable\n   - Follow project conventions\n   - Test behavior, not implementation\n   - Cover edge cases and error paths\n\nTest command: {TEST_COMMAND}\n```\n\n### Coverage Review Agent (Verification)\n\n```\nVerify test coverage for file {FILE_PATH}.\n\nContext: Tests were added to cover local changes in this file.\n\nYour task:\n1. Read the changed file {FILE_PATH}\n2. Read the new test file(s) created\n3. Verify all critical business logic is covered:\n   - All new functions have tests\n   - All modified logic has tests\n   - Edge cases are tested\n   - Error handling is tested\n4. Identify any gaps in coverage\n5. Confirm test quality (clear, maintainable, follows TDD principles)\n\nOutput:\n- PASS: All critical business logic is covered ✅\n- GAPS: List specific missing test cases that need to be added\n```\n",{"name":5,"description":7,"argument-hint":46},"what tests or modules to focus on","master","c73386b305dec167db7654e0e6feacb462d4f9dc","assets\u002Fskills\u002Fdev\u002Fwrite-tests",1,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code","https:\u002F\u002Fgithub.com\u002FAntifragileTech","2026-10-02 14:22:14",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add AntifragileTech\u002Fantifragile-claude-code --skill \"tdd:write-tests\"",{"tool":60,"command":61},"bunx","bunx skills add AntifragileTech\u002Fantifragile-claude-code --skill \"tdd:write-tests\"",{"tool":63,"command":64},"pnpm","pnpm dlx skills add AntifragileTech\u002Fantifragile-claude-code --skill \"tdd:write-tests\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fwrite-tests\u002FSKILL.md",true,[],[69,93,107,121,134,147],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":86,"publishedAt":41},"01M6DT9Q6VYA615SCXR757TZZ7","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwriting-skills\u002FSKILL.md",[75,80,83],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":81,"categoryName":82,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":84,"categoryName":85,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000036","内容创作者",[87,88,89,90,91,92],"writing skills","writing","use","editing","work","deployment",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":101,"publishedAt":41},"01M6DT9GFHDNY90P41WGAE1TV0","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwriting-plans\u002FSKILL.md",[99,100],{"categoryNo":81,"categoryName":82,"taxonomyType":78,"taxonomyTypeDesc":79},{"categoryNo":84,"categoryName":85,"taxonomyType":20,"taxonomyTypeDesc":21},[102,103,88,104,105,89,31,106],"plans","writing plans","requirements","task","spec",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":115,"publishedAt":41},"01M6DT9C6PFGD86WS3HY7YE3XG","docs:write-concisely","Apply writing rules to any documentation that humans will read. Makes your writing clearer, stronger, and more professional.","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwrite-concisely\u002FSKILL.md",[113,114],{"categoryNo":81,"categoryName":82,"taxonomyType":78,"taxonomyTypeDesc":79},{"categoryNo":84,"categoryName":85,"taxonomyType":20,"taxonomyTypeDesc":21},[116,23,117,118,119,120,88],"docs:write concisely","docs","read","Rules","documentation",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":41},"01M6DT98AWQ27P0N1CG97WAG66","kaizen:why","Iterative Five Whys root cause analysis drilling from symptoms to fundamentals","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwhy\u002FSKILL.md",[],[123,128,129,130,131,132,133],"why","kaizen","issue","five whys","analysis","root cause analysis",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":41},"01M6DT93EH25NAX19R3WGE1P53","verification-loop","A comprehensive verification system for Claude Code sessions.","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fverification-loop\u002FSKILL.md",[],[141,142,143,144,31,145,146],"verification loop","verification","loop","sessions","claude code sessions","system",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":41},"01M6DT90GW7Z7VCN98P9DVYSNC","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fverification-before-completion\u002FSKILL.md",[],[154,142,155,91,89,156,157,158],"verification before completion","commands","evidence","claim","complete"]