[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E18SZ9GS5B9MXPY93SQRBC":3,"skill-same:01M6E18SZ9GS5B9MXPY93SQRBC":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":13,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":6,"updatedAt":46,"install":47,"resources":60},"01M6E18SZ9GS5B9MXPY93SQRBC","bash-defensive-patterns",null,"Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI\u002FCD pipelines, or system utilities requiring fault tolerance and safety.","vulbyte\u002Fdotfiles","vulbyte","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42786339?v=4","01M6E18R4768ZT0EEXVR2VDNVW","01M6E18R8J82Q3C0Q0TWPMB7EQ",0,"GPL-2.0","https:\u002F\u002Fgithub.com\u002Fvulbyte\u002Fdotfiles\u002Fblob\u002Fmain\u002Fhome\u002F.agents\u002Fskills\u002Fbash-defensive-patterns\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"patterns","bash defensive patterns","Bash","programming","scripts","cd","fault tolerance","master","pipelines","use","writing","system","shell scripts","shell","Safety","Production","ci","2026-11-10 10:12:30",false,"---\nname: bash-defensive-patterns\ndescription: Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI\u002FCD pipelines, or system utilities requiring fault tolerance and safety.\n---\n\n# Bash Defensive Patterns\n\nComprehensive guidance for writing production-ready Bash scripts using defensive programming techniques, error handling, and safety best practices to prevent common pitfalls and ensure reliability.\n\n## When to Use This Skill\n\n- Writing production automation scripts\n- Building CI\u002FCD pipeline scripts\n- Creating system administration utilities\n- Developing error-resilient deployment automation\n- Writing scripts that must handle edge cases safely\n- Building maintainable shell script libraries\n- Implementing comprehensive logging and monitoring\n- Creating scripts that must work across different platforms\n\n## Detailed patterns and worked examples\n\nDetailed pattern documentation lives in `references\u002Fdetails.md`. Read that file when the navigation tier above is insufficient.\n\n## Best Practices Summary\n\n1. **Always use strict mode** - `set -Eeuo pipefail`\n2. **Quote all variables** - `\"$variable\"` prevents word splitting\n3. **Use [[]] conditionals** - More robust than [ ]\n4. **Implement error trapping** - Catch and handle errors gracefully\n5. **Validate all inputs** - Check file existence, permissions, formats\n6. **Use functions for reusability** - Prefix with meaningful names\n7. **Implement structured logging** - Include timestamps and levels\n8. **Support dry-run mode** - Allow users to preview changes\n9. **Handle temporary files safely** - Use mktemp, cleanup with trap\n10. **Design for idempotency** - Scripts should be safe to rerun\n11. **Document requirements** - List dependencies and minimum versions\n12. **Test error paths** - Ensure error handling works correctly\n13. **Use `command -v`** - Safer than `which` for checking executables\n14. **Prefer printf over echo** - More predictable across systems\n","# Bash Defensive Patterns\n\nComprehensive guidance for writing production-ready Bash scripts using defensive programming techniques, error handling, and safety best practices to prevent common pitfalls and ensure reliability.\n\n## When to Use This Skill\n\n- Writing production automation scripts\n- Building CI\u002FCD pipeline scripts\n- Creating system administration utilities\n- Developing error-resilient deployment automation\n- Writing scripts that must handle edge cases safely\n- Building maintainable shell script libraries\n- Implementing comprehensive logging and monitoring\n- Creating scripts that must work across different platforms\n\n## Detailed patterns and worked examples\n\nDetailed pattern documentation lives in `references\u002Fdetails.md`. Read that file when the navigation tier above is insufficient.\n\n## Best Practices Summary\n\n1. **Always use strict mode** - `set -Eeuo pipefail`\n2. **Quote all variables** - `\"$variable\"` prevents word splitting\n3. **Use [[]] conditionals** - More robust than [ ]\n4. **Implement error trapping** - Catch and handle errors gracefully\n5. **Validate all inputs** - Check file existence, permissions, formats\n6. **Use functions for reusability** - Prefix with meaningful names\n7. **Implement structured logging** - Include timestamps and levels\n8. **Support dry-run mode** - Allow users to preview changes\n9. **Handle temporary files safely** - Use mktemp, cleanup with trap\n10. **Design for idempotency** - Scripts should be safe to rerun\n11. **Document requirements** - List dependencies and minimum versions\n12. **Test error paths** - Ensure error handling works correctly\n13. **Use `command -v`** - Safer than `which` for checking executables\n14. **Prefer printf over echo** - More predictable across systems\n",{"name":5,"description":7},"main","c611655e5010c748631986688c306c425c8cb644","home\u002F.agents\u002Fskills\u002Fbash-defensive-patterns","https:\u002F\u002Fgithub.com\u002Fvulbyte\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fvulbyte","vulbyte.com","2026-10-04 15:25:33",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add vulbyte\u002Fdotfiles --skill bash-defensive-patterns",{"tool":53,"command":54},"bunx","bunx skills add vulbyte\u002Fdotfiles --skill bash-defensive-patterns",{"tool":56,"command":57},"pnpm","pnpm dlx skills add vulbyte\u002Fdotfiles --skill bash-defensive-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvulbyte\u002Fdotfiles\u002Fblob\u002Fmain\u002Fhome\u002F.agents\u002Fskills\u002Fbash-defensive-patterns\u002FSKILL.md",true,[61,67],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"index.json","REFERENCE","参考文档",472,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-api-posture\u002Findex.json",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fdetails.md",9770,"https:\u002F\u002Fgithub.com\u002Fvulbyte\u002Fdotfiles\u002Fblob\u002Fmain\u002Fhome\u002F.agents\u002Fskills\u002Fbash-defensive-patterns\u002Freferences\u002Fdetails.md",[72,86,110],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":35},"01M6E1929SKBZBB8HWD4SGXDHM","grill-me","A relentless interview to sharpen a plan or design.","https:\u002F\u002Fgithub.com\u002Fvulbyte\u002Fdotfiles\u002Fblob\u002Fmain\u002Fhome\u002F.agents\u002Fskills\u002Fgrill-me\u002FSKILL.md",[],[79,80,81,82,83,84,85],"me","grill","grill me","interview","sharpen","plan","design",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":97,"publishedAt":35},"01M6E18Z7Q8NY0H9JGCNWKMDWY","find-skills","Helps users discover and install agent skills when they ask questions like \"how do I do X\", \"find a skill for X\", \"is there a skill that can...\", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.","https:\u002F\u002Fgithub.com\u002Fvulbyte\u002Fdotfiles\u002Fblob\u002Fmain\u002Fhome\u002F.agents\u002Fskills\u002Ffind-skills\u002FSKILL.md",[92],{"categoryNo":93,"categoryName":94,"taxonomyType":95,"taxonomyTypeDesc":96},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[98,99,100,101,102,103,104,105,106,107,108,109],"find skills","find","install","users","as","express","discover","do","user","ask","how","capabilities",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":35},"01M6E18WZQ0ZRE6Z0XRJDGWVR2","caveman","Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for \u002Fcaveman, \"caveman mode\", \"talk like caveman\", \"be brief\" or \"less tokens\".","https:\u002F\u002Fgithub.com\u002Fvulbyte\u002Fdotfiles\u002Fblob\u002Fmain\u002Fhome\u002F.agents\u002Fskills\u002Fcaveman\u002FSKILL.md",[],[112,117,118,27,119,120,121],"tokens","full","technical","brief","communication"]