Format git commit messages correctly, avoiding HEREDOC syntax issues in favor of multiline strings
Inherits all available tools
Additional assets for this skill
This skill inherits all available tools. When active, it can use any tool Claude has access to.
Use this skill when creating git commits with the Bash tool, especially for commits with:
Avoid HEREDOC syntax - Use -m with multiline strings instead.
git commit -m "feat(github): add github plugin
This adds comprehensive GitHub workflow support including
commands for PR management and review workflows.
š¤ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"
Key points:
-m flag with entire message in quotes# This FAILS in Claude Code's Bash tool
git commit -m "$(cat <<'EOF'
feat(github): add github plugin
This adds comprehensive GitHub workflow support.
š¤ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Why this fails:
git commit -m "fix: resolve path configuration issue"
git commit -m "feat: add progressive disclosure pattern
Skills now support references/ subdirectory for
detailed documentation that loads on-demand."
git commit -m "chore: update dependencies
š¤ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"
git commit -m "feat(tools): add git commit message skill
This skill teaches Claude to format git commit messages
using multiline strings instead of HEREDOC syntax, which
fails in certain shell environments.
The pattern uses a single -m flag with the entire message
in quotes, preserving newlines naturally.
š¤ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"
Using -m with multiline strings is:
HEREDOC syntax causes issues because:
Template for commits with Claude Code attribution:
git commit -m "<type>[optional scope]: <description>
[optional body]
š¤ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"
Remember:
-m flag