shfmt-formatting

Installation
SKILL.md

shfmt Formatting

Expert knowledge of shfmt's formatting capabilities, patterns, and integration with development workflows for consistent shell script formatting.

Overview

shfmt formats shell scripts for readability and consistency. It parses scripts into an AST and prints them in a canonical format, eliminating style debates and ensuring uniformity across codebases.

Supported Shell Dialects

shfmt supports multiple shell dialects with different syntax rules:

POSIX Shell

Most portable, works with /bin/sh on any Unix system:

#!/bin/sh
# POSIX-compliant syntax only
Related skills
Installs
21
GitHub Stars
150
First Seen
Jan 22, 2026