shellcheck-configuration

Configure ShellCheck static analysis to lint shell scripts and enforce code quality standards.

1|Updated Jul 2, 2026
One-click install
npx skills add https://github.com/filippolmt/skills --skill shellcheck-configuration-filippolmt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shellcheck-configuration
Source: https://github.com/filippolmt/skills/tree/main/skills/shellcheck-configuration
Command: npx skills add https://github.com/filippolmt/skills --skill shellcheck-configuration-filippolmt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Shell scripts often contain subtle bugs like unquoted variables, incorrect exit code checks, and non-portable constructs that only surface in production. This Skill provides guidance for configuring ShellCheck to catch these issues automatically through static analysis. ## Core Features & Use Cases - Configuration Management: Set up .shellcheckrc files, environment variables, and CLI flags to target specific shells (bash, sh, dash, ksh) and enable or disable rule sets. - Error Code Reference: Understand and fix common ShellCheck warnings (SC2086 quoting, SC2181 exit codes, SC2015 conditionals) with concrete before-and-after examples. - CI/CD Integration: Integrate ShellCheck into GitHub Actions, GitLab CI, and pre-commit hooks to enforce quality gates on every commit. - Use Case: A team migrating legacy bash scripts needs to enforce POSIX compliance. Use this Skill to configure strict-mode analysis, suppress documented false positives, and wire linting into their pipeline. ## Quick Start Ask the assistant to configure ShellCheck for your project with a .shellcheckrc targeting bash and integrate it into your CI pipeline.

Frequently Asked Questions about shellcheck-configuration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure ShellCheck for a bash project?

Create a .shellcheckrc file in your project root with shell=bash to set the target dialect. Add enable= directives for optional checks and disable= entries for specific warnings like SC1091 that produce false positives in your codebase.

How to integrate ShellCheck into CI/CD pipelines?

Add a pipeline step that runs shellcheck against all .sh files, using find with -exec or xargs for batch checking. GitHub Actions and GitLab CI examples use the koalaman/shellcheck-alpine image or apt-get installation, failing the build on any violation.

How do I suppress a ShellCheck warning for one line?

Add a directive comment directly above the line: # shellcheck disable=SC2086. You can disable multiple codes with commas, or place the directive at the top of a file to suppress warnings script-wide.

Does ShellCheck support POSIX sh scripts?

Yes, ShellCheck analyzes sh, bash, dash, and ksh scripts. Set shell=sh in your configuration or pass --shell=sh on the command line to enable POSIX compliance checks in the SC3000 range.

Why does ShellCheck report SC2086 on my variables?

SC2086 fires when unquoted variables risk word splitting or glob expansion during execution. Fix it by wrapping the variable in double quotes, like "$var", unless splitting is intentional behavior.