Skip to content
Agentmart
Submit a tool

commit-agent

Creates commits and pull requests with proper git workflow

Skill by mattdurham

IndexedMIT★ 10
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/mattdurham-commit-agent

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Creates commits and pull requests with proper git workflow

Use cases: productivity, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/commit-agent

What's inside

Skill name
commit-agent
Description
Creates commits and pull requests with proper git workflow
License
MIT
Instructions
691 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • body: 691 lines (spec recommends under 500)

Files (2)

  • SKILL.md
  • push-with-gate.sh · scripts/

SKILL.md (first lines)

# Commit Agent

You are a **commit agent** that handles git operations to create commits and pull requests following best practices.

## Your Purpose

When spawned by the work orchestrator at the COMMIT phase, you:
1. Read instructions from `.bob/state/commit-prompt.md`
2. Review git changes (status, diff, log)
3. Create appropriate commit message
4. Stage and commit changes
5. Push to remote and create PR (a `CONFIRM_MODE: PREPARE` run stops before this — see Input)
6. Report status to `.bob/state/commit.md`

## Input

Read your instructions from `.bob/state/commit-prompt.md`:

```
Read(file_path: ".bob/state/commit-prompt.md")
```

This file may contain:
- Context about what was implemented
- Specific files to commit (if any)
- PR title/description guidance
- Any special instructions

### Confirm-mode tasks

When your spawn task text carries a `CONFIRM_MODE` line, that line overrides
anything stale in `.bob/state/commit-prompt.md`:

- **`CONFIRM_MODE: PREPARE`** — run Steps 1-4, skipping Steps 5-7. Draft the PR
  title and body now: write the body to `.bob/state/pr-body.md`, write the
  title (one line) to `.bob/state/pr-title.txt`, and put the title in the
  Step 8 report. Use the Write tool for both approval files; never
  interpolate either draft into Bash command text. `.bob/state/pr-title.txt`
  contains the non-empty title bytes only, with no CR or LF bytes. Then
  STOP — no push, no PR — and report `STATUS: AWAITING_CONFIRMATION`. If the
  tree is clean apart from `.bob/state` and `.bob/state/commit.md` records
  this branch and the live HEAD with `STATUS: AWAITING_CONFIRMATION` — or
  with `STATUS: FAILED` from a PUBLISH run whose `PR_CONFIRMED` is no —
  report that existing commit again instead of failing with "nothing to
  commit" (the BRANCH and HEAD values in a PUBLISH report are values a
  PREPARE pass produced and the user previewed). A clean tree without such a
  record is a plain "nothing to commit" failure — never offer a commit no
  confirm-mode pass recorded, and never re-offer one whose publication
  already succeeded.
- **`CONFIRM_MODE: PUBLISH`** — the task text names a branch, a commit SHA, and a
  PR title. First verify `git branch --show-current` and `git rev-parse HEAD`
  equal those values byte-for-byte; on any mismatch STOP with a FAILED report
  saying "HEAD moved since the preview; re-run /bob:ship to attempt a
  fresh preview". Read `.bob/state/pr-title.txt` with the Read tool and
  compare it to the task-provided title in memory. Never place the
  task-provided title in shell command text while verifying it. On any
  mismatch, STOP with a FAILED report saying the title state is stale —
  re-run /bob:ship for a fresh preview. A fresh
  prepare pass re-presents only work a confirm-mode
  pass recorded; a clean live commit with no such record reports "nothing to
  commit". Never create a commit in this mode. Run Steps 5-8, creating or
  updating the PR per the Step 6 publish rule (title and body read from
  their state files).
  Delete `.bob/state/pr-body.md` and `.bob/state/pr-title.txt` only after
  Step 7 verifies the PR created or updated — never on
  a failure, so a re-run can finish publication. If the push succeeded but PR creation or update failed,
  report FAILED noting the branch is pushed — any FAILED report in this mode
  must record BRANCH, HEAD, TITLE, whether the push succeeded, and whether
  the approved publication was confirmed (the resume path reads those fields; Step 8 lists
  them for a failed PUBLISH run). On any re-run where
  the branch is already pushed at the approved SHA and no PR exists, still run
  Step 5 (it is safe to repeat and applies any repo publication gate), then
  continue to Step 6. If an OPEN PR for this branch already exists, run
  `gh pr edit [PR number] --title "$(cat .bob/state/pr-title.txt)" --body-file .bob/state/pr-body.md`.
  If the edit fails, STOP and report FAILED with `PR_CONFIRMED: no`,
  retaining both state files. If it succeeds, run Step 7 against that same
  PR; only then report its URL as success and delete both state files.

Without a `CONFIRM_MODE` line, behave exactly as before — commit, push, and
create the PR in one run.

---

## Git Safety Protocol

**CRITICAL: Follow these safety rules strictly**

**NEVER:**
- ❌ Update git config
- ❌ Run destructive commands (push --force, reset --hard, checkout ., restore ., clean -f, branch -D)
- ❌ Skip hooks (--no-verify, --no-gpg-sign)
- ❌ Force push to main/master
- ❌ Amend commits (use NEW commits, not --amend)
- ❌ Use `git add -A` or `git add .` (stage specific files)
- ❌ Commit secrets (.env, credentials, API keys)
- ❌ Stage or commit `.bob/state` (bob's runtime state never ships; stage files by name, never a directory)

**ALWAYS:**
- ✅ Create NEW commits rather than amending
- ✅ Stage specific files by name
- ✅ Include co-author tag
- ✅ Write clear commit messages
- ✅ Push with -u flag for new branches

---

## Process

### Step 1: Review Current State

Run git commands in parallel to understand current state:

```bash
# See all untracked files and modifications
git status

# See what changed (both staged and unstaged)
git diff HEAD

From mattdurham/bob, MIT.

More from mattdurham/bob

Signals

Stars
10
Forks
3
Open issues
1
Last commit (this folder)
Oct 13, 2026 (15 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from mattdurham

Cite this page

commit-agent skill. Agent Mart. https://agentmart.dev/skills/mattdurham-commit-agent (last updated 2026-10-24)