Setup quality gate

From redpanda-data/ui-harness · View interactive version

Setup quality gate is an AI agent skill from the GitHub repository redpanda-data/ui-harness. Add quality:gate package.json script for fast local/CI quality checks (biome + tsgo + related tests), GitHub Actions workflow, and Stop hook for type checking. Use when setting up quality gates, CI pipelines, or pre-push validation.

How to use this skill

Skill file

Setup Quality Gate

What This Sets Up

Steps

1. Package.json scripts

{
  "scripts": {
    "lint": "biome check .",
    "lint:fix": "biome check --write .",
    "type:check": "tsgo",
    "test": "vitest --run",
    "test:related": "vitest --run --related",
    "quality:gate": "biome check . && tsgo && vitest --run --related $(git diff --name-only HEAD)"
  }
}

2. Asset type declarations

Create src/types/assets.d.ts from REFERENCE.md -- tsgo need for .svg/.css/.png imports.

3. GitHub Actions

Write .github/workflows/quality-gate.yml from REFERENCE.md. Run on PR + push to main.

4. Hook scripts

Copy into .claude/hooks/, chmod +x:

5. Verify

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.