Agent skill

Bash Script Generator

by akin-ozer in akin-ozer/cc-devops-skills

Create, generate, write, or scaffold bash/shell scripts (.sh), automation, or CLI tools.

Apache-2.0Auto-check passedDevelopment

Install Bash Script Generator

skills CLI
$ npx skills add akin-ozer/cc-devops-skills --skill bash-script-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install akin-ozer/cc-devops-skills bash-script-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/akin-ozer/cc-devops-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/devops-skills-plugin/skills/bash-script-generator .claude/skills/bash-script-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bash-script-generator
GitHub stars
319
Token cost
~1.7k tokens
SKILL.md length
671 words
Files
10 (incl. scripts, assets)
Skills in repo
30
Repo updated
First seen
Licence
Apache-2.0

At a glance

Create, generate, write, or scaffold bash/shell scripts (.sh), automation, or CLI tools.

  • Works in 7 steps: Preflight → Capture Requirements → Choose Generation Path → …
  • Tasks that involve Shell scripting
  • SKILL.md covers Overview, Trigger Phrases, Execution Model and Canonical Example Flows, plus 4 more sections
  • Runs Shell scripts from its folder; calls bash and sh

What it does

Bash Script Generator is an agent skill from akin-ozer/cc-devops-skills. Create, generate, write, or scaffold bash/shell scripts (.sh), automation, or CLI tools.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts and assets (for example `assets/templates/standard-template.sh`, `docs/bash-scripting-guide.md` and `docs/generation-best-practices.md`).

It sits in Development, covering Shell scripting. It works with Bash. The repository describes itself as: DevOps skills for Claude Code and Codex. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Shell scripting

Example prompts

  • “/bash-script-generator”

Requirements

  • A Bash shell

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Preflight
  2. Capture Requirements
  3. Choose Generation Path
  4. Load Only Relevant References
  5. Generate Script
  6. Validate and Iterate
  7. Final Response Contract

What it can do on your machine

Read from SKILL.md and the folder at commit 276af75. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • sh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • gnu.org
    • pubs.opengroup.org
    • shellcheck.net

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bash Script Generator loads about 1.7k tokens when it runs. Until then it costs about 28 tokens; SKILL.md has 671 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from akin-ozer/cc-devops-skills at commit 276af75, republished under its Apache-2.0 licence (© akin-ozer). 671 words, ~1,699 tokens.

Download SKILL.mdSave it as .claude/skills/bash-script-generator/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
bash-script-generator
description
Create, generate, write, or scaffold bash/shell scripts (.sh), automation, or CLI tools.

Bash Script Generator

Overview

Generate production-ready Bash scripts with clear requirements capture, deterministic generation flow, and validation-first iteration.

Trigger Phrases

Use this skill when the user asks to:

  • Create, generate, write, or build a Bash/shell script
  • Convert manual CLI steps into an automation script
  • Build a text-processing script using grep, awk, or sed
  • Create an operations helper script, cron script, or CI utility script

Do not use this skill for validating an existing script only. Use devops-skills:bash-script-validator for validation-only requests.

Execution Model

Follow stages in order. Do not skip a stage; use the documented fallback when blocked.

Stage 0: Preflight
  1. Confirm scope and target output path.
  2. Confirm shell target:
  • Default: bash
  • If portability is requested: POSIX sh
  1. Check capabilities and pick fallback path:
CapabilityDefault PathFallback Path
Requirement clarificationAskUserQuestion toolAsk same questions in normal chat; mark unresolved items as assumptions
Script scaffoldbash scripts/generate_script_template.sh ...Copy assets/templates/standard-template.sh manually or hand-craft minimal scaffold
Validationdevops-skills:bash-script-validatorLocal checks: bash -n, shellcheck if available, sh -n for POSIX mode

If a fallback path is used, state it explicitly in the final summary.

Stage 1: Capture Requirements

Collect only what is needed to generate the script correctly:

  • Input source and format
  • Output destination and format
  • Error handling behavior (fail-fast/retry/continue)
  • Security constraints (sensitive data, privilege level)
  • Performance constraints (large files, parallelism)
  • Portability requirement (Bash-only vs POSIX)

Then create a Captured Requirements table with stable IDs.

markdown
## Captured Requirements

| Requirement ID | Description | Source | Implementation Plan |
|---|---|---|---|
| REQ-001 | Parse nginx logs from file input | User | `parse_args()` + `validate_file()` + `awk` parser |
| REQ-002 | Output top 10 errors | User | `analyze_errors()` + `sort | uniq -c | head -10` |
| REQ-003 | Handle large files efficiently | Assumption | Single-pass `awk`; avoid multi-pass loops |

Rules:

  • Every major design decision maps to at least one REQ-*.
  • Keep assumptions explicit and minimal.
Stage 2: Choose Generation Path

Use this deterministic decision tree:

text
Need multi-command architecture, unusual control flow, or strict non-template conventions?
├─ Yes -> Custom generation
└─ No
   Need standard CLI skeleton (usage/logging/arg parsing/cleanup)?
   ├─ Yes -> Template-first generation
   └─ No -> Custom generation

Template-first is the default for single-purpose CLI utilities.

Stage 3: Load Only Relevant References

Use progressive disclosure. Read only docs needed for the current request.

NeedReference
Tool choice (grep vs awk vs sed)docs/text-processing-guide.md
Script structure and argument patternsdocs/script-patterns.md
Strict mode, shell differences, safetydocs/bash-scripting-guide.md
Naming, organization, and quality baselinedocs/generation-best-practices.md

Citation format (required):

  • [Ref: docs/<file>.md -> <section>]
Stage 4: Generate Script
Path A: Template-first (default)
  1. Generate scaffold:
bash
bash scripts/generate_script_template.sh standard output-script.sh
  1. Replace placeholders and add business logic.
  2. Keep logging to stderr and data output to stdout unless requirements say otherwise.
  3. Add comments only where logic is non-obvious.
Path B: Custom generation

Build a script with at least:

  • Shebang and strict mode
  • usage()
  • parse_args()
  • Input validation and dependency checks
  • Main workflow function(s)
  • Predictable exit codes
Show full SKILL.md (284 more words)Show less
Stage 5: Validate and Iterate

Default validation path:

  1. Invoke devops-skills:bash-script-validator
  2. Apply fixes
  3. Re-run validation
  4. Repeat until checks pass or blocker is identified

Fallback validation path (when validator skill is unavailable):

bash
# Deterministic local gate for this skill:
bash scripts/run_ci_checks.sh --skip-shellcheck

# CI gate (shellcheck required):
bash scripts/run_ci_checks.sh --require-shellcheck

If any check is skipped, include Skipped check, Reason, and Risk in the output.

Stage 6: Final Response Contract

Always return:

  1. Generated script path
  2. Requirements traceability (REQ-* -> implementation)
  3. Validation results with rerun status
  4. Citations in standard format
  5. Any assumptions/fallbacks used

Canonical Example Flows

Example A: Full Flow (Template-first)
  1. Clarify missing data format and output expectations.
  2. Capture REQ-* table.
  3. Choose template-first path.
  4. Generate scaffold with scripts/generate_script_template.sh.
  5. Implement logic and map functions to REQ-*.
  6. Validate with devops-skills:bash-script-validator and rerun until clean.
  7. Return final summary with citations.
Example B: Constrained Environment Flow

Use this when AskUserQuestion, validator skill, or shellcheck is unavailable:

  1. Ask clarifying questions in chat.
  2. Mark unresolved items as assumptions in Captured Requirements.
  3. Generate from template script or template file copy fallback.
  4. Run bash -n (and sh -n if relevant).
  5. If shellcheck is missing, report skip with risk and mitigation.

Done Criteria

The task is complete only when all items are true:

  • Trigger matched and scope confirmed
  • Captured Requirements table exists with REQ-* IDs
  • Template-first vs custom decision is documented
  • Script is generated with deterministic structure
  • Validation executed and rerun policy applied
  • Any skipped checks include explicit reason and risk
  • Final response includes traceability, citations, and assumptions

Helper Scripts and Assets

  • Script generator: scripts/generate_script_template.sh
  • Deterministic CI gate: scripts/run_ci_checks.sh
  • Regression test suite: scripts/test_generator.sh
  • Standard scaffold: assets/templates/standard-template.sh
  • Example output style: examples/log-analyzer.sh

Reference Docs

  • docs/bash-scripting-guide.md
  • docs/script-patterns.md
  • docs/generation-best-practices.md
  • docs/text-processing-guide.md

External References

© akin-ozer, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (scripts, assets) in devops-skills-plugin/skills/bash-script-generator of akin-ozer/cc-devops-skills.

  • SKILL.md
  • assets/templates/standard-template.sh
  • docs/bash-scripting-guide.md
  • docs/generation-best-practices.md
  • docs/script-patterns.md
  • docs/text-processing-guide.md
  • examples/log-analyzer.sh
  • scripts/generate_script_template.sh
  • scripts/run_ci_checks.sh
  • scripts/test_generator.sh

Open the folder on GitHubat commit 276af75

Compare with similar skills

Bash Script Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bash Script Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bash Script Generator this skillakin-ozer/cc-devops-skills319—~1.7kAutomated safety check: PassApache-2.0
Mole Bug Patternstw93/Mole70k—~2kAutomated safety check: PassGPL-3.0
CLI DeveloperJeffallan/claude-skills12k2 repos~1.2kAutomated safety check: PassMIT
JSON Processing with jqcharmbracelet/crush29k—~746Automated safety check: PassCustom licence
Shellm Architecture Referencelaude-institute/headlong1.2k—~2kAutomated safety check: NotesApache-2.0
Bash Scriptingpromovaweb/setupvibe1015 repos~1.2kAutomated safety check: PassGPL-3.0

Similar skills

  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    70k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • CLI Developer

    Jeffallan/claude-skills

    Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.

    12k GitHub starsUsed in 2 repos~1.2k tokens
    DevelopmentAuto-check passed
  • JSON Processing with jq

    charmbracelet/crush

    Explains the jq command built into Crush for querying, filtering and reshaping JSON, including its supported flags and where it differs from standard jq.

    29k GitHub stars~746 tokensUpdated today
    DevelopmentAuto-check passed
  • Shellm Architecture Reference

    laude-institute/headlong

    Explains how shellm's bash-based recursive LLM shell fits together - its core engine, identity system, memory, skills and trajectory log.

    1.2k GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Bash Scripting

    promovaweb/setupvibe

    Bash scripting workflow for creating production-ready shell scripts with defensive patterns, error handling, and testing.

    101 GitHub starsUsed in 5 repos~1.2k tokens
    DevelopmentAuto-check passed
  • Cpp

    crazyguitar/cppcheatsheet

    Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics.

    290 GitHub stars~1.8k tokensUpdated today
    DevelopmentAuto-check passed

More from akin-ozer/cc-devops-skills

All 30 skills in this repo
  • GitHub Actions Generator

    akin-ozer/cc-devops-skills

    Create, generate, or scaffold GitHub Actions workflows, action.yml, or .github/workflows CI/CD pipelines.

    319 GitHub stars~3.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Helm Generator

    akin-ozer/cc-devops-skills

    Create, scaffold, or generate Helm charts, Chart.yaml, values.yaml, templates, helpers.

    319 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Jenkinsfile Generator

    akin-ozer/cc-devops-skills

    Generate/create/scaffold Jenkinsfile — declarative, scripted, shared library, CI/CD pipelines.

    319 GitHub stars~3.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Dockerfile Validator

    akin-ozer/cc-devops-skills

    Validate, lint, audit, or scan a Dockerfile for security and best practices.

    319 GitHub stars~2.3k tokensUpdated 2 mo ago
    Auto-check passed
  • GitHub Actions Validator

    akin-ozer/cc-devops-skills

    Validate, lint, audit, fix GitHub Actions workflows (.github/workflows).

    319 GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Jenkinsfile Validator

    akin-ozer/cc-devops-skills

    Validate, lint, audit, or check Jenkinsfiles and shared libraries.

    319 GitHub stars~2.7k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Bash Script Generator

What does Bash Script Generator do?

Create, generate, write, or scaffold bash/shell scripts (.sh), automation, or CLI tools. Bash Script Generator is an agent skill from akin-ozer/cc-devops-skills.sh), automation, or CLI tools.

When should I use Bash Script Generator?

Bash Script Generator fits situations like: tasks that involve Shell scripting.

How do I install Bash Script Generator in Claude Code?

Run `npx skills add akin-ozer/cc-devops-skills --skill bash-script-generator -a claude-code`. Or copy the skill folder (devops-skills-plugin/skills/bash-script-generator in akin-ozer/cc-devops-skills) into .claude/skills/bash-script-generator in your project. Claude Code loads it when a task matches its description.

How do I install Bash Script Generator in Codex?

Run `npx skills add akin-ozer/cc-devops-skills --skill bash-script-generator -a codex`. Or copy the skill folder (devops-skills-plugin/skills/bash-script-generator in akin-ozer/cc-devops-skills) into .agents/skills/bash-script-generator in your project. Codex loads it when a task matches its description.

Can I use Bash Script Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add akin-ozer/cc-devops-skills --skill bash-script-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bash-script-generator, .gemini/skills/bash-script-generator, .github/skills/bash-script-generator and .opencode/skills/bash-script-generator in your project.

What does Bash Script Generator need to run?

Going by SKILL.md and its folder, Bash Script Generator needs a shell for the scripts in its folder and the command-line tools its instructions call (bash and sh). Our summary lists: A Bash shell.

Does Bash Script Generator access the network?

SKILL.md names 3 domains. As links in the text: gnu.org, pubs.opengroup.org and shellcheck.net. This is read from the text; nothing was executed.

Is Bash Script Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Bash Script Generator use?

Bash Script Generator is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bash Script Generator use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bash Script Generator?

Skills that share tags, products or a category with Bash Script Generator: Mole Bug Patterns (tw93/Mole, 70k stars), CLI Developer (Jeffallan/claude-skills, 12k stars), JSON Processing with jq (charmbracelet/crush, 29k stars) and Shellm Architecture Reference (laude-institute/headlong, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bash Script Generator?

akin-ozer (a GitHub user) maintains it in akin-ozer/cc-devops-skills, which has 319 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on July 26, 2026.

Source: akin-ozer/cc-devops-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.