pr-greenlight

Automates pre-flight CI checks, PR creation, and CI monitoring until all checks pass.

1.6k|73|Updated Mar 13, 2025
One-click install
npx skills add https://github.com/UniClipboard/UniClipboard --skill pr-greenlight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-greenlight
Source: https://github.com/UniClipboard/UniClipboard/tree/main/.agents/skills/pr-greenlight
Command: npx skills add https://github.com/UniClipboard/UniClipboard --skill pr-greenlight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates the repetitive manual cycle of running local checks, pushing code, watching CI fail, fixing issues, and repeating until a pull request turns green.

Core Features & Use Cases

  • Scoped Pre-flight Checks: Runs only the format, codegen, lint, build, and test checks relevant to the files actually changed on the branch.
  • Auto-fix Loop: Automatically fixes formatting, code generation drift (OpenAPI schema, IPC bindings, API client), and lint issues, then commits them separately.
  • CI Monitoring with Fix Rounds: Creates the PR via GitHub CLI, watches checks, diagnoses failures, processes bot review comments, and pushes fixes for up to 4 rounds.
  • Use Case: After finishing a feature branch in a Rust + Tauri + TypeScript repo, invoke the skill to run preflight, open the PR, and let it iterate on CI failures until everything passes.

Quick Start

Ask the agent to run pr-greenlight on the current feature branch to preflight, push, create the PR, and keep fixing CI until it is green.

Frequently Asked Questions about pr-greenlight

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

FAQPage Schema
How do I automate pre-flight checks before creating a GitHub PR?

Run the skill's preflight mode to execute only the checks relevant to changed files, including cargo fmt, prettier, OpenAPI and IPC binding regeneration, ESLint on changed files, cargo check, and frontend builds. Auto-fixable issues are corrected and committed in a dedicated chore commit.

How to automatically fix CI failures on a pull request?

The monitoring loop fetches failed check logs with gh run view, classifies the failure type, applies a targeted fix, validates it locally with the same check, then commits and pushes. It repeats for up to 4 rounds before stopping with a warning.

Does it handle CodeRabbit and bot review comments?

Yes, it queries all three GitHub comment endpoints for coderabbitai, github-actions, and codecov, filters out already-processed comment IDs, and only acts on correctness, security, or performance issues while skipping style nits.

Can I run only local checks without pushing or creating a PR?

Yes, invoking the preflight subcommand runs only the analysis and local check phases, then stops and reports results without pushing, creating a PR, or monitoring CI.

What safety limits prevent runaway CI fix loops?

The loop is capped at 4 fix rounds and a 90-minute timeout, uses a lock file to prevent re-entrant runs, never force-pushes or amends commits, and reverts any fix that breaks compilation.