Shell

From pproenca/dot-skills · View interactive version

Shell is an AI agent skill from the GitHub repository pproenca/dot-skills. Shell scripting best practices for writing safe, portable, and maintainable bash/sh scripts. Use when writing, reviewing, or refactoring shell scripts, Dockerfile RUN commands, Makefile recipes, CI pipeline scripts, cron jobs, or systemd ExecStart directives. Triggers on bash, sh, POSIX, ShellCheck,

How to use this skill

Skill file

Shell Scripts Best Practices (Community)

Comprehensive best practices guide for shell scripting, designed for AI agents and LLMs. Contains 49 rules across 9 categories, prioritized by impact from critical (safety, portability) to incremental (style). Each rule includes detailed explanations, real-world examples comparing incorrect vs. correct implementations, and specific impact metrics.

When to Apply

Reference these guidelines when:

Rule Categories by Priority

| Priority | Category | Impact | Prefix | Rules |

|----------|----------|--------|--------|-------|

| 1 | Safety & Security | CRITICAL | safety- | 6 |

| 2 | Portability | CRITICAL | port- | 5 |

| 3 | Error Handling | HIGH | err- | 8 |

| 4 | Variables & Data | HIGH | var- | 5 |

| 5 | Quoting & Expansion | MEDIUM-HIGH | quote- | 6 |

| 6 | Functions & Structure | MEDIUM | func- | 5 |

| 7 | Testing & Conditionals | MEDIUM | test- | 5 |

| 8 | Performance | LOW-MEDIUM | perf- | 6 |

| 9 | Style & Formatting | LOW | style- | 3 |

Quick Reference

1. Safety & Security (CRITICAL)

2. Portability (CRITICAL)

3. Error Handling (HIGH)

4. Variables & Data (HIGH)

5. Quoting & Expansion (MEDIUM-HIGH)

6. Functions & Structure (MEDIUM)

7. Testing & Conditionals (MEDIUM)

8. Performance (LOW-MEDIUM)

9. Style & Formatting (LOW)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

| File | Description |

|------|-------------|

| AGENTS.md | Complete compiled guide with all rules |

| references/_sections.md | Category definitions and ordering |

| assets/templates/_template.md | Template for new rules |

| metadata.json | Version and reference information |

Key Sources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.