commit

Stage and commit. Conventional commits. No push.

paulnsorensen/skillz-that-grillz41 installsMITSynced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI

Agent Skills format with YAML frontmatter. Claude Code reads it as-is.

---
name: "commit"
description: "Stage and commit. Conventional commits. No push."
license: "MIT"
---

# commit

Stage and commit. Conventional commits. No push.

## Protocol

Run in parallel first:

```bash
git status
git diff HEAD
git log --oneline -5
```

Then sequentially:

1. **Understand the why** — read the diff, understand what changed and why
2. **Stage specific files** — by name, never `git add -A` or `git add .`
3. **Draft the message** — see format below
4. **Commit** via heredoc (preserves formatting)
5. **Verify** with `git status`

## Commit message format

```
type(scope): short description (≤72 chars)

Optional body if nuance is lost without it.

Co-Authored-By: <agent-name> <agent-email>
```

The `Co-Authored-By` trailer is optional — fill in the agent identity your
harness provides, or omit the line entirely if the project doesn't want it.

Types: `feat`, `fix`, `refactor`, `chore`, `docs`, `test`, `style`

Focus on the **why**, not the **what**. The diff already shows what changed.

Use a heredoc to preserve formatting:

```bash
git commit -m "$(cat <<'EOF'
type(scope): short description

Co-Authored-By: <agent-name> <agent-email>
EOF
)"
```

## Rules

- **Never amend** unless explicitly asked — create new commits instead
- **Never --no-verify** — don't skip hooks
- **Never force-push** to main/master
- **No push, no PR** — hand off to the gh skill for that
- **Hook fails?** Fix the issue, re-stage, create a new commit (not amend)
- **Don't commit** `.env`, credentials, or large binaries — warn the user

## Gotchas

- Heredoc commit messages with backticks or `$` need single-quoted delimiter (`<<'EOF'` not `<<EOF`)
- If prek hook fails, the commit did NOT happen — create a new commit after fixing, never amend
- Co-Authored-By trailer is optional — use the agent identity your harness exposes, or drop the line if the project doesn't track agent authorship
- Empty `git diff HEAD` after staging means nothing new was added — check `git diff --cached` instead

More General & Other skills

← All General & Other skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY