git-commit

A command that turns staged or pending code changes into one or more organized commits. Conventional commits are a shared format for writing commit messages consistently.

In plain words
What is it for?
Use it to inspect a Git diff, connect work to OpenSpec tasks, split unrelated changes, and create traceable commits.
Why use it?
It removes the guesswork from grouping changes and writing commit messages that explain what changed and why.

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/iolairus/borderlint/git-commit
Clone the repo
git clone --depth 1 https://github.com/iolairus/borderlint

Made for: Claude Code.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 571 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.00017 $0.00571
Opus 5 $0.00009 $0.00285
Sonnet 5 $0.00003 $0.00114
Haiku 4.5 $0.00002 $0.00057

Measured yesterday against content hash 5354a508cacf, 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 yesterday.

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/git-commit.md · 29 lines

What it actually says

Create one or more semantical organized conventional commits for the staged/pending work. $ARGUMENTS may name the change; otherwise infer it from the current branch — feature/<change> or feature/<task id>-<change> per workflow.yaml (strip a leading Jira key like PROJ-123- before matching against openspec/changes/).

Steps

  1. Read workflow.yaml (git.commit_convention, git.commit_scope_from, git.branch_prefix). Run git status and git diff to see what changed. If nothing changed, say so and stop.

  2. Identify the OpenSpec change and which tasks.md task(s) this work completes. If the diff mixes unrelated concerns, propose splitting into multiple commits and stage selectively (git add -p by file groups).

  3. Build the messages:

    • type: feat | fix | refactor | test | docs | chore — from the nature of the diff, not the task title.
    • scope: the change name (or a tighter module name if obvious).
    • subject: imperative, ≤72 chars.
    • body: what & why, wrapped at 72.
    • footer: Change: <change-name> and Task: <tasks.md step number(s)>; add Jira: <task id> (e.g. PROJ-123) if the change is linked to a backlog task. BREAKING CHANGE: when applicable.
  4. Show the messages, commit on approval, then tick the completed task(s) in tasks.md and amend or include that in the commit.

  5. Suggest the next step: if tasks.md has unchecked steps, /opsx:apply to continue; if all are done, /pr-open (feature branch) or /ship (integration branch).

Branch policy (git.work_mode in workflow.yaml):

  • On main: never commit. Offer to switch to the integration branch or create a feature branch.
  • On the integration branch: allowed if work_mode: flexible (confirm with the user the first time in the session); if work_mode: feature, offer to create a feature branch first.
  • When creating a feature branch: look up the linked task (frontmatter change: match in backlog/tasks/); if found and its id is a real Jira key (not a -Dnn draft), name the branch feature/<id>-<change>, otherwise feature/<change>.
  • On a feature branch: commit normally.
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. yesterday First seen · 29 lines · 17 tokens per session scan A 5354a508cacf

Subscribe to this mod's changes

git-commit is a command published in the GitHub repository iolairus/borderlint (6 stars, last pushed 9d ago), licensed MIT. It adds 17 tokens to every session and 571 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.