agentleFS
ZunoSmartLabsZunoSmartLabs/zsl-superpowers/skills/engineering/commit/SKILL.md

commit

Skill2 starsChanged 52 days agoMITView on GitHub

Plan and create git commits autonomously for changes made in this session (no per-commit approval prompt). Cross-session dirty files — files modified outside this conversation's tool calls — get confirmed before inclusion. Explicit file lists only, never `git add -A`. No Claude attribution lines. Use when the user wants to commit, says "/commit", or asks to land changes — and composable by any skill that needs to land changes (e.g. commit-push-pr, tdd-parallel).

  • 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

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 168 edited versions we read keep these.

  • 4

    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:

    Run git status to list every dirty and untracked file.

    line 36
  2. Distinctive:

    When in doubt, classify as other-origin — better to confirm than to over-include.

    line 40
  3. Distinctive:

    Ask once: *"These files are dirty but I didn't touch them this session.

    line 44
  4. Very specific:

    Default to "leave them out" if the user is uncertain — they can always re-run /commit after staging by hand.

    line 45
  5. Distinctive:

    If the bucket is empty, skip this step entirely.

    line 46
  6. Very specific:

    Docs- or scratch-only commit → main: If every file in the commit is documentation (docs/, narrative markdown like README.md / CLAUDE.md / …

    line 53
  7. Very specific:

    Autonomous means autonomous: Don't draft a plan and ask "Shall I proceed?" — just execute.

    line 76

“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 Changes

Fully autonomous for changes made in this session. Whoever summoned this skill — the user typing /commit, or another skill composing it as its commit step — that is the approval. Don't pause to ask "Shall I proceed?"

The only legitimate reason to stop and ask is cross-session ambiguity: dirty files in the tree that this conversation didn't produce.

flowchart TB
    git["git status<br/>(every dirty + untracked file)"] --> q{"did this conversation<br/>touch the file?"}
    q -->|"yes — Edit/Write/Bash<br/>in this session"| session["**Session bucket**<br/>auto-included"]:::good
    q -->|"no — already dirty<br/>or external write"| other["**Other-origin bucket**<br/>confirm before including"]:::warn
    q -->|"unsure"| other
    session --> stage["explicit `git add &lt;path&gt;`<br/>(never `-A`)"]
    other --> stage
    stage --> rails{"safety rails"}
    rails -->|".env* · *.pem ·<br/>credentials · >10MB"| skip["skipped<br/>(reported in summary)"]:::bad
    rails -->|"clean"| route{"touches code?<br/>(SKILL.md · scripts ·<br/>plugin.json · mkdocs.yml)"}
    route -->|"yes — any code file<br/>(mixed counts)"| branch["create feature branch<br/>(feature/ fix/ chore/…)"]:::warn
    route -->|"no — only docs/**<br/>or .scratch/**"| onmain["stay on `main`"]:::good
    branch --> commit["`git commit`<br/>no Claude attribution"]:::good
    onmain --> commit

    classDef good fill:#dcfce7,stroke:#16a34a;
    classDef warn fill:#fef3c7,stroke:#d97706;
    classDef bad fill:#fee2e2,stroke:#dc2626;

Process

  1. Classify the dirty tree.
    • Run git status to list every dirty and untracked file.
    • For each, decide which bucket it falls into:
      • Session changes — files this conversation modified via Edit, Write, NotebookEdit, or files you created/modified through Bash commands you ran. You have the full conversation history; you know what you touched.
      • Other-origin changes — files that were already dirty when the session started, or modified by something outside your tool calls (the user editing in another window, a build process, a pre-commit hook, a sibling agent).
    • When in doubt, classify as other-origin — better to confirm than to over-include.
  2. Confirm the other-origin bucket (only if non-empty).
    • Show the list, one line per file: <path> — <one-line note on what kind of change, if known>.
    • Ask once: "These files are dirty but I didn't touch them this session. Include in the commit, leave them out, or stage them as a separate commit?"
    • Default to "leave them out" if the user is uncertain — they can always re-run /commit after staging by hand.
    • If the bucket is empty, skip this step entirely.
  3. Plan the commit(s).
    • Group session changes into one logical commit by default. Always include all the session's code changes — don't ask which subset to land. Split into multiple commits only when the diff genuinely covers two unrelated concerns (e.g. a feature change plus a doc typo that crept in).
    • Draft a clear, imperative commit message focused on why, not what. Multi-line if there's substance worth recording; one line for a small change. Match the repo's existing commit-message style (check git log --oneline -n 20 if unsure).
  4. Route to the right branch (PR-ship-style repos only — docs/agents/ship-style.md; trunk-style repos commit everything to main).
    • Docs- or scratch-only commit → main. If every file in the commit is documentation (docs/**, narrative markdown like README.md / CLAUDE.md / docs/changelog.md) or lives under .scratch/, commit it directly on main. These are low-risk, board/tracker, and prose changes — a branch-and-PR round-trip buys nothing.
    • Any code → a feature branch. If the commit touches even one code file, the whole commit goes on a branch — never split a mixed docs+code commit. Code means source and scripts (*.py, *.sh, *.ts, …), the skill definitions themselves (**/SKILL.md and their bundled assets), and the sync/build manifests (.claude-plugin/plugin.json, .claude-plugin/marketplace.json, mkdocs.yml, Makefile). The distinction is what the file is, not its extension — a SKILL.md is code here, a docs/** markdown page is not.
    • When a branch is required and you're on main, create it yourself — don't stop to ask — with the prefix convention (feature/ fix/ chore/ refactor/ env/, per /zsl:git-branch), then switch to it and commit. If you're already on a non-default branch, just commit there.
  5. Execute.
    • git add <file1> <file2> … — explicit paths only. Never git add -A, git add ., or any wildcard form that could sweep in untracked files you didn't intend.
    • git commit -m "<message>" — use a heredoc for multi-line messages.
    • git log --oneline -n <count> to verify.
  6. Report. One short line per commit: sha + subject — and the branch it landed on when that wasn't main. Done.

Safety rails (override autonomy)

These checks fire automatically and do not count as "confirmation prompts" — they protect the commit, they don't ask permission:

  • Refuse to stage .env*, *credentials*, *secret*, *.pem, *.key, files matching any pattern in .gitignore that somehow got dirty, and large binaries (>10 MB). Surface them in the final report as "skipped for safety" with a one-line reason each.
  • Pre-commit hook failure — fix the underlying issue and create a new commit. Never use --no-verify; never git commit --amend after a failed hook (the previous commit may not have been created at all, so amend would modify the wrong target).
  • Code never lands on main (PR-ship-style repos) — a commit that touches code is rerouted to a feature branch by Step 4, not refused: the skill creates the branch itself and commits there. Only documentation (docs/**, narrative *.md) and .scratch/ changes commit straight to main. A mixed docs+code commit counts as code and goes to the branch whole.

Important

  • No co-author lines, no Claude attribution. Commits should read as if the user wrote them. No Co-Authored-By:, no "🤖 Generated with…", no trailer of any kind beyond what the repo's own commit convention requires.
  • No git add -A. Ever. Explicit file lists are how we prevent unrelated dirt from sneaking into a commit.
  • Autonomous means autonomous. Don't draft a plan and ask "Shall I proceed?" — just execute. The user already said yes when they typed /commit.

Why this shape

  • Autonomous for session changes because /commit is invoked after work the user already knows about. Re-confirming each commit was friction without value.
  • Confirm for other-origin changes because the conversation history can't account for them — they're a genuine signal of ambiguity, the one case where stopping is the right call.
  • Never -A because the cost of a bad surprise (committing .env or a stash file) is far higher than the cost of typing a few paths.
  • Docs to main, code to a branch because the two carry different risk. Prose and tracker edits are cheap to land and cheap to revert, so a PR round-trip is pure friction; code changes behaviour and deserves review, so they always get a branch (and a mixed commit is code). The skill makes that call and creates the branch itself — the opinion is enforced, not negotiated each time.

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.