skills/shellcheck/SKILL.md
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 skillsauth add julianobarbosa/claude-code-skills shellcheckInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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:
curl -s -X POST http://localhost:8888/notify \
-H "Content-Type: application/json" \
-d '{"message": "Running the WORKFLOWNAME workflow from the ShellCheck skill"}' \
> /dev/null 2>&1 &
Output text notification:
Running the **WorkflowName** workflow from the **ShellCheck** skill...
| 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 |
# Check a script
shellcheck myscript.sh
# Specify shell dialect
shellcheck -s bash myscript.sh
# Exclude specific codes
shellcheck -e SC2086,SC2046 myscript.sh
# Output formats
shellcheck -f gcc myscript.sh # Editor integration
shellcheck -f json myscript.sh # Machine readable
shellcheck -f diff myscript.sh # Auto-fix patches
| 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 |
# Disable for next command
# shellcheck disable=SC2086
echo $var
# Disable for entire file (after shebang)
#!/bin/bash
# shellcheck disable=SC2086,SC2046
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
User: "shellcheck my deploy script"
-> Invokes Analyze workflow
-> Runs shellcheck with JSON output
-> Presents findings grouped by severity
-> Suggests fixes with wiki links
Example 2: Fix common issues
User: "fix the shellcheck errors in scripts/"
-> Invokes Fix workflow
-> Generates diff output
-> Applies fixes interactively
-> Re-runs validation
Example 3: Setup for project
User: "setup shellcheck for this repo"
-> Invokes Setup workflow
-> Creates .shellcheckrc
-> Adds pre-commit hook
-> Configures CI workflow
Example 4: Explain an error code
User: "what does SC2086 mean?"
-> Invokes Explain workflow
-> Fetches wiki documentation
-> Shows examples and fixes
-> Provides context-specific guidance
[[ ]]: 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.development
End-to-end branch delivery: commit (no AI attribution) → push → open a pull request → ensure a Board work item exists (create one per task, assigned to the configured user, if none) and link it → after merge, clean up branch and worktree. Auto-detects the platform from the remote — Azure Repos + Boards (azure-devops-node-api SDK; OAuth Bearer push fallback via `az`) or GitHub (Octokit; `gh` for auth). Scripts are TypeScript, run via `bun`. Use whenever asked to "ship", "ship it", "ship this branch", "open a PR", "push and open a PR", "raise a PR", "deliver this", "send this for review", or "create a PR and link the work item" — and when a direct push to main is blocked and the change needs to go through a PR instead.
testing
Brief description of what this skill does. Include specific triggers - when should Claude use this skill? Example triggers, file types, or keywords that indicate this skill applies.
tools
Manage and troubleshoot PATH configuration in zsh. Use when adding tools to PATH (bun, nvm, Python venv, cargo, go), diagnosing "command not found" errors, validating PATH entries, or organizing shell configuration in .zshrc and .zshrc.local files.
tools
Zabbix monitoring system automation via API and Python. Use when: (1) Managing hosts, templates, items, triggers, or host groups, (2) Automating monitoring configuration, (3) Sending data via Zabbix trapper/sender, (4) Querying historical data or events, (5) Bulk operations on Zabbix objects, (6) Maintenance window management, (7) User/permission management