shellcheck-configuration
by wshobsonshellcheck-configuration helps configure and use ShellCheck for shell script linting, error detection, and code quality enforcement. Ideal for CI/CD, code review, and script migration workflows.
Overview
What is shellcheck-configuration?
shellcheck-configuration is a skill designed to help developers and DevOps teams configure and use ShellCheck, a static analysis tool for shell scripts. It provides practical guidance for setting up linting infrastructure, fixing code issues, and ensuring script portability across environments. This skill is ideal for anyone looking to enforce best practices, catch common shell scripting errors, and integrate quality checks into CI/CD pipelines.
Who Should Use This Skill?
- Developers writing Bash, sh, dash, or ksh scripts
- DevOps engineers maintaining automation scripts
- Teams enforcing code quality standards in shell scripting
- Anyone integrating shell script linting into CI/CD workflows
Problems Solved
- Detects common shell scripting errors and pitfalls
- Enforces consistent coding standards
- Helps migrate scripts to meet quality gates
- Supports project-specific configuration and suppression of false positives
How to Use
Installation Steps
- Install the skill with:
npx skills add https://github.com/wshobson/agents --skill shellcheck-configuration - Review the
SKILL.mdfile for detailed guidance on configuration and usage. - Explore supporting files such as
README.md,AGENTS.md, andmetadata.jsonfor additional context.
Setting Up ShellCheck
- Install ShellCheck using your platform's package manager:
- macOS:
brew install shellcheck - Ubuntu/Debian:
apt-get install shellcheck - From source: Clone the official repo and build with
make build && make install
- macOS:
- Verify installation with
shellcheck --version
Configuring ShellCheck
- Create a
.shellcheckrcfile in your project to customize rules and target shells. - Integrate ShellCheck into your CI/CD pipeline for automated linting.
- Use ShellCheck flags to tailor analysis to your project's requirements.
Adapting the Workflow
- Start with the provided skill files and adapt the configuration to fit your repository and tooling.
- Avoid copying configurations verbatim; customize for your team's needs and operating constraints.
FAQ
Where can I find configuration examples?
Check the SKILL.md and .shellcheckrc files for sample configurations and recommended practices.
Can shellcheck-configuration be used in CI/CD?
Yes, the skill is designed for easy integration into CI/CD pipelines, enabling automated shell script linting and quality checks.
What shells are supported?
ShellCheck supports Bash, sh, dash, ksh, and other POSIX-compliant shells.
How do I suppress false positives?
You can configure rule sets and suppress specific warnings in your .shellcheckrc file or inline within scripts.
Where should I start?
Preview the SKILL.md file for a comprehensive overview, then explore other supporting files for deeper context. Use the Files tab to inspect the full file tree, including references and helper scripts.
