bash

Enforce strict Bash scripting rules for safe, reliable shell code.

20|5|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/tale-project/tale --skill bash-tale-project
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bash
Source: https://github.com/tale-project/tale/tree/main/.claude/skills/bash
Command: npx skills add https://github.com/tale-project/tale --skill bash-tale-project

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill defines and enforces a strict Bash scripting contract to ensure reliable, safe shell code across the repository, preventing brittle scripts and unsafe practices.

Core Features & Use Cases

  • Enforces strict mode, quoting, array argv, trap cleanup, no eval, and redacted logging to protect secrets.
  • Documents the Docker two-file entrypoint pattern (PID-1 docker-entrypoint.sh and entrypoint.sh) for reliable process startup.
  • Ensures idempotent and re-entrant scripts with explicit readiness and guardrails, plus compatibility with shellcheck and opengrep.

Quick Start

Follow the rules in this skill to write or edit shell scripts with strict mode, proper quoting, and the two-file docker-entrypoint pattern.

Frequently Asked Questions about bash

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write safe and reliable bash scripts for Docker entrypoints?

Safe bash scripts for Docker entrypoints require strict mode, quoted expansions, array argv, trap cleanup, no eval, redacted logging, and the two-file entrypoint pattern to ensure reliable process startup.

What is the Docker two-file entrypoint pattern for shell scripts?

The Docker two-file entrypoint pattern separates process startup into a PID-1 docker-entrypoint.sh and an entrypoint.sh, ensuring reliable service initialization, idempotent execution, and proper signal handling.

How do I prevent secrets from leaking in bash script logs?

Prevent secrets from leaking in bash script logs by enforcing redacted logging practices, ensuring that sensitive environment variables and credentials are never echoed to standard output or error streams.

How do I make shell scripts idempotent and re-entrant?

Make shell scripts idempotent and re-entrant by implementing explicit readiness checks and guardrails, ensuring that repeated executions produce the same result without corrupting state or duplicating operations.

Does this bash scripting contract work with shellcheck and opengrep?

Yes, this strict bash scripting contract is designed for compatibility with shellcheck and opengrep, allowing automated static analysis to verify adherence to quoting, strict mode, and safety rules.

Why should I avoid eval in shell scripts?

Avoid eval in shell scripts because it executes arbitrary input dynamically, creating severe security vulnerabilities and brittle code; the strict scripting contract enforces safer alternatives for all dynamic operations.