Generated banner for Shellcheck Configuration
Generated logo for Shellcheck Configuration

Shellcheck Configuration

Seth HobsonCommunityCreated by Ryan SnodgrassDistributed by Seth Hobson

  • Skill
  • Tool integration
  • Software development
  • MIT
  • No issues found

From the author

Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.
— the description by Ryan Snodgrass

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides comprehensive guidance on using ShellCheck to perform static analysis on shell scripts. It covers installation, project-level configuration via .shellcheckrc, environment variable management, and strategies for integrating linting into CI/CD pipelines and local development workflows. The documentation includes explanations of common error codes, best practices for suppressing false positives, and techniques for enforcing strict code quality standards across various shell dialects.

What it does

  • Configures ShellCheck for specific shell dialects like bash, sh, or ksh.
  • Defines project-level linting rules using .shellcheckrc files.
  • Integrates static analysis into CI/CD pipelines to enforce quality gates.
  • Provides guidance on interpreting and addressing common ShellCheck error codes.
  • Demonstrates how to suppress false positives and manage rule exclusions.
  • Supports local development through editor integration and pre-commit hooks.

When to use it

  • When setting up automated linting infrastructure for shell scripts.
  • When auditing existing scripts to identify bugs and portability issues.
  • When migrating scripts to meet specific POSIX or bash standards.
  • When you need to enforce consistent coding styles across a team.
  • When you need to troubleshoot complex shell script warnings.

Advantages

  • Reduces common shell scripting pitfalls and runtime errors.
  • Ensures script portability across different shell environments.
  • Automates code quality checks within CI/CD pipelines.
  • Provides actionable feedback for improving script maintainability.
  • Allows for granular control over linting rules and exclusions.

Usage examples

“How do I configure my project to ignore specific ShellCheck warnings?”
The agent explains how to create a .shellcheckrc file in the project root and use the disable directive to exclude specific error codes like SC1091 or SC2086.
“How can I integrate ShellCheck into my CI/CD pipeline?”
The agent provides a script snippet using find to locate all .sh files and run them through ShellCheck, failing the build if any issues are detected.
“What is the best way to ensure my script is POSIX compliant?”
The agent demonstrates using the --shell=sh flag and explains how to address common POSIX compliance warnings like SC3010 and SC3043.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/wshobson/shellcheck-configuration/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip shellcheck-configuration.zip -d .agents/skills

Documentation by Ryan Snodgrass

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.

When to Use This Skill

  • 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

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Best Practices

  1. Run ShellCheck in CI/CD - Catch issues before merging

  2. Configure for your target shell - Don't analyze bash as sh

  3. Document exclusions - Explain why violations are suppressed

  4. Address violations - Don't just disable warnings

  5. Enable strict mode - Use --enable=all with careful exclusions

  6. Update regularly - Keep ShellCheck current for new checks

  7. Use pre-commit hooks - Catch issues locally before pushing

  8. Integrate with editors - Get real-time feedback during development

Files

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.

When to Use This Skill

  • 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

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Best Practices

  1. Run ShellCheck in CI/CD - Catch issues before merging

  2. Configure for your target shell - Don't analyze bash as sh

  3. Document exclusions - Explain why violations are suppressed

  4. Address violations - Don't just disable warnings

  5. Enable strict mode - Use --enable=all with careful exclusions

  6. Update regularly - Keep ShellCheck current for new checks

  7. Use pre-commit hooks - Catch issues locally before pushing

  8. Integrate with editors - Get real-time feedback during development

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Ryan Snodgrass
Publisher
Seth Hobson (Community)
Distributed by
Seth Hobson
Source
wshobson/agents · plugins/shell-scripting/skills/shellcheck-configuration · commit 4bde316
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Ryan Snodgrass or Seth Hobson.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download shellcheck-configuration.zip