gh-commit

gh-commit is a command for Claude Code from synaptiai/synapti-marketplace. It costs 0 tokens per session (814 once invoked), scanned A, original, Apache-2.0.

A commit workflow for turning code changes into Git commits, which are saved snapshots of project work.

In plain words
What is it for?
Use it to inspect branch context, compare changes with a linked GitHub issue, classify files, and create atomic commits.
Why use it?
It separates related changes from unrelated edits and supports smaller, easier-to-review commits.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: names the AskUserQuestion tool.

Good fit Use it to inspect branch context, compare changes with a linked GitHub issue, classify files, and create atomic commits.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/synaptiai/synapti-marketplace/gh-commit
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.

Clone the repo
git clone --depth 1 https://github.com/synaptiai/synapti-marketplace

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gh-commit

README.md
[![agentmods](https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/gh-commit/github.svg)](https://agentmods.dev/commands/synaptiai/synapti-marketplace/gh-commit)
Your own site
<a href="https://agentmods.dev/commands/synaptiai/synapti-marketplace/gh-commit"><img src="https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/gh-commit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-commit

Your own site · 80×15
<a href="https://agentmods.dev/commands/synaptiai/synapti-marketplace/gh-commit"><img src="https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/gh-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 814 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00814
Opus 5.5 $0.00000 $0.00326
Sonnet 5.5 $0.00000 $0.00163
Haiku 4.5 $0.00000 $0.00081

Measured 1mo ago against content hash f924c25719ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gh-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 1mo 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.

.claude/commands/gh-commit.md · 130 lines

How it starts

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

Context-Aware Commit

Smart commit workflow that classifies changes, flags out-of-context modifications, and supports multiple atomic commits.

Tool Usage: This workflow uses the AskUserQuestion tool for interactive decisions about change inclusion.

Phase 1: Context Discovery

  1. Get current branch and linked issue:

    BRANCH=$(git branch --show-current)
    ISSUE_NUM=$(echo $BRANCH | grep -oE 'issue-[0-9]+' | grep -oE '[0-9]+')
    
  2. Fetch linked issue details (if found):

    gh issue view $ISSUE_NUM --json title,body,labels 2>/dev/null
    
  3. Get branch diff summary:

    git diff --name-only main...HEAD
    

Phase 2: Change Analysis

  1. Get all changes:

    git status --porcelain
    
  2. Classify each change:

    In-Context (confident):

    • Files already in branch diff
    • Files matching issue keywords
    • Same directory as other changes

    Uncertain (needs review):

    • Related directories but not in diff
    • Documentation files

    Out-of-Context (flagged):

    • Config files (.env, editor settings)
    • Unrelated feature directories
    • Auto-generated files
  3. Display classification:

    ## Change Classification
    
    **Context**: Branch `{branch}`, Issue #{issue}: "{title}"
    
    ### In-Context
    - src/api/users.ts (matches issue keywords)
    
    ### Uncertain
    - docs/api.md (documentation)
    
    ### Out-of-Context
    - .vscode/settings.json (editor config)
    

Phase 3: Interactive Planning

Use the AskUserQuestion tool if uncertain or out-of-context files exist:

  • Option 1: "Commit in-context files only" (Recommended)
  • Option 2: "Include uncertain files"
  • Option 3: "Select specific files"
  • Option 4: "Commit all files"

Phase 4: Commit

  1. Stage selected files:

    git add {selected_files}
    
  2. Generate commit message following conventional format:

    • feat: for features
    • fix: for bug fixes
    • docs: for documentation
    • test: for test changes
    • refactor: for refactoring
    • chore: for maintenance

Read the full file on GitHub · 130 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. 1mo ago First seen · 130 lines · 0 tokens per session scan A f924c25719ea

Subscribe to this mod's changes

gh-commit is a command published in the GitHub repository synaptiai/synapti-marketplace (7 stars, last pushed 9d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 814 tokens. 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-31.