commit — setup #
SKILL.md in this directory is the whole skill: instructions, no scripts. It replaces the always-loaded "match the repository's commit style" rule in AGENTS.md with text Pi reads only when it is about to commit something, and it handles jj as well as git.
Requirements #
Only the version-control CLI the checkout already uses has to be on PATH:
command -v git jj # whichever your repositories use
Nothing to install, authenticate, or configure for the skill itself — it runs read-only inspection commands and one commit command. A machine with neither CLI simply never triggers it.
Use #
Ask for a commit in ordinary words — "let's commit this work" — and Pi loads the skill from its description. /skill:commit forces the load when it doesn't. Anything you say alongside the request outranks everything the skill contains, including which files belong in the commit.
Setting a repo's style #
The skill has no message format of its own. It reads, in order: the request, project guidance (AGENTS.md, CLAUDE.md, CONTRIBUTING*, git config --get commit.template, or a commit-msg hook under core.hooksPath), the last 50 subjects in history. With nothing to read — a fresh repository, or history whose changes carry no descriptions — it asks rather than guessing.
To pin the style, add this section to the AGENTS.md at the root of that repository — the same file Pi already loads as project instructions, so the skill reads it with no further setup:
## Commit format
Use `[type/name] Message`, the artifact path as the scope:
`[extensions/goal] Add a token budget to goal continuation`.
A colocated repository (.jj beside .git) is committed with jj describe, not git commit, because jj owns that history. To use git there anyway, say so in the request or put the stanza above in the project's AGENTS.md — both outrank detection.
Troubleshooting #
name "commit" collisionunder[Skill conflicts]in Pi's startup diagnostics — two skills claim the name and the first discovered wins; rename or remove one source.skill path does not exist— api.skillsentry points somewhere that isn't there. Relative paths resolve from the settings file that declares them./skill:commitis absent from the command list — skill commands needenableSkillCommandsin settings; typing it still works. Run/reloadafter editing a skill.(no email set)injj log— jj does not read git'suser.name/user.email; set it once withjj config set --user user.name "Spencer Gilbert"and the matchinguser.email, or jj warnsName and email not configuredon every describe.- Commit came out unsigned where its history is signed — the skill never passes
-S/--gpg-signor runsjj sign, so signing is whatever the configuration says:git config --get commit.gpgSign,jj config get signing.backend. Fix it there, or ask for the signature in the request. The same goes for a missingSigned-off-by(git'sformat.signOff, a DCO line rather than a signature) and forChange-Idand other trailers, which the skill adds only to repositories whose history already carries them. - Subject style ignored in a jj repository —
jj loghides abandoned and orphaned changes from its default revset, so the sample read may be thinner than the history. Check what is reachable withjj log -r 'all()' --no-pager -T 'description.first_line() ++ "\n"'.
Credits #
Inspired by mitsuhiko/agent-stuff skills/commit/SKILL.md (Apache-2.0) — keeps the read-the-repo-then-commit shape; drops the prescribed Conventional Commits format in favour of project instructions and observed history, handles jj as well as git, and leaves signing and trailers to repository configuration.