OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add julianobarbosa/claude-code-skills --skill shellcheck
Shell script static analysis and linting. USE WHEN shellcheck, lint shell, bash lint, sh lint, script analysis, shell errors, SC codes, shell best practices. Comprehensive shell script validation with CI/CD integration.
npx skills add julianobarbosa/claude-code-skills --skill shellcheck
Auto-routes when user mentions shellcheck, shell linting, bash script analysis, or SC error codes.
ShellCheck is a GPLv3-licensed static analysis tool that identifies bugs in bash/sh shell scripts. It detects:
When executing a workflow, do BOTH:
Send voice notification:
Output text notification:
| Workflow | Trigger | File |
|---|---|---|
| Analyze | "shellcheck this", "lint script", "check shell" | Workflows/Analyze.md |
| Fix | "fix shell errors", "apply shellcheck fixes" | Workflows/Fix.md |
| Setup | "setup shellcheck", "configure shellcheck" | Workflows/Setup.md |
| Explain | "explain SC2086", "what is SC code" | Workflows/Explain.md |
| Code | Issue | Fix |
|---|---|---|
| SC2086 | Unquoted variable | "$var" |
| SC2046 | Unquoted command substitution | "$(cmd)" |
| SC2034 | Unused variable | Remove or export |
| SC2154 | Unassigned variable | Assign or disable |
| SC2155 | Declare and assign separately | Split declaration |
SkillSearch('shellcheck error codes') -> loads ErrorCodes.mdSkillSearch('shellcheck config') -> loads Configuration.mdSkillSearch('shellcheck ci') -> loads Integration.mdSkillSearch('shellcheck practices') -> loads BestPractices.mdExample 1: Analyze a script
Example 2: Fix common issues
Example 3: Setup for project
Example 4: Explain an error code
[[ ]]: Bash's [[ ]] does not word-split, so [[ -n $var ]] is safe unquoted. Disabling SC2086 on [[ ]] blocks is a sign you're applying the lint to the wrong construct, not a sign the rule is broken.${!prefix*} indirection, declare -p introspection, or sourced into another script trigger "unused" false positives. Use # shellcheck disable=SC2034 with a comment explaining the indirection — don't silence globally.script.sh with #!/bin/sh is checked as POSIX sh and rejects bashisms like [[ ]] or arrays. Either set the correct shebang or pass -s bash explicitly; never rely on the .sh extension.shellcheck -e SC2086,SC2046 in .shellcheckrc hides real bugs: Project-wide disables compound — a year later nobody remembers why and unquoted expansions ship to prod. Prefer inline disables with a justification comment over global suppression.-x flag: source ./lib.sh is not analyzed by default. Run with shellcheck -x script.sh for full coverage, or add # shellcheck source=./lib.sh directives. CI configs frequently miss this and ship un-linted sourced files.-f diff patches assume the script parses cleanly: Syntax errors prevent the auto-fix output entirely, with no clear message. If -f diff produces nothing, run without -f first and fix parse errors before re-running for patches.