shell

pproenca/dot-skills · updated Apr 24, 2026

$npx skills add https://github.com/pproenca/dot-skills --skill shell
0 commentsdiscussion
summary

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.

skill.md

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:

  • Writing new bash or POSIX shell scripts
  • Reviewing shell scripts for security vulnerabilities
  • Debugging scripts that fail silently or behave unexpectedly
  • Porting scripts between Linux, macOS, and containers
  • Optimizing shell script performance
  • Setting up CI/CD pipelines with shell scripts

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

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.672 reviews
  • Anaya Ghosh· Dec 28, 2024

    We added shell from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Hana Tandon· Dec 20, 2024

    shell is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Mateo Martinez· Dec 16, 2024

    I recommend shell for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Hassan Desai· Dec 16, 2024

    Useful defaults in shell — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Ganesh Mohane· Dec 12, 2024

    shell fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Harper Perez· Dec 12, 2024

    shell fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Soo Johnson· Dec 12, 2024

    Solid pick for teams standardizing on skills: shell is focused, and the summary matches what you get after install.

  • Noor Tandon· Nov 19, 2024

    shell reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Hana Nasser· Nov 11, 2024

    shell has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Fatima Li· Nov 11, 2024

    Useful defaults in shell — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

showing 1-10 of 72

1 / 8