bash-linting

bash-linting is a skill for Claude Code, Codex from abdullahkhawer/devops-skills. It costs 39 tokens per session (682 once invoked), scanned A, original, Apache-2.0.

A checking and formatting guide for Bash and other shell scripts. It uses ShellCheck to find likely errors and shfmt to check whether formatting follows the project's style.

In plain words
What is it for?
It is for checking `.sh` and `.bash` files, including executable shell scripts without those filename extensions, and optionally formatting them after approval.
Why use it?
It catches common shell-script mistakes and inconsistent formatting before they cause failures or make scripts harder to maintain. Formatting changes are shown before they are applied.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for checking .sh and .bash files, including executable shell scripts without those filename extensions, and optionally formatting them after approval.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abdullahkhawer/devops-skills/bash-linting
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 abdullahkhawer/devops-skills --skill bash-linting
Clone the repo
git clone --depth 1 https://github.com/abdullahkhawer/devops-skills

Made for: Claude Code, Codex.

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-linting

README.md
[![agentmods](https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/bash-linting/github.svg)](https://agentmods.dev/skills/abdullahkhawer/devops-skills/bash-linting)
Your own site
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/bash-linting"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/bash-linting/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-linting

Your own site · 80×15
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/bash-linting"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/bash-linting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 682 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.
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.00039 $0.00682
Opus 5.5 $0.00016 $0.00273
Sonnet 5.5 $0.00008 $0.00136
Haiku 4.5 $0.00004 $0.00068

Measured 23d ago against content hash 51eaf3edae93, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bash-linting 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 23d ago.

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.

skills/bash-linting/SKILL.md · 84 lines

How it starts

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

Bash Linting Skill

Run this skill when asked to lint, format, or check style for Bash/shell scripts.

Step 1 — Detect available tooling

which shellcheck shfmt 2>/dev/null

If neither tool is installed, inform the user and ask before installing:

brew install shellcheck shfmt

Step 2 — Find shell scripts

find . -type f \( -name "*.sh" -o -name "*.bash" \) -not -path "*/node_modules/*" -not -path "*/.git/*"

Also lint any file with a #!/usr/bin/env bash or #!/bin/bash shebang but no .sh extension:

grep -rl '^#!.*\(bash\|sh\)' . --include="*" -l 2>/dev/null | grep -v -E '\.(sh|bash)$'

Step 3 — Run linting (read-only check)

shellcheck <file>

Report all findings grouped by file, with line numbers and SC rule codes (e.g. SC2086).


Step 4 — Run formatting check

shfmt -d -i 2 -ci <file>

Show the proposed diff to the user before applying any formatting changes. -i 2 sets 2-space indentation and -ci indents switch-case bodies — adjust to match the project's existing style if it differs.


Step 5 — Apply formatting (only with user confirmation)

shfmt -w -i 2 -ci <file>

shellcheck findings almost always require a manual code change (not a safe auto-fix) — present each finding with its suggested fix and apply only after user confirmation.


Standard conventions enforced

  • Always quote variable expansions: "$var", not $var (SC2086).
  • Use [[ ... ]] over [ ... ] for conditionals in Bash scripts.
  • Use set -euo pipefail at the top of scripts to fail fast on errors, unset variables, and pipeline failures.
  • Use $(...) command substitution, not backticks.
  • Declare function-local variables with local.
  • Indentation: 2 spaces, no tabs (unless the project's .editorconfig specifies otherwise).

Rules

  • NEVER install shellcheck/shfmt without asking the user first.
  • Always run in check/diff mode first — only apply auto-fixes after the user confirms.
  • Respect the project's existing .shellcheckrc or .editorconfig if present — do not override its settings.
  • Report the exact command run and its full output — do not summarize away findings.
  • Flag any eval, unquoted glob expansion, or command injection risk (e.g. unsanitized input passed to a shell command) as a security finding, even if shellcheck does not flag it directly.

Read the full file on GitHub · 84 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. 23d ago First seen · 84 lines · 39 tokens per session scan A 51eaf3edae93

Subscribe to this mod's changes

bash-linting is a skill published in the GitHub repository abdullahkhawer/devops-skills (8 stars, last pushed 24d ago), licensed Apache-2.0. It adds 39 tokens to every session and 682 once invoked, about $0.0002 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-09-23.

Related

Other skills, from other repositories

agents-sdk-typescript-debugging

Use when troubleshooting an agent built with the Microsoft Agents SDK (@microsoft/agents-hosting and related packages). Trigger on any of these symptoms: build or TypeScript errors, crashes on startup, 401 or auth errors on incoming requests, the bot not responding to messages, .env configuration problems, Azure AD…

microsoft/Agents · 125 tokens

agents-sdk-dotnet-debugging

Use when troubleshooting an agent built with the Microsoft Agents SDK (Microsoft.Agents.Hosting.AspNetCore and related packages) in C# / .NET. Trigger on any of these symptoms: build or C# compile errors, crashes on startup, 401 or auth errors on incoming requests, the bot not responding to messages, appsettings.json…

microsoft/Agents · 136 tokens

prismer-python-debugpy

Debug Python: pdb REPL + debugpy remote (DAP).

Prismer-AI/PrismerCloud · 19 tokens

temps-plugin

Design, build, test, and distribute external Temps plugins with TypeScript/Bun; provide development and local-testing guidance for existing Rust plugins. Use for creating a plugin, adding an embedded console UI or deployment-event automation, testing host permissions and AI, installing from GitHub, or submitting a…

gotempsh/temps · 92 tokens

profiling

Use the free official .NET diagnostics CLI tools for profiling and runtime investigation in .NET repositories. USE FOR: the repo needs performance or runtime profiling for a .NET application; the user asks about slow code, high CPU, GC pressure, allocation growth, exception storms, lock. DO NOT USE FOR: replacing…

managedcode/dotnet-skills · 119 tokens

static-code-analysis-typescript

Creates, reviews, and modernizes static code analysis setups for Node.js and TypeScript repositories, covering ESLint flat config, typescript-eslint, tsconfig, Prettier, import sorting, Husky, lint-staged, package.json quality scripts, and CI quality gates. Use when setting up or auditing linting, formatting…

jaktestowac/awesome-copilot-for-testers · 92 tokens