Whitespace

Fix trailing whitespace and ensure files end with newlines. Use this skill when preparing code for commit or when whitespace issues are detected. Use when this capability is needed.

tomevault-io 9feed65 2 files · 1.8 KB Updated

File contents

Whitespace

Fix whitespace issues in source code: trailing whitespace and missing final newlines.

Actions

Check for issues (dry-run)

<skills>/whitespace/scripts/whitespace-check.sh [directory] [extensions]

Fix issues

<skills>/whitespace/scripts/whitespace-fix.sh [directory] [extensions]

Default extensions: jl,py,js,ts,tsx,rs,go,md,json,yaml,yml,toml,sh

Default directory: current working directory (.)

What Gets Fixed

  1. Trailing whitespace - spaces/tabs at end of lines
  2. Final newline - ensures files end with exactly one newline

Notes

  • Scripts require GNU sed (Linux default, install via brew install gnu-sed on macOS)
  • Binary files and .git directory are excluded
  • Always review changes with git diff after running

Source: krastanov/juliallmagentskills — distributed by TomeVault.

tomevault-io/skills-registry/tree/main/krastanov--juliallmagentskills--whitespace commit 9feed65aae

Frequently asked questions

npx skillmds@latest add tomevault-io/whitespace