[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-d9325c2f-ca0f-46de-8162-c9c24d2ef9ab":3,"$fLgC7Y0qpiYpHieWIiWdFwLzCtmAlnOfLumgei7sj8WQ":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"d9325c2f-ca0f-46de-8162-c9c24d2ef9ab","test-fixing","系统性地使用智能分组策略识别和修复所有失败的测试。在明确要求修复测试（“修复这些测试”，“使测试通过”）、报告测试失败（“测试失败”，“测试套件损坏”）或完成实现后希望测试通过时使用。","cat_coding_review","mod_coding","sickn33,coding","---\nname: test-fixing\ndescription: \"Systematically identify and fix all failing tests using smart grouping strategies. Use when explicitly asks to fix tests (\\\"fix these tests\\\", \\\"make tests pass\\\"), reports test failures (\\\"tests are failing\\\", \\\"test suite is broken\\\"), or completes implementation and wants tests passing.\"\nrisk: safe\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Test Fixing\n\nSystematically identify and fix all failing tests using smart grouping strategies.\n\n## When to Use\n- Explicitly asks to fix tests (\"fix these tests\", \"make tests pass\")\n- Reports test failures (\"tests are failing\", \"test suite is broken\")\n- Completes implementation and wants tests passing\n- Mentions CI\u002FCD failures due to tests\n\n## Systematic Approach\n\n### 1. Initial Test Run\n\nRun `make test` to identify all failing tests.\n\nAnalyze output for:\n\n- Total number of failures\n- Error types and patterns\n- Affected modules\u002Ffiles\n\n### 2. Smart Error Grouping\n\nGroup similar failures by:\n\n- **Error type**: ImportError, AttributeError, AssertionError, etc.\n- **Module\u002Ffile**: Same file causing multiple test failure\n- **Root cause**: Missing dependencies, API changes, refactoring impacts\n\nPrioritize groups by:\n\n- Number of affected tests (highest impact first)\n- Dependency order (fix infrastructure before functionality)\n\n### 3. Systematic Fixing Process\n\nFor each group (starting with highest impact):\n\n1. **Identify root cause**\n\n   - Read relevant code\n   - Check recent changes with `git diff`\n   - Understand the error pattern\n\n2. **Implement fix**\n\n   - Use Edit tool for code changes\n   - Follow project conventions (see CLAUDE.md)\n   - Make minimal, focused changes\n\n3. **Verify fix**\n\n   - Run subset of tests for this group\n   - Use pytest markers or file patterns:\n     ```bash\n     uv run pytest tests\u002Fpath\u002Fto\u002Ftest_file.py -v\n     uv run pytest -k \"pattern\" -v\n     ```\n   - Ensure group passes before moving on\n\n4. **Move to next group**\n\n### 4. Fix Order Strategy\n\n**Infrastructure first:**\n\n- Import errors\n- Missing dependencies\n- Configuration issues\n\n**Then API changes:**\n\n- Function signature changes\n- Module reorganization\n- Renamed variables\u002Ffunctions\n\n**Finally, logic issues:**\n\n- Assertion failures\n- Business logic bugs\n- Edge case handling\n\n### 5. Final Verification\n\nAfter all groups fixed:\n\n- Run complete test suite: `make test`\n- Verify no regressions\n- Check test coverage remains intact\n\n## Best Practices\n\n- Fix one group at a time\n- Run focused tests after each fix\n- Use `git diff` to understand recent changes\n- Look for patterns in failures\n- Don't move to next group until current passes\n- Keep changes minimal and focused\n\n## Example Workflow\n\nUser: \"The tests are failing after my refactor\"\n\n1. Run `make test` → 15 failures identified\n2. Group errors:\n   - 8 ImportErrors (module renamed)\n   - 5 AttributeErrors (function signature changed)\n   - 2 AssertionErrors (logic bugs)\n3. Fix ImportErrors first → Run subset → Verify\n4. Fix AttributeErrors → Run subset → Verify\n5. Fix AssertionErrors → Run subset → Verify\n6. Run full suite → All pass ✓\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.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,150,1593,"2026-05-16 13:43:48",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"编程开发","coding","mdi-code-braces","代码生成、调试、审查，提升开发效率",2,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"代码审查","review","mdi-magnify-scan","代码质量分析、安全审查",4,145,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"d98555db-6dd5-44ff-b939-dee5322eec6f","1.0.0","test-fixing.zip",1656,"uploads\u002Fskills\u002Fd9325c2f-ca0f-46de-8162-c9c24d2ef9ab\u002Ftest-fixing.zip","74cf026b57ff7d147c0dc0c3c5167b4acee158b0eef4b7462e274a527fbfcd7b","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":3427}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]