agentleFS
Magnus-GilleMagnus-Gille/claude-skills/commit/SKILL.md

commit

Skill5 starsChanged 33 days agoMITView on GitHub

Create or amend a Git commit with author verification, diff review, and a conventional message. Use only when the user explicitly asks to commit or amend changes.

  • Reads credentials

188 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

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 168 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create clean, well-documented git commits with safety checks.

    line 8
  2. Distinctive:

    Do NOT silently fix it — the user should decide whether to update the config or commit under the current identity.

    line 26
  3. Very specific:

    No files in secrets/ are staged

    line 48
  4. Very specific:

    No files with key, secret, or token in the name are staged (unless they're clearly code files)

    line 49
  5. Distinctive:

    If any are found, warn and stop.

    line 51
  6. Distinctive:

    If no message was provided, draft one:

    line 55
  7. Very specific:

    Use conventional commit format: type: description

    line 56
  8. Distinctive:

    Keep the first line under 72 characters

    line 58
  9. Distinctive:

    Add a body paragraph if the change is non-trivial

    line 59
  10. Very specific:

    Always end with: Co-Authored-By: Claude <assistant> <noreply@anthropic.com> (use the current model name)

    line 60
  11. Distinctive:

    Use a heredoc for multi-line messages.

    line 71
  12. Very specific:

    Never use --no-verify; respect pre-commit hooks.

    line 81
  13. Distinctive:

    Verify author identity; stop on an unexpected identity without silently changing configuration.

    line 84

“Common” is measured: kept by at least 6 in 10 of the 168 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

/commit - Standardized Git Commit

Create clean, well-documented git commits with safety checks.

Usage

  • /commit - Stage, review, commit, and optionally push
  • /commit <message> - Commit with a specific message (still runs safety checks)
  • /commit amend - Amend the explicitly requested commit

Workflow

Step 1: Verify Author Identity

git config user.name
git config user.email
  • The user's expected user.name and user.email should be configured in their global ~/.gitconfig or in the repo's .git/config. If git config user.email returns an unexpected value (e.g. a CI/bot email, or empty), warn the user before proceeding.
  • Do NOT silently fix it — the user should decide whether to update the config or commit under the current identity.

Step 2: Review Changes

Run in parallel:

git status
git diff --stat
git diff --staged --stat

Present a summary:

  • Files modified (staged vs unstaged)
  • Files added/deleted
  • Untracked files that might need staging

Stage specific task-owned files within the requested commit scope. Preserve unrelated staged and unstaged changes; ask only when ownership or scope is unclear. Inspect the exact staged diff before committing, including any pre-existing staged content. Do not include unrelated staged content in this commit or unstage it without authorization.

Step 3: Security Check

Before committing, verify:

  • No .env, credentials.json, token.json, or client_secret_*.json files are staged
  • No files in secrets/ are staged
  • No files with key, secret, or token in the name are staged (unless they're clearly code files)

If any are found, warn and stop. Do not commit.

Step 4: Write Commit Message

If no message was provided, draft one:

  • Use conventional commit format: type: description
  • Types: feat, fix, docs, refactor, test, chore, style
  • Keep the first line under 72 characters
  • Add a body paragraph if the change is non-trivial
  • Always end with: Co-Authored-By: Claude <assistant> <noreply@anthropic.com> (use the current model name)

Show the proposed message and staged diff summary, then commit under the existing request. Ask again only when the user required message approval or a material scope decision remains.

Step 5: Commit

git add <files>
git commit -m "<message>"

Use a heredoc for multi-line messages.

Step 6: Post-Commit

Show the commit hash and summary. Push only when the owner has explicitly authorized publication in this task, after previewing the exact remote, branch, and concise diff. Otherwise report the local commit as complete.

Key Rules

  1. Publication needs explicit owner authorization; reuse authorization already given for this task.
  2. Amend only the owner-requested commit. Rewriting published history needs explicit authorization for that action and target.
  3. Never use --no-verify; respect pre-commit hooks.
  4. Stage specific files and preserve unrelated work.
  5. Inspect the exact staged diff and report what was committed.
  6. Verify author identity; stop on an unexpected identity without silently changing configuration.

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.