Commit and push
Skill1 starsChanged 8 days agoMITView on GitHub
Review the working tree, stage only the intended files, write a Conventional Commit in English, commit, and push when the project policy allows. Use when the user asks to commit, commit and push, or ship the changes currently in the working tree.
- Commits and pushes
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- Add skillSkill
- GitHub PagesSkill
- Logo designSkill
- Project setupSkill
- READMESkill
- Release cutSkill
- Release summarySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
4
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
- Distinctive: line 8
Use this skill only when the user asks to commit, commit and push, or ship the current changes.
- Very specific: line 13
Read AGENTS.md and .harness.json when present.
- Distinctive: line 34
Read the full diff before staging anything.
- Distinctive: line 36
If the working tree contains unrelated changes, do not include them.
- Very specific: line 41
Run every command declared in AGENTS.md or .harness.json.
- Distinctive: line 51
Never use git add -A, git add .
- Distinctive: line 53
Never stage local planning files, secrets, environment files, build output or generated artifacts.
- Distinctive: line 59
Follow Conventional Commits, in English, short and imperative:
- Distinctive: line 68
Keep the subject under 72 characters, lowercase, without a trailing period.
- Distinctive: line 69
Use the body only when the change needs context (why, trade-offs, references).
- Very specific: line 71
Never add AI authorship or co-author trailers: no Co-Authored-By, no "Generated by ...", no tool, agent or session attribution.
- Distinctive: line 73
Never mention the agent, the prompt or the session.
- Distinctive: line 83
If a hook fails, read the output, fix the cause and commit again.
- Distinctive: line 88
Only when the project policy and the user allow it:
- Very specific: line 94
If the branch has no upstream, use git push -u origin <branch>.
- Distinctive: line 112
Never commit generated artifacts that the repository ignores.
- Distinctive: line 113
Never commit or push when the user only asked to review changes.
≈ “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.
Files
Commit and push
Use this skill only when the user asks to commit, commit and push, or ship the current changes.
1. Read the project policy
Read AGENTS.md and .harness.json when present. They define:
- the check commands;
- the commit autonomy:
commit-and-push-when-asked,commit-only-when-askedorstrict; - the local-only files that must never be staged.
With strict, confirm each git write action separately. With
commit-only-when-asked, never push unless the user asks for it in a separate
instruction.
2. Inspect the repository
git status --short
git branch --show-current
git diff
git diff --cached
git log --oneline -5Read the full diff before staging anything. Use the recent log to match the repository's commit style. If the user named specific files, stage only those. If the working tree contains unrelated changes, do not include them; ask which changes belong to the commit.
3. Run the checks
Run every command declared in AGENTS.md or .harness.json. A failing check
blocks the commit: fix the problem first. Do not skip hooks with --no-verify
unless the user explicitly asks.
4. Stage explicit paths
git add path/to/file path/to/other- Never use
git add -A,git add .orgit commit -aunless every reviewed change belongs to the same commit. - Never stage local planning files, secrets, environment files, build output or generated artifacts.
- Review the staged diff with
git diff --cached.
5. Write the message
Follow Conventional Commits, in English, short and imperative:
<type>(<optional scope>): <short description>Allowed types: feat, fix, refactor, chore, docs, test, perf,
build, ci, style.
- Keep the subject under 72 characters, lowercase, without a trailing period.
- Use the body only when the change needs context (why, trade-offs, references); wrap it at 72 columns.
- Never add AI authorship or co-author trailers: no
Co-Authored-By, no "Generated by ...", no tool, agent or session attribution. - Never mention the agent, the prompt or the session.
- Split unrelated work into separate commits when the user asks for a clean history.
6. Commit
git commit -m "type: short description"If a hook fails, read the output, fix the cause and commit again. Do not amend, rebase or squash existing commits unless the user explicitly asks.
7. Push
Only when the project policy and the user allow it:
git pushIf the branch has no upstream, use git push -u origin <branch>. Never
force-push unless the user explicitly requests it on a branch they own. If the
push is rejected as non-fast-forward, stop and report instead of rewriting
history.
8. Verify and report
git status --short
git log -1 --onelineReport the branch, the commit hash and subject, and confirm whether the working tree is clean. Say what was intentionally left uncommitted and why.
Boundaries
- This skill never creates tags or releases. Releases use
release-cut. - Never commit generated artifacts that the repository ignores.
- Never commit or push when the user only asked to review changes.
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
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.

