agentleFS
digitaltracerdigitaltracer/agent-skills/skills/commit/SKILL.md

commit

Skill4 starsChanged yesterdayMITView on GitHub

Create conventional commits from staged changes, scan for credentials first, and propose splitting mixed changes; --atomic groups the whole working tree into one commit per concern. Use when the user runs /commit or asks to commit.

  • Reads credentials

187 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use validate-plan, act-on-feedback and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • shawn-dumasSkill

    validate-plan

    Validate an orchestration plan after pre-flight certification. Runs adversarial review, deep review (verify prompt data against codebase), and PoC gate for risky approaches. Auto-invoked by orchestrate-* skills at Step 8.

    Also in 5 projects that use this

  • MicrosoftSkill

    act-on-feedback

    Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

    Also in 3 projects that use this

  • decocmsSkill

    add-mcp-tools

    Guide for adding new MCP tools with consistent patterns for schemas, tool definitions, registry updates, and Better Auth integration

    Also in 3 projects that use this

  • MicrosoftSkill

    generate-run-commands

    Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.

    Also in 3 projects that use this

  • mitsuhikoSkill

    oebb-scotty

    Austrian rail travel planner (ÖBB Scotty). Use when planning train journeys in Austria, checking departures/arrivals at stations, or looking for service disruptions. Covers ÖBB trains, S-Bahn, regional trains, and connections to neighboring countries.

    Also in 3 projects that use this

  • mitsuhikoSkill

    pi-share

    Load and parse session transcripts from shittycodingagent.ai/buildwithpi.ai/buildwithpi.com/pi.dev (pi-share) URLs. Fetches gists, decodes embedded session data, and extracts conversation history.

    Also in 3 projects that use this

  • Other versions187 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 187

    1. microsoft/vscode★ 195ksame name
    2. TryGhost/Ghost★ 56ksame name
    3. ToolJet/ToolJet★ 41ksame name
    4. ShareX/ShareX★ 41ksame name
    5. openai/symphony★ 27ksame name
    6. ccusage/ccusage★ 19ksame name
    7. ryoppippi/ccusage★ 19ksame name
    8. windmill-labs/windmill★ 18ksame name
    9. EverMind-AI/EverMemOS★ 14ksame name
    10. EverMind-AI/EverOS★ 14ksame name

    177 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 167 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create well-formatted commits using conventional commit messages.

    line 10
  2. Distinctive:

    Bullet lists: when prose would read better.

    line 83
  3. Distinctive:

    Summarising the diff line by line: If the body reads like a changelog of the diff, delete it.

    line 87
  4. Distinctive:

    All files under one directory → that directory is the scope.

    line 100
  5. Very specific:

    Add a BREAKING CHANGE: footer with the migration path.

    line 110
  6. Very specific:

    Always Refs, never Closes, unless the user explicitly confirms.

    line 119
  7. Distinctive:

    Before running the built-in scan, check for these markers:

    line 157
  8. Distinctive:

    If any are found, the repo already has secret scanning wired up and the built-in scan is skipped (with a one-line notice).

    line 164
  9. Very specific:

    When findings exist, list each with file, line, and pattern type.

    line 187
  10. Distinctive:

    Never push. Never create a branch.

    line 207

“Common” is measured: kept by at least 6 in 10 of the 167 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Claude Command: Commit

Create well-formatted commits using conventional commit messages.

Usage

/commit
/commit --atomic
/commit --no-verify
/commit --dry-run
/commit --amend

Security Invariants

Two rules cannot be bypassed by any flag, including --no-verify:

  1. Credential scanning runs on every commit. --no-verify skips git hooks but never the secret scan.
  2. The command never runs git add on initial staging. The user stages their own changes. (Exceptions: after the user confirms a split proposal, the command may re-stage groups on their behalf — see Splitting Commits; and under --atomic, where group-by-group staging is the point — see Atomic Mode.)

Step-by-Step Flow

  1. Check for staged files — git diff --cached --name-only. If empty, abort:
    Error: No staged files found. Stage changes with `git add` before running /commit.
    Exceptions: with --amend, proceed even when nothing is staged (message-only amends are valid); with --atomic, work from the whole tree — see Atomic Mode.
  2. Inspect the diff — git diff --cached. If empty (binary-only changes), fall back to filenames, git diff --cached --summary, and extensions to infer intent.
  3. Scan for credentials — see Credential Scanning. Unbypassable.
  4. Hook handling — never run hooks manually. git commit invokes them natively and honours core.hooksPath (Husky, lefthook, pre-commit framework). Running them ahead of time causes double execution and misses tools that don't write to .git/hooks/. If the commit fails on a hook, show the full output and prompt [R]etry / [S]kip hook (re-run with --no-verify) / [A]bort.
  5. Analyze the diff — if multiple distinct concerns are present, propose splitting (see Splitting Commits).
  6. Generate commit message(s) — see Commit Message Format.
  7. Dry-run short-circuit — under --dry-run, print the proposed message(s) and staged file list, then exit.
  8. Commit — execute git commit. Pass --no-verify through when set.

Commit Message Format

<type>(<scope>)<!>: <description>

[optional body]

[optional footer]

Subject line rules

  • Type — one of the standard types below. Required.
  • Scope — area of the codebase affected. Inferred from paths (see below).
  • ! — appended for breaking changes. E.g. feat!: or feat(api)!:. Always paired with a BREAKING CHANGE: footer.
  • Description — imperative mood ("add feature", not "added" or "adds").
  • Lowercase after the colon. feat: add login, not feat: Add login. Changelog tooling depends on this.
  • No trailing period.
  • Length — ≤ 72 characters total; aim for ≤ 50.

When to write a body

The body should explain why, not what. The diff already shows what changed.

Include a body when a teammate reading the commit in six months wouldn't understand the reason from the diff alone — subtle bug fixes, performance tradeoffs, design decisions, non-obvious constraints.

Skip the body when the diff is self-explanatory — renames, formatting, dependency bumps, straightforward additions.

Wrap at 72 characters.

Body anti-patterns to avoid

  • Bullet lists when prose would read better. Reserve bullets for genuinely enumerable items.
  • Restating filenames or function names already visible in the diff.
  • Filler openings like "This commit...", "Updates the code to...", "Made changes that...".
  • Marketing adjectives — "comprehensive", "robust", "seamless", "powerful".
  • Summarising the diff line by line. If the body reads like a changelog of the diff, delete it.

Footers

  • BREAKING CHANGE: <description> — required when ! is in the subject.
  • Refs #123 — default for issue references inferred from the branch.
  • Closes #123 — only when the user explicitly says the issue is done. Never inferred from the diff alone; the command can't reliably know whether a change completes an issue without reading it.
  • Co-authored-by: — only for real human pairing partners.

Never add AI attribution. No "Generated by Claude", no "Co-authored-by: Claude".

Scope inference

  • All files under one directory → that directory is the scope. Applied silently.
  • Files span multiple paths but share a meaningful segment (src/auth/... + tests/auth/...) → use the shared segment.
  • Unrelated paths → omit the scope.
  • Ambiguous (two equally plausible candidates) → prompt the user.

Breaking change detection

Signals: removed/renamed public exports, deleted endpoints, renamed CLI flags, schema-incompatible migrations, major version bumps. When detected:

  1. Append ! after the type or type+scope.
  2. Add a BREAKING CHANGE: footer with the migration path.
  3. Surface the detection to the user before committing.

Issue references from branch names

  • feat/123-login → Refs #123
  • fix/ENG-456-null-check → Refs ENG-456
  • users/alice/feat/789-thing → Refs #789

Always Refs, never Closes, unless the user explicitly confirms.

Revert commits

revert: <original subject>

This reverts commit <sha>.

<optional reason for the revert>

Commit Types

TypeWhen to use
featNew feature or user-visible capability
fixBug fix
docsDocumentation only
styleFormatting, whitespace — no logic change
refactorCode change that neither adds a feature nor fixes a bug
perfPerformance improvement
testAdding or updating tests
buildBuild system or package manifest
ciCI/CD pipeline configuration
choreTooling, maintenance, deps, config
revertReverting a previous commit

Convey nuance through scope or body — fix(security):, chore(deps):, feat(a11y): — rather than inventing types. Stable types matter for commitlint, semantic-release, and changelogs.

When multiple types apply and splitting isn't practical, pick by user-visible impact: feat > fix > perf > refactor > others. A feature that incidentally fixes a latent bug is announced as a feat with the fix noted in the body — that's how it'll read in the changelog regardless.

Credential Scanning

Runs unconditionally on every commit.

Detection of existing scanners

Before running the built-in scan, check for these markers:

  • .pre-commit-config.yaml containing detect-secrets, gitleaks, or trufflehog
  • .gitleaks.toml / .gitleaksignore
  • .secrets.baseline (detect-secrets)
  • A secret-scan / gitleaks job in .github/workflows/

If any are found, the repo already has secret scanning wired up and the built-in scan is skipped (with a one-line notice). The hooks will catch anything during git commit anyway, and duplicating the work just doubles the false-positive surface.

Built-in scan patterns

PatternExamples
AWS keysAKIA[0-9A-Z]{16}, ASIA[0-9A-Z]{16}
GitHub tokensghp_, gho_, ghs_, ghu_, ghr_
Vendor tokenssk_live_ (Stripe), xoxb- / xoxp- (Slack), sk- (OpenAI), sk-ant- (Anthropic), AIza (Google), SG. (SendGrid), AC[0-9a-f]{32} (Twilio)
Private keys-----BEGIN (RSA|OPENSSH|EC|)? ?PRIVATE KEY-----
JWTeyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+
Connection stringsURLs with embedded credentials (postgres://user:pass@..., mongodb+srv://..., redis://...@...)
.env filesAny staged .env* that isn't .env.example, .env.sample, or .env.template

Generic high-entropy heuristics and password = "..." style regexes are intentionally omitted — they flag hashes, UUIDs, test fixtures, and parameter names with high frequency. Vendor prefixes catch real secrets reliably; everything else is noise.

Allowlisting false positives

  • Inline: a # pragma: allowlist-secret (or // pragma: allowlist-secret) comment on the same line suppresses scanning.
  • Persistent: a .commit-allowlist file at repo root, one finding per line as path:line:pattern, suppresses repeats.

Resolution flow

When findings exist, list each with file, line, and pattern type. Prompt [B]lock / [A]llow once / [P]ersistently allow. Any Block aborts the commit.

Splitting Commits

Trigger criteria — different concerns, mixed types, source vs docs/config mixed, or a diff large enough that one message can't honestly describe it.

Flow

  1. Propose groupings with rationale.
  2. Show files and proposed message for each.
  3. User confirms or adjusts.
  4. The command then handles staging itself: git reset to unstage everything, then git add each group in turn and commit it before moving to the next. (The user already gave intent by staging initially and confirming the split; re-running git add manually for each group is unnecessary friction.)

Atomic Mode

/commit --atomic works from the working tree without pre-staging — for the "based on the changes, do atomic commits" flow. Also enter this mode when the user asks in prose for atomic commits with nothing staged.

  1. Analyze all uncommitted changes: staged, unstaged, and untracked project files. Never sweep in files that look unrelated to the session's work (scratch files, local configs) without listing them explicitly first.
  2. Group by concern and show the proposed groups, each with its files and commit message.
  3. On confirmation, stage and commit each group in turn — same mechanics as a confirmed split. Credential scanning and all message rules apply per commit.
  4. Never push. Never create a branch. No AI attribution — same as every mode.

Command Options

FlagBehaviour
--atomicWork from the unstaged working tree: group all changes by concern and commit each group after confirmation. See Atomic Mode.
--no-verifyPass --no-verify to git commit, skipping git hooks. Does not skip credential scanning.
--dry-runPrint proposed message(s) and exit.
--amendAmend the previous commit. Works with or without new staged changes. Shows previous commit, staged additions, and proposed updated message before confirming.

Examples

feat(auth): add OAuth2 login via Google
refactor(pipeline): replace sync file processor with async queue

The sync implementation blocked the event loop on files over a few MB,
which surfaced as request timeouts under load. The async queue caps
concurrency at a configurable limit so memory stays bounded.

Refs #118
feat(api)!: rename /users endpoint to /accounts

BREAKING CHANGE: /users is no longer available. Update all clients
to use /accounts. Response schema is unchanged.

Refs #204
revert: feat(auth): add OAuth2 login via Google

This reverts commit a1b2c3d.

The Google OAuth flow doesn't handle workspace-restricted accounts
correctly; reverting until #231 lands.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.