sickn33/antigravity-awesome-skills/shellcheck-configuration
Claude Code and agent skill by sickn33/antigravity-awesome-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.
Install
npx vskill@latest install sickn33/antigravity-awesome-skills/shellcheck-configurationSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
ShellCheck Configuration and Static Analysis
Comprehensive guidance for configuring and using ShellCheck to improve shell script quality, catch common pitfalls, and enforce best practices through static code analysis.
Do not use this skill when
- The task is unrelated to shellcheck configuration and static analysis
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
Use this skill when
- Setting up linting for shell scripts in CI/CD pipelines
- Analyzing existing shell scripts for issues
- Understanding ShellCheck error codes and warnings
- Configuring ShellCheck for specific project requirements
- Integrating ShellCheck into development workflows
- Suppressing false positives and configuring rule sets
- Enforcing consistent code quality standards
- Migrating scripts to meet quality gates
ShellCheck Fundamentals
What is ShellCheck?
ShellCheck is a static analysis tool that analyzes shell scripts and detects problematic patterns. It supports:
- Bash, sh, dash, ksh, and other POSIX shells
- Over 100 different warnings and errors
- Configuration for target shell and flags
- Integration with editors and CI/CD systems
Installation
Configuration Files
.shellcheckrc (Project Level)
Create .shellcheckrc in your project root:
Options and diagnostic reference
Use the installed shellcheck --help and official diagnostic pages. Do not rely on invented SHELLCHECK_SHELL/STRICT/CONFIG environment variables or numeric-code ranges as categories. Set --shell=bash (or sh), --enable and exclusions explicitly; scope suppressions narrowly with a recorded reason.
- SC2086: unquoted expansions can split/glob. For a Bash array, iterate with
for item in "${items[@]}"; do ...; done; quoting an entire scalar list changes semantics and is not a universal fix.
- SC2206:
array=( $items )still performs splitting/globbing; construct an array
deliberately or use a suitable read/mapfile operation for the actual format.
- SC2181: check the command directly with
if command; then ...; fi. - SC2015:
a && b || calso runs c when b fails; use if/else when that matters. - SC3010:
[[ ... ]]is not POSIX sh; use a valid[ ... ]or case construct.
See SC2086 and the official project/options.
Practical Configuration Examples
Minimal Configuration (Strict POSIX)
Development Configuration (Bash with Relaxed Rules)
CI/CD Integration Configuration
.shellcheckrc for Project
Integration Patterns
Pre-commit Hook Configuration
GitHub Actions Workflow
GitLab CI Pipeline
Handling ShellCheck Violations
Suppressing Specific Warnings
Common Violations and Fixes
SC2086: Double quote to prevent word splitting
SC2181: Check exit code directly
SC2015: Use if-then instead of && ||
SC2016: Expressions don't expand in single quotes
SC2009: Use pgrep instead of grep
Performance Optimization
Checking Multiple Files
Bind cached results to ShellCheck version/options, shell dialect, rc files and sourced-file contents as well as the main script. The hash-only example below is insufficient for CI reuse when those inputs change. Pre-commit checks must inspect staged bytes (including partially staged files) rather than silently linting a different working tree. Use NUL-delimited paths and exclude deleted files.
Caching Results
Output Formats
Default Format
GCC Format (for CI/CD)
JSON Format (for parsing)
Quiet Format
Best Practices
- Run ShellCheck in CI/CD - Catch issues before merging
- Configure for your target shell - Don't analyze bash as sh
- Document exclusions - Explain why violations are suppressed
- Address violations - Don't just disable warnings
- Enable strict mode - Use
--enable=allwith careful exclusions - Update regularly - Keep ShellCheck current for new checks
- Use pre-commit hooks - Catch issues locally before pushing
- Integrate with editors - Get real-time feedback during development
Resources
- ShellCheck GitHub: https://github.com/koalaman/shellcheck
- ShellCheck Wiki: https://www.shellcheck.net/wiki/
- Error Code Reference: https://www.shellcheck.net/
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/shellcheck-configuration/SKILL.md
Popularity
- Repository stars
- 27,514
- Repository forks
- 4,631
- Repository npm downloads, 7 days
- 11,772
- 7-day trend score
- 73
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 20 Mar 2026, 7 months ago.
Extension points
hookPre/post lifecycle hooksconfigConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/antigravity-awesome-skills/shellcheck-configuration)