push-pr

Test, commit, push, and open a draft pull request with CI status reporting.

5|1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/ai-hero/hero-skills --skill push-pr-ai-hero
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: push-pr
Source: https://github.com/ai-hero/hero-skills/tree/main/skills/push-pr
Command: npx skills add https://github.com/ai-hero/hero-skills --skill push-pr-ai-hero

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Shipping code involves a repetitive chain of steps: running lint and tests, smoke-testing running services, writing a conventional commit, branching off the default branch, pushing, and opening a pull request. This Skill automates that entire pre-review pipeline so work reaches a draft PR with verification already done. ## Core Features & Use Cases - Verification and smoke testing: Runs lint, typecheck, unit tests, and pre-commit on changed files, then auto-detects project type (backend API, frontend, CLI, MCP server) and smoke-tests running services, including Playwright-driven browser checks of affected frontend routes. - Smart commit and branch management: Never commits to the default branch; pulls it fresh, proposes a conventional branch name from the diff, and creates a smart conventional commit. - Draft PR creation with CI report: Pushes to the remote and opens a draft PR by default (or a ready PR with ready, or merges into a target branch), then prints a CI status summary. - Use Case: After finishing a feature touching both a FastAPI backend and a Next.js frontend, run the skill to lint and test changed files, curl the API health endpoint, drive the changed pages in a browser checking for console errors, commit, push, and open a draft PR in one pass. ## Quick Start Ask the AI to run the push-pr skill to test, commit, push the current work, and open a draft pull request.

Frequently Asked Questions about push-pr

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

FAQPage Schema
How do I test, commit, and open a draft PR in one step?

Run the push-pr skill with no arguments. It runs lint, typecheck, unit tests, and smoke tests on changed files, creates a conventional commit, branches off the default branch if needed, pushes, and opens a draft pull request with a CI status summary.

How do I run only the test phase without committing?

Pass the test keyword as the first argument, optionally followed by modifiers like verify, smoke, backend, frontend, cli, or mcp to narrow the run. A test-only run stops before any commit or push and can run on any branch.

Does the frontend smoke test work with Next.js and Vite projects?

Yes. The skill auto-detects Next.js and Vite projects, starts or reuses the dev server, derives up to five routes from the diff, and drives each with Playwright MCP while filtering known framework console noise. Any console error or 4xx/5xx response fails the run.

What happens if I run this on the default branch?

The skill never commits or pushes directly to the default branch. It pulls the default branch fresh, proposes a feature branch name derived from the diff using the configured branch policy, and waits for your confirmation before checking it out.

Why did the smoke test fail on a page that looks fine?

A route fails if its document request returns 4xx/5xx, a non-allowlisted console error appears, an uncaught exception shows in the dev server log, or the page never becomes interactive. The skill stops at the first failing route and reports the route, console message, and screenshot path.

Can I merge into a target branch instead of opening a PR?

Yes. Pass a target branch name as the first argument and the skill will test, commit if dirty, push, and merge into that branch without creating a PR. Branch names matching the reserved keywords test, commit, ready, or recalibrate cannot be targeted this way.