[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-c87a6325-9b21-41e1-9200-dfaa8c3f5073":3,"$fwm4cFv5LQSYzZ1jP3F8IUhGkBT0SNkJNzMP4pM3iAMM":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},"c87a6325-9b21-41e1-9200-dfaa8c3f5073","bats-testing-patterns","精通Bash自动化测试系统（Bats），全面进行shell脚本测试。用于编写shell脚本测试、CI\u002FCD流水线或需要shell工具的测试驱动开发。","cat_coding_review","mod_coding","sickn33,coding","---\nname: bats-testing-patterns\ndescription: \"Master Bash Automated Testing System (Bats) for comprehensive shell script testing. Use when writing tests for shell scripts, CI\u002FCD pipelines, or requiring test-driven development of shell utilities.\"\nrisk: unknown\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Bats Testing Patterns\n\nComprehensive guidance for writing comprehensive unit tests for shell scripts using Bats (Bash Automated Testing System), including test patterns, fixtures, and best practices for production-grade shell testing.\n\n## Use this skill when\n\n- Writing unit tests for shell scripts\n- Implementing TDD for scripts\n- Setting up automated testing in CI\u002FCD pipelines\n- Testing edge cases and error conditions\n- Validating behavior across shell environments\n\n## Do not use this skill when\n\n- The project does not use shell scripts\n- You need integration tests beyond shell behavior\n- The goal is only linting or formatting\n\n## Instructions\n\n- Confirm shell dialects and supported environments.\n- Set up a test structure with helpers and fixtures.\n- Write tests for exit codes, output, and side effects.\n- Add setup\u002Fteardown and run tests in CI.\n- If detailed examples are required, open `resources\u002Fimplementation-playbook.md`.\n\n## Resources\n\n- `resources\u002Fimplementation-playbook.md` for detailed patterns and examples.\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,137,867,"2026-05-16 13:08:24",{"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},"13c4bd64-3f11-45ab-a290-8f5973c5d89d","1.0.0","bats-testing-patterns.zip",4782,"uploads\u002Fskills\u002Fc87a6325-9b21-41e1-9200-dfaa8c3f5073\u002Fbats-testing-patterns.zip","140cdf7ea9141db15a870bdda611fa4ab8c656cfc7f7e42d0da8eb6568e94873","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":1661},{\"path\":\"resources\u002Fimplementation-playbook.md\",\"isDirectory\":false,\"size\":11705}]",{"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]