Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

Write safe, portable shell scripts v1.0.0

Use this resource to write, review or harden bash or sh scripts

New

  • 471 downloads
  • 125 likes
  • 175 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install safe-shell-scripting-practices

With no option, the skill goes to ~/.agents/skills/; add --agent claude-code (or codex, cursor…) to target an agent.

First time: connect the CLI with

npx --yes palatekit@latest login

The agent applies 49 rules ranked by impact: strict mode with set -euo pipefail, variable quoting, trap-based cleanup and exit codes. You get scripts that fail visibly instead of silently.

Mostly picked by

Updated November 2, 2026

Card for the “Write safe, portable shell scripts” skill

Details

Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • AGENTS.md: rules by category, from safety to performance
  • references/err-strict-mode.md: strict mode; references/err-trap-cleanup.md: cleanup with trap

Good fit for

  • A deployment script fails without a clear message
  • You are writing a CI job or cron task in bash

Not for

    Tags

    • bash
    • shell
    • posix
    • shellcheck

    About

    You say

    “Review this backup script and make it safe with set -euo pipefail.”

    Card for the “Write safe, portable shell scripts” skill

    Skill published by pproenca under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Install the skill in your agent's skills folder
    2. Ask your agent to write, review or harden bash or sh scripts
    3. Review and adjust the result

    Content preview

    Files

    • AGENTS.md9.3 KB
    • assets/templates/_template.md1 KB
    • LICENSE1.1 KB
    • metadata.json1 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • README.md3.4 KB
    • references/_sections.md2.1 KB
    • references/err-check-commands.md2.2 KB
    • references/err-debug-tracing.md2.5 KB
    • references/err-exit-codes.md1.8 KB
    • references/err-pipefail.md2.1 KB
    • references/err-shellcheck.md3.2 KB
    • references/err-stderr-messages.md2.3 KB
    • references/err-strict-mode.md2.8 KB
    • references/err-trap-cleanup.md2.5 KB
    • references/func-avoid-aliases.md2.9 KB
    • references/func-documentation.md3.2 KB
    • references/func-main-pattern.md2.6 KB
    • references/func-return-values.md2.9 KB
    • references/func-single-purpose.md3 KB
    • references/perf-avoid-subshells.md3 KB
    • references/perf-batch-operations.md3.2 KB
    • references/perf-builtins-over-external.md2.8 KB
    • references/perf-parameter-expansion.md3.5 KB
    • references/perf-process-substitution.md3.3 KB
    • references/perf-read-files.md3.1 KB
    • references/port-avoid-bashisms.md1.8 KB
    • references/port-export-syntax.md2.2 KB
    • references/port-printf-over-echo.md1.9 KB
    • references/port-shebang-selection.md1.9 KB
    • references/port-test-portability.md1.8 KB
    • references/quote-always-quote-variables.md2.1 KB
    • references/quote-brace-expansion.md2.6 KB
    • references/quote-command-substitution.md2.3 KB
    • references/quote-dollar-at.md2.4 KB
    • references/quote-glob-safety.md2.8 KB
    • references/quote-here-documents.md3 KB
    • references/safety-absolute-paths.md2 KB
    • references/safety-argument-injection.md1.5 KB
    • references/safety-command-injection.md1.6 KB
    • references/safety-eval-avoidance.md1.5 KB
    • references/safety-suid-forbidden.md1.7 KB
    • references/safety-temp-files.md1.5 KB
    • references/style-comments.md3.2 KB
    • references/style-file-structure.md2 KB
    • references/style-indentation.md2.4 KB
    • references/test-arithmetic.md3 KB
    • references/test-case-patterns.md3.2 KB
    • references/test-double-brackets.md3 KB
    • references/test-explicit-empty.md2.8 KB
    • references/test-file-operators.md3.2 KB
    • references/var-default-values.md2.5 KB
    • references/var-local-scope.md2.3 KB
    • references/var-naming-conventions.md2.4 KB
    • references/var-readonly-constants.md2.2 KB
    • references/var-use-arrays.md2.2 KB
    • SKILL.md7.7 KB

    Origin and licence

    Listed unmodified

    Author
    pproenca
    Source
    github.com/pproenca/dot-skills/tree/cf93c57cac89d6fc3e4194686000411567f5caf3/skills/.experimental/shell
    Licence
    MIT

    Notice

    « shell » (pproenca, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.