multiline-commit-messages

$npx mdskill add prisma/prisma-next/multiline-commit-messages

Fixes multiline git commit messages in Shell tool commands

  • Solves garbled commit messages from heredoc escaping failures
  • Uses single-quoted strings in bash for git commit -m
  • Avoids fragile heredoc syntax with explicit newline characters
  • Ensures reliable commit message formatting across environments

SKILL.md

.github/skills/multiline-commit-messagesView on GitHub ↗
---
name: multiline-commit-messages
description: >-
  Use single-quoted strings for multiline git commit messages in the Shell tool.
  Prevents heredoc escaping failures that produce garbled commit messages.
---

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

More from prisma/prisma-next

SkillDescription
adr-review>-
ast-visitor-pattern>-
bumping-biomeBumps `biome` package versions (e.g. `@biomejs/biome`) using `pnpm`, aligns `biome.jsonc` files with the new version/s across the repository and runs biome-related checks. Use when required to update `biome` to a newer version - explicitly or implicitly (e.g. after running `pnpm up`, `pnpm update`, `pnpm upgrade` without specific package names).
contrib-prOpen a high-quality external contributor PR against prisma-next. Use when the user is an outside contributor (not a Prisma maintainer) and wants to submit a change as a pull request from a fork. Encodes the contribution flow from CONTRIBUTING.md so the resulting PR passes review on the first round.
drive-agent-personasLibrary of agent personas — named bias-frames that other skills load to shift execution-time defaults. Skills name a persona by ID (e.g. "Adopt the architect persona"), and this skill resolves that ID to the persona doc that frames the executor for the rest of the task. Use when authoring a new skill that needs a particular reviewer/implementer/orchestrator stance, or when an existing skill instructs you to adopt a named persona.
drive-create-plan>
drive-create-project>
drive-create-spec>
drive-discussionDrops the agent into a structured Q&A mode that iterates with the user toward a complete understanding of a topic, then documents the outcome (project spec, plan, decision record, or whatever shape fits). The agent adopts one or more personas from the `drive-agent-personas` library — named explicitly by the user, or inferred from conversation context and announced. Typical use is design work at the start of a task, or mid-implementation when a load-bearing assumption has been falsified. Use ONLY when the user explicitly invokes this skill (e.g. "discussion mode", "pressure-test this", "let's design this", "design mode", "tech design mode", "product mode", "pm mode", "challenge my idea"). Never auto-invoke.
drive-orchestrate-plan>