By soilniba
Pre-push code safety review skill for Claude Code: systematic 7-dimension check before every git push
Pre-push code safety review plugin for Claude Code. Works with any language.
Automatically blocks git push (executed via Claude's Bash tool) until a systematic 4-dimension code review is completed.
| Dimension | What |
|---|---|
| 1. Exception path safety | Every external call's error paths — no unbound variables after exceptions |
| 2. I/O encoding boundary | No seek + decode landing mid-UTF-8 char; no truncated chunked reads |
| 3. External data type validation | json.loads / API responses / env vars validated before field access |
| 4. State / invariant completeness | All fields set on state transition; dispatchers fully registered |
PreToolUse hook intercepts every Bash tool callgit push, the hook parses the refspec to identify the local ref being pushed and resolves it to a commit SHA/tmp/pre-push-review-done. If absent or if its content does not equal the target ref's SHA → blocks push, prompts to run skillpush-guard:pre-push-review → skill guides the dimension-by-dimension scan, then writes the HEAD SHA into the marker via git rev-parse HEAD > /tmp/pre-push-review-doneEarlier versions used file-existence as the gate, which a bare touch /tmp/pre-push-review-done could bypass — including accidental cases where the marker-creation command was chained (touch ... && git push) in a single Bash call, producing no real review window. Tying the marker to the HEAD SHA closes that loop: the marker can only be produced from inside the working tree, after the commit being pushed exists, and is invalidated the moment HEAD moves.
git -C, not cd &&The hook is a token-level parser — it reads git -C <path> from the command and resolves the ref in that repo, but it can't follow shell builtins like cd (no reliable way to track cwd mutations across cd ... && git ...). When the Bash tool's cwd is repo A but you want to push repo B:
✅ git -C /path/to/repoB push origin main
❌ cd /path/to/repoB && git push origin main — hook resolves the ref in repo A's cwd, mismatches the marker SHA, blocks the push
claude plugin add soilniba/push-guard
You can also invoke the skill directly without waiting for a blocked push:
push-guard:pre-push-review
claude plugin remove push-guard
Executes bash commands
Hook triggers when Bash tool is used
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub soilniba/push-guard --plugin push-guardComplete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use
20 SEO/GEO skills and 5 commands on one shared contract for keyword research, content creation, technical audits, schema markup, monitoring, quality gates, entity truth, and campaign memory.
Comprehensive SEO analysis plugin for Claude Code. 25 sub-skills (21 core + 1 orchestrator + 1 framework + 2 extension mirrors) and 18 sub-agents cover technical SEO, content quality, schema, sitemaps, Core Web Vitals, local SEO, backlinks, AI/GEO, ecommerce, hreflang, SXO, clustering, drift monitoring, and Google APIs. Includes optional MCP extensions, SPA-aware rendering, portability, and hardened SSRF/DNS-rebinding safe fetchers.
Modern R development skills for Claude Code - tidyverse patterns, rlang metaprogramming, Bayesian inference, performance optimization, and more
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Unity Development Toolkit - Expert agents for scripting/refactoring/optimization, script templates, and Agent Skills for Unity C# development