bash

Standardize EOS bash scripts with strict mode, flock locking, and logging.

1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/antonyfmunoz/OS --skill bash-antonyfmunoz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bash
Source: https://github.com/antonyfmunoz/OS/tree/main/skills/tools/bash
Command: npx skills add https://github.com/antonyfmunoz/OS --skill bash-antonyfmunoz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents fragile shell scripting in the EOS codebase by standardizing error handling, locking, logging, and safe environment bootstrapping for repeatable automation.

Core Features & Use Cases

  • Production-ready scripting standards: Uses strict mode patterns (set -euo pipefail), safe quoting, predictable logging, and reliable exit-code behavior for cron and utility scripts.
  • Concurrency control for scheduled tasks: Applies flock-based locking patterns to prevent overlapping cron runs from corrupting state or double-processing work.
  • Autonomous agent wrapper execution: Supports claude -p orchestration with allowed tool allowlists, budget caps, and prompt-handling patterns for nightly/weekly workflows.

Quick Start

Ask the AI to help you write or debug an EOS cron-invoked bash wrapper script that uses strict mode, date-stamped logs, flock locking, and captures both stdout and stderr to the correct log file.

Frequently Asked Questions about bash

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

FAQPage Schema
How do I prevent overlapping cron jobs in bash scripts?

Preventing overlapping cron jobs in bash scripts requires flock-based locking patterns with exec to enforce mutual exclusion. This concurrency control stops scheduled tasks from corrupting state or double-processing work during unattended execution.

What is the best way to standardize shell scripting for unattended automation?

Standardizing shell scripting for unattended automation requires strict mode patterns using set -euo pipefail, safe quoting, predictable logging, and reliable exit-code behavior to ensure repeatable and robust script execution.

How do I safely orchestrate claude -p agents in a nightly cron wrapper?

Safely orchestrating claude -p agents in a nightly cron wrapper involves applying tool allowlists, budget caps, and prompt-handling patterns. This is combined with strict mode and trap-based cleanup for reliable autonomous execution.

Why does my bash cron script fail silently without logging stderr?

Bash cron scripts fail silently without logging stderr when redirection is misconfigured. Correct stderr redirection to date-stamped log files captures both streams, while trap-based cleanup ensures predictable exit codes during failures.

Does this bash scripting approach require a specific shell version?

This bash scripting approach requires Bash 5.2-compatible patterns to support strict mode, exec+flock mutual exclusion, and trap-based cleanup for safe environment bootstrapping in production automation.

What is trap-based cleanup used for in shell automation scripts?

Trap-based cleanup in shell automation scripts is used to handle interruptions and ensure reliable exit-code behavior. It enforces safe environment bootstrapping by executing cleanup routines when unattended scripts fail or terminate unexpectedly.