prepush-ci

Run the full CI check in the pre-push hook of an AI agent's cloud session (or any machine that opts in), and let pull request CI skip commits that provably went through it. The default branch always runs CI in full.
The full check can run on any machine that opts in, for example on the VM of a Claude Code cloud session, which has no separate VM charge; pull request CI then does not repeat it on billed runners.
The pull request does not look as if nothing ran: it shows what the session checked, as a comment the session posts and updates after each push (the hook that does it is proposed by step 9 of the setup skill, "Show the result after every push"), or, with a GitHub App (prepush-ci app setup), as a check run. Step 7 shows the comment.
How it works (in one paragraph)
When PREPUSH_CI=full is set, a commit-msg hook writes the trailer Prepush-CI: full into each commit. The pre-push hook refuses to push a tip commit that carries the trailer unless the full check passes on it. A small gate in pull request CI reads the trailer of the head commit and skips the remaining jobs. The default branch ignores the trailer and runs CI in full. See issue #1 for the full design.
Usage
1. Let an agent set it up
The quickest way is to hand the job to a coding agent such as Claude Code, with the skill this package ships. Give it this prompt:
Run uvx prepush-ci skill and follow what it prints to set this repository up with prepush-ci.
In Claude Code you can add the skill as a plugin instead: /plugin marketplace add CapeOfGoodCode/prepush-ci, then /plugin install prepush-ci@prepush-ci.
To keep the skill with a project, run prepush-ci skill --write; it writes the skill to .claude/skills/prepush-ci-setup/SKILL.md of the repository, where the agent finds it by itself.
The agent needs a git repository with a remote it can push branches to, and a package index it can reach to install prepush-ci. It works on a branch and opens a pull request with the result; it does not push to the default branch.
The agent always stops to ask you two things: to confirm the command that runs the full check, and what pre-push should do on your own machines. It asks more only where the repository leaves something open: which hook manager to use when there are two, the default branch when origin is missing, cannot be reached, has no default branch, or the clone does not fetch it (a single-branch clone of another branch), and a yes before it removes a hook.
The steps below are the manual core. On top of them the skill finds or writes the command that runs the full check, sets up the services and the preflight so that a missing service fails the check, extends the SessionStart script with dependencies and services, and proves the setup with doctor.
2. Install
uv tool install prepush-ci
# or: pipx install prepush-ci
uvx prepush-ci runs it without installing. It needs Python 3.11 or newer and git, and nothing else.
3. Set a repository up with init
cd your-repo
prepush-ci init