GS/BS
← Standards directory
Formatting

shfmt.

Format shell scripts consistently

Select a shell dialect and indentation convention. Compare tracked scripts with formatter output in CI so formatting changes stay reviewable.

Shell

Community rubric · v1

The evidence

Evidence coverage3 / 8
3 supported · 5 unresolved

One point for each verified check. Unknown means we still need evidence. Contrary evidence records an observed result that goes against the criterion.

Latest evidence review ·

  • Definition

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can two readers identify the same obligation? Contribute evidence ↗

  • Measurement

    Verified

    The documented shfmt -d invocation emits a diff against the formatter's result without editing the shell files.

    Cited source ↗
  • Conformance

    Unknown

    No reviewed evidence is recorded for this dimension.

    What would demonstrate a violation? Contribute evidence ↗

  • CI enforcement

    Verified

    Seikika’s shell regression job enforces shfmt formatting on Bats files before executing the tests.

    Cited source ↗
  • Getting started

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can a newcomer complete a first run? Contribute evidence ↗

  • Real-world adoption

    Verified

    Seikika’s shell regression job enforces shfmt formatting on Bats files before executing the tests.

    Cited source ↗
  • Agent guidance

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can an agent act on a specific finding? Contribute evidence ↗

  • Agent portability

    Unknown

    No reviewed evidence is recorded for this dimension.

    Does the practice work in two agent harnesses? Contribute evidence ↗

Use this standard

Agent prompt

Use shfmt in this repository to meet this standard: Format shell scripts consistently. Select a shell dialect and indentation convention. Compare tracked scripts with formatter output in CI so formatting changes stay reviewable. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
Read the agent skill ↗

Optional Seikika integration

shell (Seikika kit) ↗

Add github:seikika/seikika/packages/shell@89eb0a2fcd2ffe67151df43f2a062ebc8a1e497c to the include list in .seikika/seikika.yaml. Copy check-shell.py from the pinned package into tools/ and set the command parameter to invoke it on your shell script paths. Run seikika install .seikika from the checkout root.

Primary source

shfmt documentation ↗