multiline-commit-messages
What it does
It tells your agent how to write multi-line commit messages in a form that the shell passes through reliably. It is for developers whose agent makes commits and sometimes ends up with broken messages.
When to use it
- ✓When your agent writes a git commit with a message longer than one line.
- ✓When a commit message came out with stray shell text in it.
- ✓When you want a commit message with a summary line and a body paragraph.
Skill link
https://github.com/prisma/orm/blob/main/skills-contrib/multiline-commit-messages/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you commit these changes with a short summary and a two-paragraph explanation in the message?”
5 new skills a week. 1 minute to read.
How it works
The agent writes the message as a single-quoted string with real line breaks, instead of using a heredoc inside a command substitution. The shell then passes it to git as written.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Multiline commit messages
The Shell tool sends commands as a single string. Heredoc syntax (<<'EOF') inside $(cat ...) is fragile and fails silently — the literal $(cat <<'EOF' ... ends up as the commit message instead of the intended text.
Rule
Never use $(cat <<'EOF' ...) or $(cat <<EOF ...) for commit messages.
Use single-quoted strings with embedded newlines:
git commit -m 'short summary line
Longer body paragraph explaining why the change exists.
Additional context if needed.'
Why heredocs fail
The Shell tool passes the command as a single string argument. When you write:
git commit -m "$(cat <<'EOF'
message
EOF
)"
The shell may not parse the heredoc correctly in this context — the EOF delimiter, newlines, and nested quoting interact unpredictably. The result is the raw $(cat <<'EOF' ... text appearing as the commit message.
Single-quoted strings with literal newlines are simple, portable, and always work.
FAQ
Why does a heredoc fail?
The skill says the shell may not parse it correctly in that context, so the raw command text can end up as the message.
Where does this apply?
The skill is written for an agent's Shell tool, which sends each command as one string, so the same approach is safest there.
What is the main rule?
Do not use a heredoc inside a command substitution for commit messages. Use a single-quoted string with newlines.
Details
Original description by the author
Use single-quoted strings for multiline git commit messages in the Shell tool. Prevents heredoc escaping failures that produce garbled commit messages.
repo: prisma/orm
Popularity
- GitHub stars
- 48k
- Ranking position
- #6311
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
adr-review
48kTeaches your agent to review architecture decision records with fresh eyes, then rewrite them so the decision is clear to new readers.
ast-visitor-pattern
48kTeaches your agent a code pattern for union types handled in several places, so a newly added variant is caught by the compiler.
markdown-no-artificial-line-wraps
48kHelps your agent write Markdown with whole paragraphs on one line, so text wraps neatly on screen and file changes stay clean.
product-direction
48kHelps your agent judge feature requests against a project's written product direction, give a reasoned verdict, and record each no.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.