본문으로 건너뛰기
Skillpedia
일반 코딩48k · #4014

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/bash-defensive-patterns/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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

  1. Confirm the target shell, OS, and execution environment.
  2. Enable strict mode and safe defaults from the start.
  3. Validate inputs, quote variables, and handle files safely.
  4. 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.md for 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.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4014
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬