committing

A set of rules for creating Git commits. Git is a version-control system that records changes to a codebase over time.

In plain words
What is it for?
Use it before and during commits to inspect changes, stage specific files, write clear messages, run hooks, and complete the project’s required workflow.
Why use it?
It helps keep commits focused and reviewable while preventing secrets, debug code, or bypassed checks from entering the repository.

Cursor rule for Cursor

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 rules/andr-ca/agentharness/committing
Clone the repo
git clone --depth 1 https://github.com/andr-ca/agentharness

Made for: Cursor.

Per session 37 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,345 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.00037 $0.01345
Opus 5 $0.00018 $0.00673
Sonnet 5 $0.00007 $0.00269
Haiku 4.5 $0.00004 $0.00135

Measured yesterday against content hash c05db0e057bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

.cursor/rules/committing.mdc · 108 lines

How it starts

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

Committing

Full reference: .github/COMMITTING_GUIDELINES.md (examples, git aliases, commit template). This skill is the actionable summary.

Before you commit

  1. git status and git diff — know exactly what you're about to commit.
  2. Stage specific files, not git add . / git add -A blind.
  3. git diff --cached — review staged content one more time, scan for secrets (API keys, tokens, passwords).
  4. Let hooks run. Never --no-verify, never --no-gpg-sign. If a hook fails, fix the underlying issue and re-stage — don't bypass it.

Writing the commit

  • Atomic: one logical change per commit. Don't mix a feature, a fix, and a refactor in one commit.
  • Message explains WHY, not WHAT — the diff already shows what changed.
  • Imperative mood summary ("Add X", not "Added X"), ideally under ~50 chars, blank line, then body wrapped at ~72 chars if more explanation is needed.
  • Reference issues (Fixes #123, Relates to #456) when applicable.

What never gets committed

  • Secrets: API keys, tokens, passwords, private credentials.
  • .env and its variants — but DO commit .env.sample (sanitized template).
  • Debug code: stray console.log/print, commented-out code, debugger statements.
  • Build artifacts, node_modules/, and anything covered by .github/.gitignore.template.

After the commit — run the completion gate, then follow publish authority

  1. Run bash tools/check-completion.sh — all quality gates must pass before declaring work done. This is enforced by the Stop hook in .github/hooks/completion-gate.json (Copilot) and .claude/settings.json (Claude Code).

    This path is specific to the agentharness repo itself. If this skill file is symlinked/copied into a consumer project instead (the normal case — see harness-link.sh), tools/check-completion.sh does not exist there and will exit 127. Check for a generated, consumer-local completion gate first: [ -x .agentharness-bin/check ]. harness-link.sh init/update generates this wrapper automatically for link/submodule/npm modes — run bash .agentharness-bin/check in its place. It delegates to the resolved harness checkout's own enforce-profile command against this project, not the harness's. --mode copy has no live harness checkout to delegate to, so no wrapper exists there — harness-link.sh audit --json's can_mechanically_enforce field tells you up front whether a given install has one at all, rather than finding out mid-task. Either way, also run this project's own lint/type/test commands if it has any not covered by the gate. Don't silently skip verification just because the harness's own path doesn't resolve — find the equivalent for this repo.

Read the full file on GitHub · 108 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. yesterday First seen · 108 lines · 37 tokens per session scan A c05db0e057bb

Subscribe to this mod's changes

committing is a cursor rule published in the GitHub repository andr-ca/agentharness (1 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 1,345 once invoked, about $0.0002 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.