fix-line-endings-check-bash

Fix line endings AND check bash syntax in one step (recommended). Use after creating or editing bash scripts.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

This Claude skill streamlines the bash script development workflow by combining line-ending normalization (CRLF to LF) with immediate syntax validation. It ensures that shell scripts are cross-platform compatible and free of syntax errors, preventing common execution failures caused by improper formatting or coding mistakes.

Use Cases

  • Cross-platform Development: Automatically converting scripts created on Windows environments to Linux-compatible LF format to prevent 'command not found' or 'binary file' errors.
  • Post-Editing Validation: Running a quick check immediately after modifying a script to catch syntax bugs before they cause issues in production or CI/CD pipelines.
  • AI-Generated Code Cleanup: Ensuring that bash scripts generated by AI agents are properly formatted and syntactically sound before they are saved or executed.
namefix-line-endings-check-bash
descriptionFix line endings AND check bash syntax in one step (recommended). Use after creating or editing bash scripts.
allowed-toolsBash

Fix Line Endings + Check Bash

Recommended tool for bash script preparation.

.claude/skills/fix-line-endings-check-bash/scripts/fix-line-endings-check-bash.sh script1.sh script2.sh

Converts CRLF→LF, then validates syntax. Stops on first failure.