bash-script-validator

bash-script-validator is a skill for Claude Code from akin-ozer/cc-devops-skills. It costs 22 tokens per session (1,756 once invoked), scanned A, original, Apache-2.0.

A skill for checking Bash, POSIX shell, and other .sh scripts. It checks syntax, runs ShellCheck when available, and performs security, portability, and optimization checks.

In plain words
What is it for?
Use it to validate, lint, audit, fix, or review shell scripts, including checking whether a script follows POSIX shell rules.
Why use it?
It finds script errors and portability or security problems before they cause failures in development or CI.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the devops-skills-plugin plugin — 31 skills shipped together

Good fit Use it to validate, lint, audit, fix, or review shell scripts, including checking whether a script follows POSIX shell rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/akin-ozer/cc-devops-skills/bash-script-validator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add akin-ozer/cc-devops-skills --skill bash-script-validator
Clone the repo
git clone --depth 1 https://github.com/akin-ozer/cc-devops-skills

Made for: Claude Code.

Or install devops-skills-plugin, the plugin that ships this one along with the rest of its 31 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bash-script-validator

README.md
[![agentmods](https://agentmods.dev/badge/skills/akin-ozer/cc-devops-skills/bash-script-validator/github.svg)](https://agentmods.dev/skills/akin-ozer/cc-devops-skills/bash-script-validator)
Your own site
<a href="https://agentmods.dev/skills/akin-ozer/cc-devops-skills/bash-script-validator"><img src="https://agentmods.dev/badge/skills/akin-ozer/cc-devops-skills/bash-script-validator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bash-script-validator

Your own site · 80×15
<a href="https://agentmods.dev/skills/akin-ozer/cc-devops-skills/bash-script-validator"><img src="https://agentmods.dev/badge/skills/akin-ozer/cc-devops-skills/bash-script-validator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,756 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket warn 15 Sept 2026
  • Snyk warn 15 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.01756
Opus 5.5 $0.00009 $0.00702
Sonnet 5.5 $0.00004 $0.00351
Haiku 4.5 $0.00002 $0.00176

Measured 2mo ago against content hash 13059ee80d91, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bash-script-validator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 8 executable files (examples/bad-bash.sh, examples/bad-shell.sh, examples/good-bash.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

devops-skills-plugin/skills/bash-script-validator/SKILL.md · 247 lines

How it starts

The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bash Script Validator

Overview

This skill validates Bash and POSIX shell scripts with layered checks:

  1. Syntax validation (bash -n or sh -n)
  2. ShellCheck static analysis (system binary or wrapper fallback)
  3. Custom security, portability, and optimization checks

Use the default flow below, then branch to fallbacks only when the environment is constrained.

Trigger Guidance

Use this skill when the request includes script quality, linting, syntax checking, or shell portability work.

Trigger Phrases

  • "Validate this bash script"
  • "Lint this .sh file"
  • "Find security issues in this shell script"
  • "Why does this script fail ShellCheck?"
  • "Make this script POSIX compliant"
  • "Review this shell script before CI"

Non-Trigger Examples

  • General Linux command questions with no script file
  • Kubernetes, Terraform, or pipeline validation tasks that do not involve shell scripts
  • Pure prose editing tasks

Deterministic Execution Model

Run commands from this skill directory:

cd devops-skills-plugin/skills/bash-script-validator

Step 1: Preflight

  1. Confirm target path exists and is readable.
  2. Confirm bash is available.
  3. Determine whether fixes can be applied directly (write access) or only suggested (read-only).

Step 2: Run Baseline Validation (Default Path)

bash scripts/validate.sh <script-path>

For deterministic stage behavior, set the ShellCheck provider explicitly:

# Modes: auto (default), system, wrapper, disabled
VALIDATOR_SHELLCHECK_MODE=system bash scripts/validate.sh <script-path>

Record:

  • Detected shell type
  • Exit code (0 clean, 1 warnings, 2 errors)
  • All reported issue lines and ShellCheck codes (SC####) when present

Step 3: Load Only Needed References

Progressive disclosure by issue type:

  • ShellCheck code explanations: docs/shellcheck-reference.md
  • General fix patterns and security mistakes: docs/common-mistakes.md
  • Bash-only behavior: docs/bash-reference.md
  • POSIX portability or bashism fixes: docs/shell-reference.md
  • Text-processing optimization issues: docs/grep-reference.md, docs/awk-reference.md, docs/sed-reference.md, docs/regex-reference.md (only when directly relevant)

Read the full file on GitHub · 247 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 247 lines · 22 tokens per session scan A 13059ee80d91

Subscribe to this mod's changes

bash-script-validator is a skill published in the GitHub repository akin-ozer/cc-devops-skills (332 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 22 tokens to every session and 1,756 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

bash-script-validator compared with skills from other repositories

bash-script-validator next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bash-script-validatorakin-ozer/cc-devops-skillsSkill3323mo agoApache-2.0A22Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16kyesterdayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7k3d agoMITA71Claude Code, Codex
cwv-optimizeradobe/skillsSkill319yesterdayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2kyesterdayApache-2.0A15Claude Code, Codex
incident-response-incident-responsermyndharis/antigravity-skillsSkill1.9k23d agoMITA36Claude Code
triaging-web-analytics-supportPostHog/posthogSkill41kyesterdaynoneA151Claude Code, Codex