Skip to content
cccskills
FreePublished on GitHub

bash-defensive-patterns

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.

The English summary is being prepared. Showing the original description.

See how to install

Files included (2)

  • SKILL.md1.6 KB
  • resources/implementation-playbook.md10.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.

The English summary is being prepared. Showing the original description.

rmyndharis/antigravity-skills1.8KUpdated Oct 15, 2026

Systematic improvement of existing agents through performance analysis, prompt engineering, and continuous iteration.

The English summary is being prepared. Showing the original description.

rmyndharis/antigravity-skills1.8KUpdated Oct 15, 2026

Optimize multi-agent systems with coordinated profiling, workload distribution, and cost-aware orchestration. Use when improving agent performance, throughput, or reliability.

The English summary is being prepared. Showing the original description.

rmyndharis/antigravity-skills1.8KUpdated Oct 15, 2026

Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY for LLM features, chatbots, AI agents, or AI-powered applications.

The English summary is being prepared. Showing the original description.

rmyndharis/antigravity-skills1.8KUpdated Oct 15, 2026

Build production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.

The English summary is being prepared. Showing the original description.

rmyndharis/antigravity-skills1.8KUpdated Oct 15, 2026

Migrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.

The English summary is being prepared. Showing the original description.

rmyndharis/antigravity-skills1.8KUpdated Oct 15, 2026

See all skills by rmyndharis

Report a problem with this skill