github-pre-push-gates

Validates Git branches with immutable verification, privacy scanning, and independent review before pushing.

115|9|Updated Aug 5, 2026
One-click install
npx skills add https://github.com/AtlasOmnia/donna-starter --skill github-pre-push-gates-atlasomnia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-pre-push-gates
Source: https://github.com/AtlasOmnia/donna-starter/tree/main/skills/github/github-pre-push-gates
Command: npx skills add https://github.com/AtlasOmnia/donna-starter --skill github-pre-push-gates-atlasomnia

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Pushing code to a shared or public remote without checks risks leaking credentials, private paths, internal persona names, or broken trees, and divergent local history can expose private work. This Skill enforces a sequence of pre-push quality gates so only verified, clean commits reach the remote. ## Core Features & Use Cases - Immutable Verification Gate: Runs tests, type checks, builds, and audits, then asserts the working tree and commit SHA are unchanged so side-effect writes cannot invalidate a pass. - Privacy and Secrets Scanning: Scans the committed tree, added diff lines, and reachable Git history for API keys, private keys, local paths, internal identifiers, and artifact directories. - Independent Closeout Review: Dispatches a read-only reviewer agent against an exact SHA, requiring actionable HOLD verdicts with file:line evidence before any push. - Clean Publication from Divergent History: Squashes long private local history into a single public commit, handles shallow-clone publication via commit-tree, and verifies pushed SHAs against ls-remote and the GitHub API. - Use Case: Before publishing a feature branch to a new public repository, run the gates to catch a leftover private profile name in history, squash dozens of internal commits into one clean commit, and confirm CI passes on the exact pushed SHA. ## Quick Start Ask the agent to run the pre-push quality gates on the current branch and verify it is safe to push to the shared remote.

Frequently Asked Questions about github-pre-push-gates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan a Git branch for secrets before pushing?

Run a committed-tree credential scan with git grep against patterns for AWS keys, GitHub tokens, and private key headers, then scan only added diff lines with git diff origin/main..HEAD. Also inspect reachable history with git rev-list --all since a clean current tree does not erase secrets from prior commits.

How do I publish a clean single commit from divergent local Git history?

Preserve the private history with an archive branch, reset to origin/main, then merge --squash the archive to stage one clean commit. Remove private artifacts from staging, re-run tests and privacy scans, and push only after verifying the commit count is exactly one.

Why does git status pass but my test run still invalidate the commit?

Test suites and build tools can regenerate lockfiles or write artifacts during execution, changing the tree after the pass. The immutable gate compares git status and the HEAD SHA before and after the suite to detect these side-effect writes.

Can I push a shallow clone to a new empty GitHub repository?

A shallow clone often fails because its boundary commit references a missing parent object. Build a self-contained two-commit graph with git commit-tree using the boundary tree as a new root, then push with --no-thin after re-running verification gates.

How do I tell a CI infrastructure failure from a real product failure?

Inspect each job's steps: failures in seconds with zero executed steps indicate billing, outage, or infrastructure issues rather than code problems. The included ci-retry-monitor.py script polls a run, auto-reruns zero-step failures, and exits nonzero only when a job with real steps fails.