bash-to-script

Community

Fix Bash parse errors, instantly.

Authorcowwoc
Version1.0.0
Installs0

System Documentation

What problem does it solve?

The Bash tool can struggle with complex syntax like parameter expansion (${VAR##pattern}) or nested command substitutions, leading to cryptic parse errors. This Skill provides a reliable workaround by converting such commands into temporary script files, ensuring smooth execution.

Core Features & Use Cases

  • Parse Error Prevention: Eliminates common Bash tool parse errors by encapsulating complex commands in a script.
  • Pattern Recognition: Identifies problematic bash patterns, including parameter expansion with pattern removal, complex jq pipelines, and multiple nested expansions.
  • Automated Conversion: Automatically converts a problematic command into a cat > /tmp/script.sh << 'EOF' ... EOF; bash /tmp/script.sh structure.
  • Error Handling: Provides templates for scripts with set -euo pipefail and trap for robust execution.
  • Use Case: If you encounter a (eval):1: parse error near '(' when trying to extract an agent ID using a complex jq pipeline and parameter expansion, use this Skill to convert the command into a temporary script, allowing it to execute successfully without manual debugging.

Quick Start

If a bash command fails with a parse error, use this skill: Skill: bash-to-script Command: | SESSION_ID="abc-123" AGENT_ID=$(jq -r 'select(.toolUseResult.agentId)' /path/${SESSION_ID}.jsonl | tail -1) echo "$AGENT_ID" > output.txt

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: bash-to-script
Download link: https://github.com/cowwoc/styler/archive/main.zip#bash-to-script

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.