From pre-push-review
Comprehensive pre-push review that FIXES issues before pushing — covering code smells, architectural patterns, security, scalability, and performance. MUST run BEFORE any `git push`, for EVERY project on EVERY branch. Reviews the diff to be pushed, fixes the findings, re-verifies, and only then pushes clean code. Trigger on "проверь перед пушем", "запусти проверку перед пушем", "review before push", "pre-push review", the PRE-PUSH POLICY gate message, or proactively whenever about to run `git push` / the user asks to push.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pre-push-review:pre-push-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A gated review run against the commits about to be pushed. It does not just
A gated review run against the commits about to be pushed. It does not just report — it fixes the findings so the pushed code is free of code smells and of security / scalability / performance problems.
git rev-parse --show-toplevel 2>/dev/null || { echo "not a git repo"; exit 0; }
The gate applies to EVERY project on EVERY branch. Only skip when there is nothing to review (not a git repo, or an empty push diff in Step 2).
Review exactly what will be pushed:
git diff @{upstream}..HEAD # if an upstream exists
git diff origin/main...HEAD 2>/dev/null || git diff main...HEAD # new branch fallback
git diff --name-only <same range> # scope to changed files
If the diff is empty, report "нечего проверять" and allow the push.
Go through every changed hunk and find real issues (with file:line):
Promise.allSettled rejection / external-call error that exits without a
log, metric, or caller-visible signal. A "nothing happened" path that an
operator can't see in logs and a user can't see in the UI is a bug, even
when the types compile. Prefer: log at the right level (warn/error for
unexpected, debug for benign), and surface terminal failures to the caller
instead of leaving them hanging.For large diffs, fan the five dimensions out as parallel subagents (one lens
each), then merge and dedup. For small diffs, do it inline. You may corroborate
with /code-review and /security-review, but this skill owns all five
dimensions and the fixing.
For every confirmed finding, apply the fix in the working tree:
After fixing, re-verify: re-read the changed hunks (and re-run the relevant dimension checks / build / tests / linters if the project has them) to confirm the issue is actually resolved and nothing regressed. Loop fix → re-verify until no blocking findings remain.
Then fold the fixes into the push: either git commit --amend (if fixing your
last commit is appropriate) or add a new commit (e.g. fix: address pre-push review findings). The push must contain the cleaned code, not a follow-up.
Show a short summary: what was found, what was fixed, and anything escalated.
When clean and the user is ready to push, record the one-shot approval marker for the current HEAD (the gate consumes it to let this exact commit through), then push:
echo "$(git rev-parse HEAD)" > "$(git rev-parse --git-dir)/PREPUSH_REVIEW_OK"
git push # the pre-push-gate hook sees the marker and allows it once
If you committed fixes in Step 4, HEAD changed — write the marker AFTER the final commit so its sha matches.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Forks private projects, strips secrets/internal references, verifies cleanliness, and packages them with CLAUDE.md, README, and setup.sh for safe public release.
npx claudepluginhub kulykivska/claude-plugins --plugin pre-push-review