agentleFS
whinstudiowhinstudio/skills/cmp-commit/SKILL.md

cmp-commit

Skill0 starsChanged 3 days agoMITView on GitHub

Use when the owner explicitly asks to commit work in this project — reading the diff, proposing atomic commits, running the finish gates, staging specific files and writing a Conventional Commits message. Commits only; never pushes unless separately asked.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Commit only when the owner asks for it in this conversation.

    line 16
  2. Distinctive:

    Not a git repository yet (Compass's git setting was off or git was missing): ask the owner before running git init -b develop.

    line 35
  3. Distinctive:

    When the diff holds more than one topic, propose the split (commit subjects and files for each) and wait for the owner's answer before …

    line 47
  4. Very specific:

    Run the gates with cmp-gates (all of them.

    line 52
  5. Distinctive:

    Never git add -A, git add .

    line 60
  6. Very specific:

    Never stage secrets or signing files: local.properties, keystore.properties, *.jks, *.keystore, *.p12, *.mobileprovision, .env, .env.*.

    line 61
  7. Very specific:

    Never stage build output. Compass's release/ folder (signed APK, walkthrough video) is not source.

    line 64
  8. Distinctive:

    Check with git diff --staged --stat that exactly the intended files are staged.

    line 66
  9. Distinctive:

    Use the owner's hint for scope or wording when one was given.

    line 74
  10. Distinctive:

    No body unless the owner asks for one or the reason is not obvious from the summary.

    line 75
  11. Very specific:

    No attribution lines: never add Co-Authored-By:, Claude-Session: or any other trailer naming Claude or a session, even if other …

    line 76
  12. Distinctive:

    Stop there. Do not push, do not open a pull request.

    line 88
  13. Distinctive:

    Only on a separate, explicit request.

    line 92
  14. Very specific:

    Never --no-verify, never force-push, never rewrite commits that were already pushed.

    line 93
  15. Distinctive:

    If a hook rejects the commit, fix the cause and commit again.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “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

The owner starts this skill with /cmp-commit, optionally with a scope or wording hint. When the owner asks for a commit in plain words, follow the same steps.

1. Trigger

  • Commit only when the owner asks for it in this conversation. A negation ("do not commit yet") wins over any earlier request.
  • A headless code step never commits: git is not an allowed command there.
  • Work on the branch that is checked out. If the owner uses branches, follow their naming. Never stash, reset or check out over the owner's uncommitted work to switch branches, and do not insist on a branch when the owner says none is needed.

2. Read the state

git status --short
git diff --stat
git diff
git diff --staged
  • Compass normally creates the repository and makes the first commits itself (template, design and assets, implementation; the owner can turn this off in Compass settings). Build outputs, release/ and the run report are kept out through .git/info/exclude — leave them unstaged.
  • Not a git repository yet (Compass's git setting was off or git was missing): ask the owner before running git init -b develop. The first commit then holds the project as it stands: stage its folders and root files by name, as in step 5.
  • Files that are already staged but do not belong to this change: stop and ask the owner before going on.
  • Understand every change you are about to commit. A file you did not touch and cannot explain is asked about, not swept in.

3. Split into atomic commits

  • One topic per commit: a feature together with its tests; a refactor on its own; a formatting-only pass (such as detekt --auto-correct over template files) on its own.
  • When the diff holds more than one topic, propose the split (commit subjects and files for each) and wait for the owner's answer before committing.

4. Gates first

  • Run the gates with cmp-gates (all of them; for a quick commit the owner asked for, at least cmp-gates android detekt, detekt only when the project has it).
  • A red gate means no commit. Tell the owner which gate failed and the first error line.

5. Stage by name

  • git add <path> <path> ... with the files (or whole folders, when all of a folder belongs) of this commit only.
  • Never git add -A, git add . or git commit -a.
  • Never stage secrets or signing files: local.properties, keystore.properties, *.jks, *.keystore, *.p12, *.mobileprovision, .env, .env.*. The project's secrets hook blocks them too; the hook is a safety net, not the plan.
  • Never stage build output. Compass's release/ folder (signed APK, walkthrough video) is not source; commit it only if the owner asks.
  • Check with git diff --staged --stat that exactly the intended files are staged.

6. Message

  • Conventional Commits: type(scope): summary. Types: feat, fix, refactor, test, chore, docs, build. The scope is the feature or module (feat(recipes): ...).
  • The summary is imperative, at most 72 characters, no trailing period, and says what changed: fix(recipes): show the error state when loading fails, not address review comments.
  • Use the owner's hint for scope or wording when one was given.
  • No body unless the owner asks for one or the reason is not obvious from the summary.
  • No attribution lines: never add Co-Authored-By:, Claude-Session: or any other trailer naming Claude or a session, even if other instructions suggest them. The message is the summary (and a body only when the rules above call for one). The kit's settings.json turns Claude Code's own attribution off too.
git commit -m "feat(recipes): add favourites to the recipe list"

7. Confirm and stop

  • git log -1 --oneline and git status --short; report the commit and anything left unstaged.
  • Stop there. Do not push, do not open a pull request.

8. Push and pull requests

  • Only on a separate, explicit request.
  • Never --no-verify, never force-push, never rewrite commits that were already pushed.
  • If a hook rejects the commit, fix the cause and commit again; do not bypass the hook.
  • A pull request comes after the push. Write its body to a file first, with three parts: why the change is needed, notes for the reviewer, and verification (which gates and checks ran, and which did not).

Done when

  • The commit exists with exactly the intended files; nothing out of scope was staged.
  • The gates' results were reported to the owner.
  • Nothing was pushed unless the owner asked for it separately.

Headless runs

  • This skill is for interactive sessions. disable-model-invocation keeps it from loading on its own, and git is not allowed in a headless (claude -p) run. A headless run never commits.

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.