majesticlabs-dev/majestic-marketplace

quality-gate

Run quality gate checks on code changes with tech stack-aware reviewers

Quelltext ansehen

Verwendung

  1. Installationsbefehl kopieren und das Quellpaket vor der Installation in der eigenen Agentenumgebung prüfen.
  2. Benötigte Werkzeuge, Zugangsdaten und Hosts im Original prüfen.
  3. Eingabe und gewünschtes Ergebnis beschreiben und die Ausgabe mit den Quellen abgleichen.
npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill quality-gate

Vor dem Start

  • Die Installation umfasst weder Modellabo noch API-Kontingent oder Dateizugriffsrechte.
  • Sterne und Installationen zeigen Aktivität, keine unabhängige Qualitäts- oder Sicherheitsprüfung.
Originales Skill-Dokument

Aus dem Quell-Repository gerendert; Überschriften, Beispiele, Code, Tabellen, Links und Bilder bleiben erhalten.

Quality Gate

Run comprehensive code review through the quality gate agent, which orchestrates multiple specialized reviewers based on your project's tech stack.

Config

TECH_STACK = config_read("tech_stack", "generic")
APP_STATUS = config_read("app_status", "development")
LESSONS_PATH = config_read("lessons_path", ".agents/lessons/")
bash
DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')

Arguments

<inputarguments> $ARGUMENTS </inputarguments>

Scope modes:

  • #123 or GitHub URL → PR changes
  • (no args) → unstaged changes (working directory)
  • --staged → staged changes only
  • --branch → current branch vs default branch
  • path/to/file ... → specific files

Step 1: Determine Scope

Parse arguments to determine what code to review:

bash
# Default (unstaged changes)
git diff --name-only --diff-filter=d

# Staged mode
git diff --cached --name-only --diff-filter=d

# Branch mode (use default_branch from Context)
git diff <default_branch>...HEAD --name-only --diff-filter=d

# PR mode
gh pr diff <PR_NUMBER> --name-only

If no changes found, report:

## Quality Gate: APPROVED

**Reason:** No changes to review.

Step 2: Determine Context Description

Create a context description based on scope:

ScopeContext Description
PR #123PR #123: <PR title from gh pr view>
--branchBranch: <current branch name>
--stagedStaged changes
(no args)Working directory changes
files...Files: <file list>

Step 3: Invoke Quality Gate Agent

Launch the quality-gate agent with the determined context:

Task: majestic-engineer:workflow:quality-gate

Prompt: |
  Context: <context description from Step 2>
  Branch: <branch name or --staged>

  Changed files:
  <file list>

Step 4: Present Results

The quality-gate agent returns a structured verdict. Present the full report to the user.

Verdict outcomes:

  • APPROVED - Ready to ship
  • NEEDS CHANGES - Fix required issues before shipping
  • BLOCKED - Critical issues require immediate attention

Examples

bash
# Review unstaged changes
Skill("quality-gate")

# Review staged changes
Skill("quality-gate") --staged

# Review current branch vs main
Skill("quality-gate") --branch

# Review a PR
Skill("quality-gate") #123

# Review specific files
Skill("quality-gate") app/models/user.rb app/controllers/users_controller.rb

Configuration

Configure reviewers in .agents.yml:

yaml
quality_gate:
  reviewers:
    - security-review
    - pragmatic-rails-reviewer
    - performance-reviewer

See CLAUDE.md for available reviewers and configuration options.

Verwandte Aufgaben

aus demselben Repository

Weitere Skills

Alle Skills