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

commit

Skill5 starsChanged 10 days agoMITView on GitHub

Commit the work done in this session, skipping files a parallel session also touched.

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

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 168 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Commit only what you changed in this session.

    line 12
  2. Distinctive:

    Check the tree: Run git status --porcelain.

    line 19
  3. Very specific:

    Commit by path, without touching the index: Use git commit --only -m "<subject>" -- <path> <path> … (options before the --).

    line 28
  4. Distinctive:

    Commit to the current branch, whatever it is: Never switch, create, or suggest a branch, not even when the current branch is main/master.

    line 45
  5. Distinctive:

    If the changes are genuinely two unrelated things, make two commits, still your files only.

    line 48
  6. Distinctive:

    Never git stash, git checkout --, or git reset: a parallel session's uncommitted work is unrecoverable if you discard it.

    line 49

“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

Commit only what you changed in this session. Other sessions may be working in the same repo at the same time; that is expected, and none of their work is yours to commit.

Process

  1. List your files. From this conversation, write down every file you created, edited, or deleted. Changes under .claude/agent-memory/ are always yours too, whoever wrote them: they are the notes of agents with memory: project, not a parallel session's work in progress, so they ride along in your commit (git add -- .claude/agent-memory). If you touched nothing, say so and stop.
  2. Check the tree. Run git status --porcelain. Anything not on your list belongs to someone else, ignore it completely.
  3. Drop the overlaps. For each of your files, git diff -- <path> (git diff --cached too if it is already staged). If it contains changes you did not make, leave that file out, the other session will commit it. If a file mixes your hunks with foreign hunks, stage only yours: git add -p -- <path> needs an interactive terminal, so where the shell has none (Claude Code's Bash, most agent harnesses), write your hunks to a patch (git diff -- <path> > "$TMPDIR/mine.patch", then delete the foreign hunks from it) and git apply --cached "$TMPDIR/mine.patch". Never include a foreign hunk because it is small. Note which files you skipped.
  4. Commit by path, without touching the index. Use git commit --only -m "<subject>" -- <path> <path> … (options before the --). --only commits exactly the named paths and ignores whatever another session has already staged, so a foreign git add can never ride along. Never git add -A, git add ., or commit -a. For a partially staged file from step 3, git commit -m "<subject>" -- <path> after staging your hunks instead. New files are the exception: --only silently skips untracked paths, so git add -- <new-path> each file you created first, then include it in the same --only list. Check git status --porcelain afterwards; a ?? line for one of your files means it was skipped.
  5. Subject. Conventional Commits: type(scope): summary: imperative mood, lowercase, no trailing period, under 72 chars. Types: feat, fix, refactor, docs, test, chore, perf, build, ci. Scope optional. Add a short body only when why is not obvious from the diff. No attribution or co-author trailers.
  6. Report. One line: the commit subject, the short SHA, and any files you deliberately left out and why. Do not push unless asked.

Guardrails

  • Commit to the current branch, whatever it is. Never switch, create, or suggest a branch, not even when the current branch is main/master. No git checkout, git switch, git branch.
  • One session's work, one commit. Do not amend, rebase, or touch existing history.
  • If the changes are genuinely two unrelated things, make two commits, still your files only.
  • Never git stash, git checkout --, or git reset: a parallel session's uncommitted work is unrecoverable if you discard it.
  • Need a pre-change baseline of a file? Copy it aside and git show HEAD:<path> > <path>, run what you need, then restore the copy. A scoped stash plus immediate pop is still a stash.

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.