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

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 commands/synaptiai/synapti-marketplace/gh-commit
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.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.svg" alt="Measured on agentmods" 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. 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.00000 $0.00814
Opus 5 $0.00000 $0.00407
Sonnet 5 $0.00000 $0.00163
Haiku 4.5 $0.00000 $0.00081

Measured 4d ago against content hash f924c25719ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (6 stars, last pushed 1mo 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.

Related

Other commands, from other repositories

create-worktree

Follow these steps to create a git worktree.

CaptainMe-AI/lead-dev-os · 0 tokens

yolo-abort

Immediate halt of /yolo Hive session mid-action — partial state saved, in-flight git operations rolled back where possible, audit log finalized with abort flag.

frankxai/Starlight-Intelligence-System · 31 tokens

hf.memory

Scan the current conversation for architectural decisions, bug root causes, configuration choices, codebase patterns, and workflow preferences. Write each as a memory item to the local JSONL store for ingestion by the memory sync worker.

T-rav/hydraflow · 0 tokens

paper-trail-ingest

Ingest the citations of one SOTA into the registry. Extracts bibliographic sections, parses citations via the citation-parser sub-agent, resolves DOI via Crossref/S2, deduplicates against the registry, creates new candidate refs, and substitutes free-text citations with [[wikilinks]]. Required first step to make a…

roomi-fields/paper-trail · 75 tokens

paper-trail-new-paper

Start writing an academic paper (IMRaD structure) on a topic, with anti-hallucination citation verification at every step. Builds on existing audited SOTAs.

roomi-fields/paper-trail · 35 tokens

paper-trail-linkify

Dernière passe du pipeline cible refondu. Insère les wikilinks finaux dans le SOTA (vers PDF si validé, sinon vers ancre dans une section ## Statut des sources régénérée idempotemment en bas du fichier). Présuppose que les passes identify/purge/acquire ont été lancées.

roomi-fields/paper-trail · 70 tokens