git-push-safe

Push the current Git branch after verifying hooks, tests, and CI status.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/olliecrow/codex --skill git-push-safe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-push-safe
Source: https://github.com/olliecrow/codex/tree/main/skills/git-push-safe
Command: npx skills add https://github.com/olliecrow/codex --skill git-push-safe

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents accidental pushes of incomplete or broken code by enforcing a series of verification checks before allowing a Git push.

Core Features & Use Cases

  • Pre-push Verification: Ensures pre-commit hooks, tests, and CI checks pass before pushing.
  • Remote Branch Safety: Only pushes if a remote repository is configured, preventing pushes on local-only repositories.
  • Use Case: Before sharing your latest feature branch, use this skill to automatically run all checks and ensure your code is ready for review and integration, avoiding broken builds or merge conflicts.

Quick Start

Use the git-push-safe skill to push the current branch after all verification gates have passed.

Frequently Asked Questions about git-push-safe

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

FAQPage Schema
How do I prevent pushing broken code to a remote Git repository?

To prevent pushing broken code, you can enforce pre-push verification checks that run pre-commit hooks, tests, and CI status gates before allowing a Git push. This ensures code integrity and avoids broken builds or merge conflicts on your remote branch.

Can I run tests and check CI status automatically before a Git push?

Yes, you can run tests and check CI status automatically before a Git push by using a safe push workflow that acts as a verification gate. It executes pre-commit hooks and CI checks, only proceeding with the branch push if all validations pass.

Does this safe Git push workflow prevent force pushes?

Yes, this safe Git push workflow explicitly prevents force pushes to ensure code integrity and adherence to repository policies. It avoids overwriting remote history and only allows standard pushes after all verification gates pass.

What happens if I try to push a local-only Git branch without a remote configured?

If you attempt to push a local-only Git branch without a remote repository configured, the safe push verification will block the action. It only pushes if a remote repository is actively configured, preventing accidental pushes on local-only repositories.

How do I verify pre-commit hooks pass before sharing a feature branch?

To verify pre-commit hooks pass before sharing a feature branch, use a safe push process that automatically runs all checks prior to execution. This ensures your code is ready for review and integration by validating hooks, tests, and CI status beforehand.