shellcheck-configuration

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

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill shellcheck-configuration-sanketadlak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shellcheck-configuration
Source: https://github.com/SanketAdlak/PDMProjectDesign/tree/main/.agents/skills/shellcheck-configuration
Command: npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill shellcheck-configuration-sanketadlak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Shell scripts often contain subtle bugs like unquoted variables, incorrect exit code checks, and non-portable syntax that cause failures in production. This Skill provides comprehensive 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 command-line flags to control target shell dialects, enabled checks, and suppressed warnings. - Error Code Reference: Understand and fix common ShellCheck violations (SC1000-SC3999) covering parser errors, quoting issues, and POSIX compliance problems. - CI/CD Integration: Integrate ShellCheck into pre-commit hooks, GitHub Actions, and GitLab CI pipelines to enforce quality gates on every commit. - Use Case: A DevOps engineer needs to lint 50 legacy bash scripts before deployment. Use this Skill to configure ShellCheck with appropriate exclusions, run parallel checks across all files, and integrate the linting step into the CI pipeline. ## Quick Start Ask the AI to set up ShellCheck linting for all shell scripts in your project with a .shellcheckrc configuration and a GitHub Actions workflow.

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 my project?

Create a .shellcheckrc file in your project root specifying the target shell dialect, enabled optional checks, and disabled warnings. You can also set environment variables like SHELLCHECK_SHELL or pass flags directly on the command line.

How do I integrate ShellCheck into CI/CD pipelines?

Add a pipeline step that installs ShellCheck and runs it against all .sh files using find with -exec. GitHub Actions and GitLab CI both support this, and the koalaman/shellcheck-alpine image works for containerized pipelines.

How do I suppress specific ShellCheck warnings?

Add a disable directive comment like '# shellcheck disable=SC2086' above the offending line, or list codes in the .shellcheckrc disable field. Document why each suppression exists rather than disabling warnings broadly.

What does ShellCheck error SC2086 mean?

SC2086 warns that an unquoted variable may undergo word splitting or glob expansion. Fix it by wrapping the variable in double quotes, or use array expansion like "${list[@]}" when iterating over multiple items.

Does ShellCheck support POSIX sh scripts?

Yes, ShellCheck analyzes bash, sh, dash, and ksh scripts. Set the shell target with --shell=sh or the shell directive in .shellcheckrc to enable POSIX-specific checks in the SC3000 range.

Why does ShellCheck report SC1091 on sourced files?

SC1091 appears when ShellCheck cannot follow a sourced file, often because the path is dynamic or the file is external. Use the source directive comment or enable external-sources in your configuration to resolve it.