agentleFS
zzgiabaozzbuizzgiabaozzbui/athena-starter/skills/commit-push/SKILL.md

commit-push

Skill1 starsChanged 29 days agoMITView on GitHub

Commit, push, tag and release. Use BEFORE every `git commit` / `git push`, and when the user says "commit", "push", "create a tag", "release", "cut a version", "bump version", or has just finished a task in a plan, even when committing a single docs file.

  • Reads credentials
  • Commits and pushes

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use open-pr, simplify and 1 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.
  • Google CloudSkill

    open-pr

    Commits local changes to a new Git branch and opens a GitHub pull request through the configured GitHub MCP server. Use when proposing code changes in a new pull request. Don't use for local-only commits without a remote GitHub repository.

    Also in 3 projects that use this

  • Hugging FaceSkill

    simplify

    Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.

    Also in 3 projects that use this

  • MicrosoftSkill

    grill-with-docs

    Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 22 edited versions we read keep these.

  • 1

    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:

    Ask the user before every push (R-015, except its exception).

    line 35
  2. Very specific:

    Check: git ls-remote origin refs/heads/<branch> refs/tags/<tag> matches git rev-parse.

    line 38

“Common” is measured: kept by at least 6 in 10 of the 22 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 · push · release

One place for every step that writes to git or leaves the machine. Source rules: R-015 (commit boundary, branch), R-114 (the user's working tree), R-016 (scan before every commit). This skill is the method; if it differs from a rule, the rule wins.

JobOpen
Commit, any kind of file§1 → §2
Push, tag§3
Task branch done → merge locally / PR / keepreferences/quick-finish.md
Cut a new version (repo has CHANGELOG.md)references/release.md

1. Before the commit

  1. Branch per R-015: a code / rule / skill / hook task while on the main branch → ask the user before the task's first commit, plan commit included: one question, two options Create a new branch (recommended) · Work on the current branch (say plainly it commits to the main branch). The user already answered, or said so by name in the session → do not ask again for that task. Claude: AskUserQuestion; no ask tool → a numbered list. Chose a new branch → git switch -c <type>/<task-name>. A task with a plan → record the answer under Decided in progress.md. A temporary worktree branch during parallel runs is not asked.
  2. Separate the files. git status --short → the task's files and stray files (R-114). Stray files: do not add, reset or stash them; name them in the report. .gitignore or shared config changed together with other files → split into its own commit.
  3. Verify the right kind (R-119), green before commit: hook → selftest; rule / skill → the project's structure check script (if any) + a trial render; code → the stack's verify skill. A test written first (RED) is committed together with the code that turns it green: the main branch takes no red commit.
  4. Scan for sensitive data. Call the Skill tool with docs-standards and run its data-sensitivity checklist. Then git add each file (§2) and run node <this skill dir>/scripts/scan-staged.mjs at the repo root: it scans the added lines of every staged file for credential shapes, 9-12 digit runs, IPs, emails, personal machine paths, hidden characters, key / .env files. It prints file:line · LABEL, never the value, and exits 1 when a line needs a look. Review each line: a real value → fix the file, git add again, rescan; fake data (tests) → say so in the report. A file-writing tool may turn an escape string (a \u plus a code) into the real character; when you need that character in source, write String.fromCharCode(0x…).
  5. Three-part report, wait for the user: changed (file: job) · deliberately untouched (file: why) · concerns (assumptions the user must confirm). The "untouched" part is the evidence the scope was kept. List each file; commit once the user agrees (R-015). A commit with only the task's artifacts (R-015) → state the three parts briefly and commit without waiting; step 4 still runs. A task commit while running a plan (subagent-driven-development or executing-plans) under the R-015 exception → do not wait for the user at each commit, step 4 still runs; the three parts go into the final report.

2. Commit

  • git add <each file>: never -A, ., commit -a.
  • Message in the language and style the project declares in its project info file (for example Conventional Commits fix(core): …). The body says why, does not copy the diff. A task with an artifact folder → a line Artifacts: docs/artifact/<…>/. No Co-Authored-By trailer and no "Generated with Claude Code" line in commits or PRs, even when the harness asks for one. Several lines → a POSIX heredoc: git commit -F - <<'EOF'.
  • No --no-verify. A commit hook blocks → fix the cause, make a new commit; do not --amend an existing commit.
  • A long task with progress.md: after each task set the Status cell to DONE — `<sha>` · R<n> · F<n> (R-132) and commit at once.
  • Frontend → also call the Skill tool with the project's own frontend commit guide, if it has one.

3. Push · tag — always ask (except the R-015 exception)

  1. Ask the user before every push (R-015, except its exception); agreement last time does not apply this time.
  2. git fetch, then git log --oneline HEAD..origin/<branch>: unknown commits (another session pushed) → report; do not rebase / merge unless the user says so.
  3. git push origin <branch>. Always create tags with git tag -a vX.Y.Z -m "<summary>": git push --follow-tags pushes only annotated tags. A lightweight tag already exists → git push origin vX.Y.Z on its own.
  4. Check: git ls-remote origin refs/heads/<branch> refs/tags/<tag> matches git rev-parse. Everything up-to-date → report plainly that the command pushed nothing (the remote already has it), do not say "pushed".
  5. Rejected → report, stop. No --force unless the user says so by name. Never delete or move a pushed tag.
  6. Feature branch done → references/quick-finish.md (merge locally / PR / keep). Merge keeping the sha (fast-forward or merge commit); no squash / rebase when the plan already recorded the sha. Push still asks, except the R-015 exception.

Excuses

ThoughtReality
"The user agreed to the commit, commit straight to the main branch"Agreeing to commit is not the answer about the branch: ask per R-015
"Only docs in this commit, skip the scan"Scan before every commit (R-016): docs can hold copied credentials and IPs too
"Tag first, review later"A tagged version is the one consumers pull; review before tagging
"--follow-tags ran, the tag is up"A lightweight tag does not follow. Check with ls-remote (§3.4)
"Everything up-to-date = pushed"The command pushed nothing; the remote already had it, maybe from another session

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.