JSON output allows automated remediation and summary workflows.
Repo Conventions
Shell scripts should pass shellcheck before merge.
Do not weaken checks to force a green run.
Trigger Examples
Should trigger: "Lint this installer shell script and fix warnings."
Should trigger: "Explain why this shellcheck code appears."
Should not trigger: "Transform this JSON payload into YAML."
1---2name: tool-shellcheck-23description: tool-shellcheck4---5# tool-shellcheck67## When To Use89- Lint shell scripts for quoting, expansion, and portability issues.10- Validate generated shell snippets before execution.11- Produce structured diagnostics for script quality gates.1213## Trusted Commands1415```bash16shellcheck script.sh17shellcheck --shell=bash script.sh18shellcheck --format=json script.sh19shellcheck --format=gcc script.sh20shellcheck --exclude=SC2034 script.sh21echo '#!/bin/bash' | shellcheck -22shellcheck --severity=error script.sh23```2425## Safe Defaults2627- Run shellcheck on every changed shell script.28- Specify shell with `--shell=` when shebang is missing or ambiguous.29- Treat warnings as actionable unless there is a justified exception.3031## Common Pitfalls3233- SC code warnings are often real bugs, not stylistic noise.34- Scripts without shebang may be interpreted with unintended shell defaults.35- Excluding too many SC rules weakens real protections.3637## Output Interpretation3839- Human-readable output includes line references and SC code IDs.40- `--format=json` provides machine-parseable findings.4142## Why It Matters For Agents4344- Agents frequently generate shell scripts; shellcheck catches failures early.45- JSON output allows automated remediation and summary workflows.4647## Repo Conventions4849- Shell scripts should pass shellcheck before merge.50- Do not weaken checks to force a green run.5152## Trigger Examples5354- Should trigger: "Lint this installer shell script and fix warnings."55- Should trigger: "Explain why this shellcheck code appears."56- Should not trigger: "Transform this JSON payload into YAML."
Run npx skillmds@latest add niksavis/tool-shellcheck-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
tool-shellcheck It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
niksavis (@niksavis) published this skill. Their other Agent Skills are listed on their SkillMD profile.