# Multiline Commit Messages

Use single-quoted strings for multiline git commit messages in the Shell tool.

- Repository: https://github.com/prisma/orm (47661 stars)
- Category: Git and review
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add prisma/orm --skill multiline-commit-messages -g -a claude-code -y`
Codex: `npx skills add prisma/orm --skill multiline-commit-messages -g -a codex -y`
Cursor: `npx skills add prisma/orm --skill multiline-commit-messages -g -a cursor -y`
Gemini CLI: `npx skills add prisma/orm --skill multiline-commit-messages -g -a gemini-cli -y`

## Description

Use single-quoted strings for multiline git commit messages in the Shell tool. Prevents heredoc escaping failures that produce garbled commit messages.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

```bash
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:

```bash
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.

