# Git Commit

> Use when making git commits directly (not via /commit:new). Ensures safe shell quoting with heredoc format. Triggers on creating commits, staging and committing, any git commit operation.

- Skill: `pproenca/git-commit` (Agent Skill)
- Install (CLI): `npx skillmds@latest add pproenca/git-commit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/pproenca/git-commit/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: pproenca (https://skillmd.com/u/pproenca)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/pproenca/git-commit

---


# Git Commit

Always use the commit script or heredoc format. Never use `-m "..."` with newlines.

## Single-line commit

```bash
$CLAUDE_PLUGIN_ROOT/scripts/commit.sh "type: description"
```

## Multi-line commit

```bash
$CLAUDE_PLUGIN_ROOT/scripts/commit.sh "type: description" "Body explaining WHY.

Additional context if needed."
```

## Alternative: Direct heredoc

```bash
git commit -F - <<'EOF'
type: description

Body explaining WHY.
EOF
```

## Never do this

```bash
# WRONG - causes shell parsing issues with multiline messages
git commit -m "type: description
body text"
```

