PR Quality Gate for Openclaw

An automated PR quality gate workflow that systematically performs code reviews, registers GitHub issues, and triggers AI-powered bug fixes before merging.

zlszhonglongshen
v1.0.0
Jun 3, 2026
0
552
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install pr-quality-gate

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install pr-quality-gate using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is PR Quality Gate?

The pr-quality-gate skill orchestrates a comprehensive, closed-loop quality assurance pipeline directly within your development cycle. Acting as an automated gateway before merging branch updates, it coordinates sequential execution of core code reviews, automated tracking of uncovered problems, and instant AI patches.

As an essential integration in the library of Openclaw Skills, this workflow helps development teams eliminate manual review bottlenecks, prevent security vulnerabilities like hardcoded API keys from leaking into production, and maintain high standards of readability and unit testing across all commits.

PR Quality Gate Use Cases

  • Enforcing rigorous pre-merge guidelines for collaborative Git repositories.
  • Detecting and auto-remediating critical issues (e.g., hardcoded secrets or logical errors) prior to release.
  • Generating granular quality metrics (performance, security, logic, readability, test coverage) for project maintainers.
  • Linking automated review feedback directly with newly raised GitHub issues for efficient team tracking.

How PR Quality Gate Works

  1. Triggering: A user requests a Pull Request review via conversational commands (e.g., "review this PR" or "check pull request #123").
  2. Code Review: The skill reads the PR diff and evaluates code health across five dimensions (Logic, Security, Performance, Readability, Test Coverage).
  3. Issue Creation: For each detected bug or recommendation, it automatically creates linked GitHub issues referencing the specific code files.
  4. AI Resolution: High-severity problems automatically trigger localized coding agents (such as kimi-cli or giga-coding-agent) to propose instant, executable fixes.
  5. Decision Support: Generates a unified PR Quality Gate Report, warning developers of blockers and checking final conditions before merge approval.

PR Quality Gate Setup

To get started with the PR Quality Gate workflow, ensure you have configured your environment with the correct credentials.

# 1. Install and log in to the GitHub CLI
brew install gh
gh auth login

# 2. Configure your AI Coding Agent token
export KIMI_API_KEY="your_kimi_api_key_here"

# 3. Add the skill to your development agent
openclaw skill add pr-quality-gate

PR Quality Gate Data Schema & Taxonomy

The skill evaluates pull requests systematically and structures its assessment according to the following framework:

Quality Dimensions

Dimension Assessment Scope Critical Checks
Logical Correctness Operational integrity Edge cases, exception handling, core algorithm correctness
Security Vulnerability prevention Injection risks, auth mechanisms, credentials (hardcoded keys auto-flagged as High)
Performance Code execution efficiency N+1 database queries, resource leaks, redundant nested loops
Readability Maintainability standards Coding styles, documentation completeness, modular functions
Test Coverage Verification health Unit tests, mock frameworks, integration assertions

Quality Gate Report Format

Each run generates a markdown report detailing:

  • PR Metadata: Repository path, pull request ID, and branch title.
  • Quality Scores: 1-to-5 star evaluation for each of the five metrics.
  • Problem Register: Table containing Severity (High, Medium, Low), line-level Location, Problem Description, and Status.
  • Issue Tracking: Direct links to created GitHub Issues for traceablity.
  • Gate Advice: Clear indications of whether to merge or block depending on unresolved High-severity issues.

PR Quality Gate Advanced Features

  • Auto-Blocking Guardrails: Automatically flags security issues (like hardcoded keys) as High severity and advises blocking the PR until resolved.
  • Multi-Agent Orchestration: Seamlessly coordinates specialized sub-agents including code-review tools, GitHub issues wrappers, and local AI CLI fix engines.
  • No-Auto-Merge Policy: Protects stable branches by ensuring final merges via gh pr merge always require user confirmation.
  • Contextual Remediations: Directs the AI coding agent to write ready-to-commit code patches target-tailored to the specific code lines identified in the review stage.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*