ansible-generator
Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
Create, generate, write, or scaffold bash/shell scripts (.sh), automation, or CLI tools.
$ npx -y skills add akin-ozer/cc-devops-skills --skill bash-script-generator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/bash-script-generatorContext preview
The summary Claude sees to decide when to auto-load this skill.
Create, generate, write, or scaffold bash/shell scripts (.sh), automation, or CLI tools.
name: bash-script-generator description: Create, generate, write, or scaffold bash/shell scripts (.sh), automation, or CLI tools.
Generate production-ready Bash scripts with clear requirements capture, deterministic generation flow, and validation-first iteration.
Use this skill when the user asks to:
Do not use this skill for validating an existing script only. Use `devops-skills:bash-script-validator` for validation-only requests.
Follow stages in order. Do not skip a stage; use the documented fallback when blocked.
1. Confirm scope and target output path. 2. Confirm shell target:
3. Check capabilities and pick fallback path:
| Capability | Default Path | Fallback Path | |---|---|---| | Requirement clarification | AskUserQuestion tool | Ask same questions in normal chat; mark unresolved items as assumptions | | Script scaffold | `bash scripts/generate_script_template.sh ...` | Copy `assets/templates/standard-template.sh` manually or hand-craft minimal scaffold | | Validation | `devops-skills:bash-script-validator` | Local checks: `bash -n`, `shellcheck` if available, `sh -n` for POSIX mode |
If a fallback path is used, state it explicitly in the final summary.
Collect only what is needed to generate the script correctly:
Then create a `Captured Requirements` table with stable IDs.
## 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:
Use this deterministic decision tree:
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.
Use progressive disclosure. Read only docs needed for the current request.
| Need | Reference | |---|---| | Tool choice (`grep` vs `awk` vs `sed`) | `docs/text-processing-guide.md` | | Script structure and argument patterns | `docs/script-patterns.md` | | Strict mode, shell differences, safety | `docs/bash-scripting-guide.md` | | Naming, organization, and quality baseline | `docs/generation-best-practices.md` |
Citation format (required):
1. Generate scaffold:
bash scripts/generate_script_template.sh standard output-script.sh
2. Replace placeholders and add business logic. 3. Keep logging to stderr and data output to stdout unless requirements say otherwise. 4. Add comments only where logic is non-obvious.
Build a script with at least:
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):
# 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.
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
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.
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.
The task is complete only when all items are true:
A practical skill pack for DevOps work in Claude Code and Codex desktop. This repository ships 31 skills: 16 generators for scaffolding production-ready configs 14 validators for linting, security checks, and dry-run validation 1 debugger (k8s-debug) for
Repo: akin-ozer/cc-devops-skills
Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
Validate, lint, audit, or debug Ansible playbooks, roles, inventories, FQCN, tasks.
Generate/create/scaffold azure-pipelines.yml, stages, jobs, steps, or reusable templates.
Validate, lint, audit, or review azure-pipelines.yml — syntax, security, best practices.
Validate, lint, audit, or fix bash/shell/.sh scripts via ShellCheck.
Create, generate, or write Dockerfiles and multi-stage Docker images. Containerize apps.