bash-defensive-patterns
하는 일
이 도구는 더 안전하고 안정적인 명령줄 스크립트(Bash)를 작성하도록 돕습니다. 흔한 실수를 피하는 방법과, 예상치 못한 상황에서도 스크립트가 올바르게 작동하도록 하는 방법을 알려 줍니다.
사용하는 경우
- ✓컴퓨터 작업을 자동화하는 스크립트를 만들 때.
- ✓서버나 클라우드에서 실행되는 도구를 만들 때.
- ✓스크립트가 쉽게 실패하지 않고 견고해야 할 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/bash-defensive-patterns/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“파일을 삭제하기 전에 파일이 존재하는지 확인하는 Bash 스크립트는 어떻게 작성하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 실행할 작업을 확인하고, 스크립트가 받는 정보가 올바른지 확인하고, 오류를 보고하도록 스크립트를 설정하는 등의 방법을 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Bash Defensive Patterns
Comprehensive guidance for writing production-ready Bash scripts using defensive programming techniques, error handling, and safety best practices to prevent common pitfalls and ensure reliability.
Use this skill when
- Writing production automation scripts
- Building CI/CD pipeline scripts
- Creating system administration utilities
- Developing error-resilient deployment automation
- Writing scripts that must handle edge cases safely
- Building maintainable shell script libraries
- Implementing comprehensive logging and monitoring
- Creating scripts that must work across different platforms
Do not use this skill when
- You need a single ad-hoc shell command, not a script
- The target environment requires strict POSIX sh only
- The task is unrelated to shell scripting or automation
Instructions
- Confirm the target shell, OS, and execution environment.
- Enable strict mode and safe defaults from the start.
- Validate inputs, quote variables, and handle files safely.
- Add logging, error traps, and basic tests.
Safety
- Avoid destructive commands without confirmation or dry-run flags.
- Do not run scripts as root unless strictly required.
Refer to resources/implementation-playbook.md for detailed patterns, checklists, and templates.
Resources
resources/implementation-playbook.mdfor detailed patterns, checklists, and templates.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문
「Bash 스크립트」란 무엇인가요?
작업을 자동으로 수행하도록 컴퓨터에 내리는 명령의 짧은 순서입니다.
왜 「방어적 스크립트」가 필요한가요?
중요한 파일을 실수로 삭제하거나 갑자기 멈추는 등, 스크립트가 의도치 않은 문제를 일으키지 않도록 하기 위해서입니다.
이 도구가 스크립트를 대신 작성해 주나요?
아니요, 모범 사례를 가르쳐 주어 사용자가 더 나은 스크립트를 직접 작성하도록 돕습니다.
상세 정보
작성자의 원본 설명
Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.
인기도
- GitHub 스타
- 48k
- 순위
- #4014
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.