quality-gate

Enforces unit tests and performance checks for backend and frontend code changes.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/jpmoya/claude-agents --skill quality-gate-jpmoya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: quality-gate
Source: https://github.com/jpmoya/claude-agents/tree/main/skills/quality-gate
Command: npx skills add https://github.com/jpmoya/claude-agents --skill quality-gate-jpmoya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Features and bug fixes often ship without adequate test coverage or performance validation, leading to regressions, security holes, and slow pages discovered only in production. This Skill enforces a mandatory quality gate so every behavioral change ships with unit tests and performance checks. ## Core Features & Use Cases - Backend Testing Standards: Defines what to test per layer (API endpoints, auth, data access, validation, rate limiting, security boundaries) with mocking rules and test structure templates. - Frontend Testing Standards: Covers rendering, interactions, form validation, auth gating, XSS prevention, and accessibility for vanilla JS or framework-based UIs. - Performance Gates: Provides concrete checks for API response time (<100ms), payload size, KV operation counts, HTML file size, DOM complexity, and script initialization time. - Use Case: When adding a new API endpoint, the Skill requires happy-path, validation, auth, and edge-case tests plus a response-time check before the feature can be declared complete. ## Quick Start Apply the quality gate to my new feature and make sure all required unit tests and performance checks pass before marking it done.

Frequently Asked Questions about quality-gate

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

FAQPage Schema
How do I enforce unit tests for every new feature or bug fix?

Use a quality gate checklist requiring unit tests written test-first, all tests passing, edge cases covered, and performance checks completed before declaring work done. Any skipped item must be explicitly reported rather than silently omitted.

What should I test when writing backend API endpoint tests?

Test every HTTP method, status code, and response shape, plus auth validation, data integrity, input validation, rate limiting, security boundaries, and error paths. Mock infrastructure like KV or databases, but never mock business logic.

How do I test frontend performance like page size and DOM complexity?

Write tests asserting HTML pages stay under 100KB, inline scripts under 15KB, DOM element count under 500, nesting under 10 levels, and initialization under 50ms. Use fs statSync for file sizes and jsdom for DOM checks.

Does this work with test runners other than Vitest?

Vitest is the default recommendation for projects without a runner, since it is ESM-native and handles both backend and frontend. For projects with existing runners like Jest, Mocha, or Playwright, use what is already installed.

When can a test or performance check be skipped?

Only when genuinely impossible or inappropriate, such as one-time migration scripts or dev-only tools. The skip must be stated explicitly and approved by the user; silent omission is not allowed.