run-quality-gate

Execute quality gate validation with configurable blocking behavior. Use when running type-check, build, tests, lint, or custom validation commands in orchestrators or workers to enforce quality standards.

⭐27stars🔀8forks📁View on GitHub🕐Updated Dec 30, 2025⬇️2downloads

When & Why to Use This Skill

The run-quality-gate skill is a specialized validation tool designed to enforce software quality standards within automated workflows and agentic environments. It enables the execution of critical development checks—such as type-checking, building, testing, and linting—with configurable blocking behavior. By providing structured error reporting and intelligent action mapping (continue, stop, or warn), this skill ensures that only code meeting predefined criteria proceeds through the pipeline, significantly enhancing code reliability and streamlining the CI/CD process.

Use Cases

  • Automated CI/CD Pipelines: Use as a mandatory quality gate to automatically block deployments or merges if build or test phases fail.
  • Agentic Self-Validation: Enable AI coding agents to run type-checks and linting on their own generated code, using the structured error feedback to self-correct before submission.
  • Pre-deployment Health Checks: Execute custom validation commands in worker environments to ensure system readiness and compliance before moving to the next orchestration phase.
  • Non-blocking Quality Monitoring: Run linting or experimental tests in a 'warn-only' mode to track code debt without interrupting the development velocity.
namerun-quality-gate
descriptionExecute quality gate validation with configurable blocking behavior. Use when running type-check, build, tests, lint, or custom validation commands in orchestrators or workers to enforce quality standards.
allowed-toolsBash, Read

Run Quality Gate

Execute validation commands as quality gates with structured error reporting.

When to Use

  • Type-check, build, test, lint validation
  • Orchestrator phase validation
  • Worker self-validation

Input

{
  "gate": "type-check|build|tests|lint|custom",
  "blocking": true,
  "custom_command": "pnpm custom-validate"
}

Gate Commands

Gate Command
type-check pnpm type-check
build pnpm build
tests pnpm test
lint pnpm lint
custom custom_command value

Process

  1. Map gate to command - Validate custom_command if gate="custom"
  2. Execute via Bash - Timeout: 5 minutes, capture stdout/stderr
  3. Parse result - Exit code 0 = passed, non-zero = failed
  4. Extract errors - Lines with "error", "failed", TS#### codes
  5. Determine action:
    • Passed → action="continue"
    • Failed + blocking → action="stop"
    • Failed + non-blocking → action="warn"

Output

{
  "gate": "type-check",
  "passed": true,
  "blocking": true,
  "action": "continue",
  "errors": [],
  "exit_code": 0,
  "duration_ms": 2345,
  "command": "pnpm type-check",
  "timestamp": "2025-10-18T14:30:00Z"
}

Examples

Blocking gate passes:

{ "gate": "type-check", "blocking": true }
→ { "passed": true, "action": "continue", "errors": [] }

Blocking gate fails (stops workflow):

{ "gate": "build", "blocking": true }
→ { "passed": false, "action": "stop", "errors": ["Module not found: missing-module"] }

Non-blocking gate fails (warns only):

{ "gate": "lint", "blocking": false }
→ { "passed": false, "action": "warn", "errors": ["Missing semicolon"] }

Error Handling

  • Timeout (5 min): Return failed with timeout error
  • Missing custom_command: Return error
  • Command not found: Return failed with exit_code=127

Notes

  • Exit code 0 always = success regardless of output
  • Blocking flag only affects action, not passed status
  • Error extraction is best-effort