Skip to content
Skillpedia
General coding48k · #6311

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.md

Copy 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

Use this skill to help me: https://github.com/prisma/orm/blob/main/skills-contrib/multiline-commit-messages/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills