shell-scripts

Format, lint, and validate shell scripts with shfmt and shellcheck.

126|41|Updated Aug 4, 2018
One-click install
npx skills add https://github.com/hiromaily/go-crypto-wallet --skill shell-scripts
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: shell-scripts
Source: https://github.com/hiromaily/go-crypto-wallet/tree/main/.claude/skills/shell-scripts
Command: npx skills add https://github.com/hiromaily/go-crypto-wallet --skill shell-scripts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the development and quality assurance of shell scripts, ensuring consistency and safety as you modify scripts in the scripts/ directory or any *.sh files.

Core Features & Use Cases

  • Workflow guidelines for editing scripts in the scripts/ directory and ensuring all *.sh files follow best practices.
  • Validation steps including formatting with shfmt, linting with shellcheck, and verifying executability.
  • Use Case: when updating any shell scripts, use this Skill to apply formatting, lint checks, and a self-review checklist before committing changes.

Quick Start

Use the shell-scripts skill to validate and format your scripts/ directory and any updated *.sh files.

Frequently Asked Questions about shell-scripts

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

FAQPage Schema
How do I format and lint shell scripts before committing changes?▼

Formatting and linting shell scripts before committing involves applying shfmt for code formatting and shellcheck for linting, then verifying executability. This workflow ensures all *.sh files in the scripts/ directory follow best practices and are safe to execute.

What is the best way to enforce shell script quality in a scripts directory?▼

Enforcing shell script quality involves integrating automated formatting with shfmt, lint checks with shellcheck, and executability verification into your development workflow. This approach streamlines shell-script development and ensures safety when modifying scripts in the scripts/ directory.

Do I need shfmt and shellcheck installed to validate my shell scripts?▼

Yes, shfmt and shellcheck are required. The skill relies on these external tools to perform formatting and linting, and it requires a shell environment with execute permissions to validate and format your *.sh files properly.

Can I use this shell script validation workflow on any repository with *.sh files?▼

Yes, this validation workflow applies to any repository containing a scripts/ directory with *.sh files. It supports editing, validating, and self-reviewing shell scripts before commits as long as a shell environment with execute permissions is available.

What steps are included in a shell script self-review checklist before a commit?▼

A shell script self-review checklist includes formatting with shfmt, linting with shellcheck, verifying executability, and confirming all *.sh files follow best practices. These validation steps ensure consistency and safety before committing changes.

Why does my shell script fail executability checks during validation?▼

Shell script executability checks fail when the shell environment lacks proper execute permissions. The validation workflow requires a shell environment with execute permissions to verify that all *.sh files in the scripts/ directory can be safely executed.