shell-script

Lint and format Bash scripts with ShellCheck and shfmt.

Updated Nov 29, 2025
One-click install
npx skills add https://github.com/thimslugga/agent-skills --skill shell-script-thimslugga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shell-script
Source: https://github.com/thimslugga/agent-skills/tree/main/skills/linux/shell-script
Command: npx skills add https://github.com/thimslugga/agent-skills --skill shell-script-thimslugga

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Lint and format Bash scripts using ShellCheck and shfmt to catch errors, improve readability, and enforce style consistency.

Core Features & Use Cases

  • Lint Bash scripts with ShellCheck
  • Format Bash scripts with shfmt
  • Integrate with pre-commit and CI workflows

Quick Start

Run the shell-script skill on a Bash file to lint with ShellCheck and format with shfmt.

Frequently Asked Questions about shell-script

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

FAQPage Schema
How do I lint and format Bash scripts automatically in CI?

You can lint and format Bash scripts in CI by running a skill that applies ShellCheck to catch errors and shfmt to enforce style consistency, integrating both tools directly into your CI workflows for automated validation.

What is the best way to catch Bash script errors before commit?

The best way to catch Bash script errors before commit is to use pre-commit hooks running ShellCheck for static analysis. This validates shell scripts locally and prevents code quality issues from entering your repository.

Do I need to install ShellCheck and shfmt to lint shell scripts?

Yes, you need ShellCheck and shfmt installed. The shell-script skill requires these external tools to lint and format Bash scripts, applying them to enforce code quality and style consistency across your development workflows.

Can I use pre-commit hooks to validate shell scripts locally?

Yes, you can use pre-commit hooks to validate shell scripts locally. The skill supports pre-commit integration, automatically running ShellCheck and shfmt on your Bash files to catch errors and format code before it is committed.

Does shfmt work with ShellCheck to enforce Bash code quality?

Yes, shfmt works with ShellCheck to enforce Bash code quality. While ShellCheck lints scripts to identify errors and potential issues, shfmt formats the code to improve readability and maintain consistent styling.