Pre push
Skill MrToAster13/mrtoaster13-plugins/plugins/autonomous-workflows/skills/pre-push
Clear instead of compact — two Claude Code skills: /handoff distills a session to disk, /resume reads it back into a fresh context.
npx -y skills add MrToAster13/mrtoaster13-plugins --skill pre-pushAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 29 days oldThe repository was created 29 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Pre-push orchestrator — detect Python/Node stack, then run simplify, review, security, test, commit as gated stages (retry flaky network, chmod +x scripts, stop on real failures). Use when ready to push to main, or on "pre-push", "clean up before pushing", "polish and commit", "finalize", "ship it".
SKILL.md
3.3 KB, 833 tokens by cl100k_base, as published. Nobody here has run it
Pre-Push
Everything you run before pushing to main, once you like the result. Each stage is a gate: it passes quietly, or trips on a genuine failure and stops for a fix. Never pushes — stops at the commit and hands back.
Setup
- Resolve the target repo root:
git rev-parse --show-toplevel. Fails → not a git repo, stop. Run every stage from this path. git -C <root> status --shortempty → nothing to ship, stop.- Polish-and-ship, not build. Don't change behavior or add features.
Detect the stack
- Node:
package.jsonexists. - Python: any of
pyproject.toml,setup.py,setup.cfg,requirements*.txt,Pipfile,tox.ini.
Both can be true — run both toolchains. Neither → skip stack commands, ask the user. Concrete commands per stack: stacks.md.
Gate: fixing what surfaces
A gate trips only on a genuine failure — a security defect, a failing test, a functional bug — never a style nit or theoretical note.
- Show the user the problem, location, and error/repro. Ask:
diagnosing-bugs, fix another way, or skip? Wait. - On go, invoke
diagnosing-bugswith the specifics. - Re-run the tripped stage, then re-run
test. Report pass/fail counts. - If it won't resolve in a reasonable pass, stop and hand back. Never commit over a blocker.
Style nits: fix directly or leave; don't pause for them.
Stages, in order
Run each from the repo root; let it finish before the next.
- simplify — invoke
simplify. - review — invoke
code-review(Standards + Spec; reports, doesn't fix). Functional bug → gate. - security —
cd <root>first, elsesecurity-reviewsilently narrows scope; then invoke it. Real issue → gate. - test — from
stacks.md: lint/format check, pre-commit hooks if configured, then the full suite. Report pass/fail. Genuine failure → gate. Retry flaky network: a run dying onETIMEDOUT/ECONNRESET/ENOTFOUND/EAI_AGAIN/getaddrinfo/Could not resolve host/Read timed out/Retrying/registry50[234]is infra, not a test failure — re-run up to 3×. Any other non-zero exit is genuine; take it to the gate, don't retry. 3 network failures → stop, tell the user, don't commit on unrun tests. - commit:
- chmod +x scripts. A push ships the whole tree, so any tracked
.sh-or-shebang file at mode100644breaks a Linux install.git ls-files, and for each script still100644:git update-index --chmod=+x <path>. Report which you flipped. - Scan for secrets in changed/staged files (SSH logs, credentials, tokens). Suspicious → stop.
- Invoke
commit, or inline: matchgit log --oneline -20convention; commit staged-only if anything's staged elsegit add -A; message states intent, not a file list;git commitwith native hooks — never--no-verify/--no-gpg-sign/amend.
- chmod +x scripts. A push ships the whole tree, so any tracked
Done
Summarize: stack, simplify changes, review findings, debug-loop fixes, scripts flipped, test counts (and retries), commit hash. State it's committed, ready to push, and not pushed.