commit

A Git workflow for reviewing, staging, and committing code changes with a clear message. Staging selects the changes that will be included in the next commit.

In plain words
What is it for?
Use it to inspect a diff, select related files, check for common problems, and create a properly formatted commit.
Why use it?
It helps keep commits focused, avoids accidentally including secrets or debugging leftovers, and records why the change was needed.

Command

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/owainlewis/youtube-tutorials/commit
Clone the repo
git clone --depth 1 https://github.com/owainlewis/youtube-tutorials
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 307 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.00307
Opus 5 $0.00000 $0.00153
Sonnet 5 $0.00000 $0.00061
Haiku 4.5 $0.00000 $0.00031

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

tutorials/ai-git-workflow/resources/commands/commit.md · 55 lines

What it actually says

Commit

Stage and commit changes with a well-written message.

Instructions

  1. Run git status and git diff to understand all changes
  2. Run git log --oneline -5 to match the repo's existing commit style
  3. Group related changes — if there are unrelated changes, separate them into multiple commits
  4. Stage files individually (no git add . unless every change belongs together)
  5. Write the commit message

Before committing, check for

  • No .env files or secrets
  • No console.log / debug statements
  • No commented-out code

Message format

type(scope): subject

Body explains WHY this change was needed, not what changed.
The diff shows what changed.

Types

  • feat: New feature
  • fix: Bug fix
  • refactor: Code restructure (not a fix or feature)
  • chore: Maintenance, deps, config
  • docs: Documentation
  • test: Adding or fixing tests
  • perf: Performance improvement

Rules

  • Subject line: max 72 chars, imperative mood ("add", not "added")
  • Body: explain the reasoning, not the mechanics
  • One logical change per commit
  • Reference issue numbers if applicable

Example

feat(auth): add password reset via email verification

Users were permanently locked out if they forgot their password.
This adds a reset flow using time-limited email tokens.

Closes #234
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 · 55 lines · 0 tokens per session scan A ec727d4ce0dd

Subscribe to this mod's changes

commit is a command published in the GitHub repository owainlewis/youtube-tutorials (365 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 307 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-30.