git-commit

A guided Git commit workflow that creates a feature branch when needed, stages only files changed during the current session, and formats the commit message using common commit types.

In plain words
What is it for?
Use it when committing the changes made by an agent session, especially when the repository uses branch protection or conventional commit messages.
Why use it?
It reduces accidental commits to the main branch and prevents unrelated or older changes from being included.

Skill for Claude CodeCodex

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 skills/mir-am/skills-agents-ai-coding/git-commit
Any agent
npx skills add mir-am/skills-agents-ai-coding --skill git-commit
Clone the repo
git clone --depth 1 https://github.com/mir-am/skills-agents-ai-coding

Made for: Claude Code, Codex.

Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 562 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.00018 $0.00562
Opus 5 $0.00009 $0.00281
Sonnet 5 $0.00004 $0.00112
Haiku 4.5 $0.00002 $0.00056

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

Security

Grade A, and why

git-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.

skills/git-commit/SKILL.md · 67 lines

What it actually says

What I do

  • Prevent commits to main/master by auto-creating feature branches
  • Stage only files created/modified in current agent session
  • Generate conventional commit messages with proper formatting
  • Auto-detect when to add [skip ci] based on project rules

When to use me

Use this skill when the user asks to commit changes made during the current session.

Branch Protection Workflow

  1. Check current branch: git branch --show-current
  2. If on main or master:
    • Analyze git diff and agent conversation context
    • Generate descriptive branch name (format: <type>/<brief-description>)
    • Examples: feat/add-csv-export, fix/npe-in-builder, docs/update-readme
    • If context is unclear, ask user for branch name
    • Create and switch: git checkout -b <branch-name>

Staging Workflow

  1. Stage only files that the agent created or modified in this session
  2. Use specific file paths: git add <file1> <file2> <file3>
  3. Show what will be committed: git diff --cached --stat

Commit Message Format

  • Format: <type>: <description>
  • Types: feat, fix, refactor, test, docs, chore
  • Requirements: Under 50 characters, no period, present tense
  • Examples:
    • feat: add CSV export
    • fix: resolve NPE in builder
    • docs: update installation guide

CI Skip Detection

  1. Check if project has AGENTS.md file with CI skip rules
  2. If rules exist, add [skip ci] suffix when changes only affect:
    • Documentation files (*.md, README)
    • Config files (.gitignore, IDE settings)
    • Non-production scripts (e.g., benchmark/, scripts/)
  3. If no AGENTS.md or no CI rules found → do not add [skip ci]
  4. Example with skip: docs: update README [skip ci]

Final Commit Step

Execute the commit with the formatted message:

git commit -m "<type>: <description>"
# or with CI skip if applicable:
git commit -m "<type>: <description> [skip ci]"
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 · 67 lines · 18 tokens per session scan A 5a5de3c5e610

Subscribe to this mod's changes

git-commit is a skill published in the GitHub repository mir-am/skills-agents-ai-coding (2 stars, last pushed 4mo ago), licensed MIT. It adds 18 tokens to every session and 562 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-31.

Related

Other skills, from other repositories

commit-archaeologist

Reconstructs why code exists from local git history, including the introducing commit, later changes, current authors, repeated companion files, and likely intent. Use when the user asks "why does this code exist", "who wrote this function and why", or to "explain the history of this function" before a rewrite…

Shubhamsaboo/awesome-llm-apps · 82 tokens

pr-draft-summary

Create the required PR-ready summary block, branch suggestion, title, and draft description for openai-agents-python. Use before the final response whenever the current task changed runtime code, tests, examples, build/test configuration, or docs with behavior impact, regardless of perceived change size and including…

openai/openai-agents-python · 114 tokens

well-formed

Review pull request diffs for code smells, style issues, and safety problems before merging.

luongnv89/asm · 22 tokens

regulatory-analysis

Analyzes documents and processes against FINRA, SEC, Federal Reserve, and CFPB regulatory frameworks. Identifies compliance gaps, classifies findings by severity, and recommends remediation. Use when performing compliance audits, regulatory reviews, gap analyses, or verifying policy adherence to financial regulations.

open-gitagent/opengap · 59 tokens

create-agent

Creates and configures agent.yaml files, writes SOUL.md personality definitions, and sets up agent directory structures with skills, tools, and knowledge. Use when the user wants to configure an agent, create agent.yaml, write SOUL.md, set up agent directory structure, or customize agent settings.

open-gitagent/opengap · 62 tokens

manage-skills

Searches the SkillsMP registry, installs skills locally or globally, creates custom skills with SKILL.md frontmatter, and manages the skill lifecycle. Use when the user wants to find skills, add new capabilities, install a skill, browse available skills, create a custom skill, or manage the skills system.

open-gitagent/opengap · 65 tokens