bash-patch-safe

Detect and prevent errors in patched Bash scripts using standard utilities.

2|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/Wike-CHI/acquisition-agent --skill bash-patch-safe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bash-patch-safe
Source: https://github.com/Wike-CHI/acquisition-agent/tree/main/skills/bash-patch-safe
Command: npx skills add https://github.com/Wike-CHI/acquisition-agent --skill bash-patch-safe

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Modifying Bash scripts with patch tools or manual edits can unintentionally remove function definitions, break function calls, or disrupt the order of definitions, leading to runtime errors that are hard to detect.

Core Features & Use Cases

  • Detect duplicate function definitions after a patch.
  • Verify that the script exits immediately when invoked with the --help option.
  • Perform syntax validation using bash -n.
  • Ensure essential calls such as parse_args "$@" and main "$@" are present in the correct order.
  • Use case: after applying a patch to a deployment automation script, run this skill to confirm the script still operates safely.

Quick Start

Use the bash-patch-safe skill to validate 'script.sh' after a patch.

Frequently Asked Questions about bash-patch-safe

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

FAQPage Schema
How do I validate a Bash script after applying a patch?

To validate a Bash script after a patch, run this skill to execute syntax validation using `bash -n`, detect duplicate function definitions, and confirm essential entry points like `main "$@"` remain present and correctly ordered.

What causes a Bash script to break after a manual text edit?

Bash scripts break after manual edits when function definitions are unintentionally removed, function calls are disrupted, or duplicate functions are introduced, leading to runtime errors that are difficult to detect without validation checks.

How can I check if a Bash script exits immediately when invoked with --help?

You can verify immediate `--help` execution by running this validation skill, which enforces checks to ensure the script properly exits when invoked with the `--help` option alongside performing standard Bash syntax validation.

Does this Bash script validation require any external dependencies?

No, this Bash script validation does not require external dependencies, as it enforces checks like duplicate function detection, syntax validation, and entry point verification using only standard Bash utilities.

What is the best way to prevent duplicate function definitions in Bash scripts?

The best way to prevent duplicate function definitions is to run this validation skill after modifying your Bash scripts, which actively detects duplicates and verifies that functions remain defined, called, and correctly ordered.