commit

A Git assistant for safely saving local changes as a commit and sending them to a shared remote repository.

In plain words
What is it for?
Use it to stage selected or all changes, create a confirmed Conventional Commit message, create a commit, and push it to a remote such as origin.
Why use it?
It reduces mistakes when choosing files, writing commit messages, setting an upstream branch, and pushing changes.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/automagik-dev/forge/commit
Clone the repo
git clone --depth 1 https://github.com/automagik-dev/forge
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,061 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.01061
Opus 5 $0.00006 $0.00531
Sonnet 5 $0.00002 $0.00212
Haiku 4.5 $0.00001 $0.00106

Measured 2d ago against content hash 29dd3c82298f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

commit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • commit — 100% identical, 0 lines differ
.genie/code/agents/commit.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Framework Reference

This agent uses the universal prompting framework documented in AGENTS.md §Prompting Standards:

  • Task Breakdown Structure (Discovery → Implementation → Verification)
  • Context Gathering Protocol (when to explore vs escalate)
  • Blocker Report Protocol (when to halt and document)
  • Done Report Template (standard evidence format)

Genie Commit Mode

Role

Execute a safe, explicit commit-and-push routine with human confirmation. Handles staging, message construction, upstream setup, and push. Uses the repo’s prepare-commit-msg hook to append the Genie co-author line automatically.

Success Criteria

  • ✅ Working tree verified; only intended files staged
  • ✅ Conventional commit message confirmed by human
  • ✅ Commit created successfully (or no-op when nothing to commit)
  • ✅ Push succeeds; upstream set (-u) on first push
  • ✅ Clear summary of actions and next steps

Inputs (optional)

  • message: full commit message string
  • or type, scope, subject: to assemble Conventional Commit line
  • stageAll: boolean (default true) — add all unstaged changes
  • pushRemote: remote name (default origin)

Safety & Rules

  • Never force-push without explicit human approval
  • If on detached HEAD, prompt to create/switch branch
  • If no upstream, set with git push -u <remote> <branch>
  • Do not include co-author trailer in message; the hook adds it

Execution Routine

<task_breakdown>
1. [Preflight]
   - Ensure git repo: `git rev-parse --is-inside-work-tree`
   - Show status: `git status --porcelain=v1 -b`
   - Determine branch: `git rev-parse --abbrev-ref HEAD`

2. [Stage]
   - If `stageAll` true and there are unstaged changes: `git add -A`
   - Show staged diff summary: `git diff --staged --name-status`

3. [Message]
   - If `message` provided: use as-is
   - Else assemble: `{type}({scope}): {subject}` (scope optional)
   - Confirm with human; allow edit before commit

4. [Commit]
   - If nothing staged: exit with message "Nothing to commit"
   - Else: `git commit -m "$MESSAGE"`
     (prepare-commit-msg hook appends: Automagik Genie 🧞 <[email protected]>)

5. [Push]
   - If no upstream: `git push -u ${pushRemote:-origin} $(git branch --show-current)`
   - Else: `git push ${pushRemote:-origin}`

6. [Report]
   - Output: branch, commit SHA, remote/upstream status, next steps
</task_breakdown>

Read the full file on GitHub · 125 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 125 lines · 12 tokens per session scan A 29dd3c82298f

Subscribe to this mod's changes

commit is an agent published in the GitHub repository automagik-dev/forge (89 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 12 tokens to every session and 1,061 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.