agentleFS
p10ns11yp10ns11y/skills/tidy-commit-push/SKILL.md

tidy-commit-push

Skill2 starsChanged 40 days agoMITView on GitHub

Inspect git status, remove junk/legacy/secrets from the commit set, craft a conventional commit message, and commit locally; push only with explicit user approval. Use before shipping a logical unit of work. Triggers: tidy commit, conventional commit, pre-push hygiene, commit and push.

  • Reads credentials
  • Commits and pushes

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    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:

    Remove legacy paths only if intentional delete is part of the change

    line 56
  2. Distinctive:

    Privacy: no tokens/keys; if staged → git restore --staged and scrub

    line 57
  3. Very specific:

    Prefer git add <paths> over blind git add .

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

tidy-commit-push

Load rule: Formal SoT. Compose with agent-orchestrator report and split-to-prs for multi-PR ships.
CLT: ../rules/clt-dual-load.mdc — push HITL = exact preview (extraneous ↓) + real approval (germane).

// Axioms
A1  Never commit .env, credentials, private keys, large binaries by accident
A2  One logical change per commit (or explicit multi-commit plan)
A3  Push = HITL  — only with user approval on shared remotes / protected branches
A4  Prefer HEREDOC commit messages; match repo history style (git log -5)
A5  Never --force to main/master unless explicit disaster recovery + approval
A6  Evaluate(δ) ≔ (C, E, η)

Use / skip

UseSkip
ready to record a coherent unitWIP still broken with no message yet
pre-PR hygieneuser said do not commit
after agent wavesecrets present and unredacted

Procedure

1 Inspect → 2 Tidy stage → 3 Message → 4 Commit → 5 Push? (HITL) → 6 PR? (HITL)

1. Inspect

git status
git diff
git diff --staged
git log -5 --oneline
git branch -vv

2. Tidy staging set

  • Unstage junk: *.log, node_modules, build outs, editor swap
  • Remove legacy paths only if intentional delete is part of the change
  • Privacy: no tokens/keys; if staged → git restore --staged and scrub
  • Prefer git add <paths> over blind git add . when mixed worktrees

3. Message

Conventional if repo uses it: type(scope): summary
Types: feat fix chore docs refactor test perf

4. Commit (local default)

git commit -m "$(cat <<'EOF'
type(scope): short summary

Optional body — why, not how.
EOF
)"

5. Push — only if user requested

git push -u origin HEAD
# never --force to main/master unless explicit disaster recovery + approval

6. PR — only if requested: gh pr create …


Done when

  • git status clean or only intentional leftovers listed
  • Commit exists with accurate message
  • Push/PR only per user request

Anti-patterns

¬Do
commit + push secretsscrub; rotate if leaked
"WIP" on main without askfeature branch
amend published commitnew commit
force-push shared branchrecover with user plan
silent agent pushwait for HITL

Related: agent-orchestrator · split-to-prs · git-worktrees

Done_when cmds: git status -sb · git log -1 --oneline · (optional) git push only after confirm.

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.