commit

A workflow for staging selected changes and creating one commit using the Conventional Commits format, a shared style such as feat:, fix:, or docs:. It matches the repository's recent commit style and runs pre-commit hooks.

In plain words
What is it for?
Use it when you want to review current changes, stage only the intended files, and create a correctly formatted commit.
Why use it?
It helps avoid committing unrelated files or secrets and keeps commit history consistent. It also accounts for files changed automatically by pre-commit checks.

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/tam159/next-role/commit
Any agent
npx skills add tam159/next-role --skill commit
Clone the repo
git clone --depth 1 https://github.com/tam159/next-role

Made for: Claude Code, Codex.

Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 490 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.00046 $0.00490
Opus 5 $0.00023 $0.00245
Sonnet 5 $0.00009 $0.00098
Haiku 4.5 $0.00005 $0.00049

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

Security

Grade A, and why

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.

.agents/skills/commit/SKILL.md · 47 lines

What it actually says

Create a single commit using Conventional Commits format, matching the style in git log.

Workflow

  1. Run these in parallel:

    • git status (see what's untracked / modified)
    • git diff and git diff --staged (see what will be committed)
    • git log --oneline -10 (match recent style)
  2. Review the changes and group them into ONE commit. If the diff spans clearly unrelated changes, ask the user whether to split.

  3. Stage explicitly (avoid git add -A / git add .):

    • Add the specific files that belong in this commit by name.
    • Never stage .env, credentials, or other secrets. If gitleaks would flag it, don't stage it.
  4. Compose the commit message:

    • Subject: <type>: <short imperative summary> — lowercase, no trailing period, ≤72 chars.
    • Types in use here: feat, fix, chore, docs, refactor, test.
    • Body (optional): explain the why, not the what. Wrap at 72 chars.
  5. Commit with a HEREDOC so formatting survives:

    git commit -m "$(cat <<'EOF'
    feat: <subject>
    
    <optional body>
    EOF
    )"
    
  6. Pre-commit will run automatically. If it modifies files (auto-fix), re-stage and create a NEW commit — do not amend unless the user asks. If hooks fail with errors, fix the underlying issue and create a new commit; never bypass with --no-verify.

  7. After the commit succeeds, run git status to confirm a clean tree and report the commit SHA + subject.

Do not

  • Push to the remote unless the user asks.
  • Add a Co-Authored-By trailer unless the user has asked for one (this repo's history doesn't use them).
  • Use --amend unless explicitly requested.
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 · 47 lines · 46 tokens per session scan A e9e0a721e4c2

Subscribe to this mod's changes

commit is a skill published in the GitHub repository tam159/next-role (48 stars, last pushed 2d ago), licensed MIT. It adds 46 tokens to every session and 490 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-30.