green-gate

Run formatting, compilation, tests, clippy, codegen drift, and baseline checks in order.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/aphrody-code/n2b --skill green-gate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: green-gate
Source: https://github.com/aphrody-code/n2b/tree/main/skills/green-gate
Command: npx skills add https://github.com/aphrody-code/n2b --skill green-gate

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cargo, bun, bash, and includes scripts (resource) components.

What problem does it solve?

This Skill prevents broken n2b releases by running the full anti-regression verification pipeline before merging or deploying, catching formatting drift, compilation/test failures, lint regressions, schema/codegen mismatch, and baseline divergence.

Core Features & Use Cases

  • Run the full verification pipeline in order: executes fmt, build, test, clippy (warnings as errors), codegen drift check, then baseline comparison.
  • Stops at first failure: provides clear stage-level green/red status and aborts immediately to reduce debugging time.
  • Guards external contract integrity: validates the frozen external contract using the codegen drift check and the baseline diff tracked for downstream consumers.

Quick Start

Run the green-gate pipeline to ensure the repository is safe to push or deploy: bash skills/green-gate/run.sh

Frequently Asked Questions about green-gate

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

FAQPage Schema
How do I run Rust formatting, clippy linting, and codegen schema drift checks in one pipeline?

Run end-to-end Rust verification in a single pipeline by executing ordered stage commands for formatting, compilation, tests, strict clippy, codegen drift checks, and baseline snapshots. It stops at the first stage failure and exits with code 0 only when all stages pass.

What is codegen schema drift detection and when do I need it for CI?

Codegen schema drift detection validates that your frozen external contract matches generated code. You need it in CI before deploying to prevent broken downstream releases caused by schema or baseline divergence.

Do I need cargo and bash to run strict clippy warnings as errors?

Yes, you need cargo, bash, and bun installed. The verification pipeline relies on cargo for Rust compilation and strict clippy linting, while bash executes the ordered stage commands to enforce warnings as errors.

What's the best way to prevent broken Rust releases from baseline snapshot divergence?

The best way to prevent broken releases is running an anti-regression verification pipeline that compares baseline snapshots and validates codegen drift before merging, ensuring external contract stability and catching divergence early.

Why does my verification pipeline abort immediately on the first clippy failure?

The pipeline aborts immediately on the first clippy failure to reduce debugging time by providing clear stage-level green or red status. It stops execution at the first stage that does not match expectations rather than continuing.