Whitespace
Fix whitespace issues in source code: trailing whitespace and missing final newlines.
When to Use
- •Before committing code
- •When user asks to clean up or format files
- •When preparing a PR
- •When whitespace issues are flagged by linters or CI
Actions
Check for issues (dry-run)
bash
./.claude/skills/whitespace/scripts/whitespace-check.sh [directory] [extensions]
Fix issues
bash
./.claude/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
- •Trailing whitespace - spaces/tabs at end of lines
- •Final newline - ensures files end with exactly one newline
Notes
- •Scripts require GNU sed (Linux default, install via
brew install gnu-sedon macOS) - •Binary files and
.gitdirectory are excluded - •Always review changes with
git diffafter running