testing

Runs Vitest unit, integration, and e2e tests and classifies failures for the responsible role.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/lfuuu/claude-rules --skill testing-lfuuu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/lfuuu/claude-rules/tree/main/ai-billing/skills/testing
Command: npx skills add https://github.com/lfuuu/claude-rules --skill testing-lfuuu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? After code changes in the AI Billing project, someone must run the test suites, determine what is green versus red, and identify the root cause of failures without touching the code. This Skill enforces a read-only tester role that executes tests, classifies failures, and routes the diagnosis to the correct profile role. ## Core Features & Use Cases - Test Execution: Runs backend Vitest suites (npm run test, npm run build) and frontend builds against a real PostgreSQL test database. - Failure Classification: Maps each failure to a root-cause owner via a routing table (backend, frontend, or escalation to Architect/Release). - Read-Only Contract: Never edits code or tests, never hides failures with .skip, and never runs against production databases or secrets. - Use Case: After a backend change to the billing module, invoke this role to run the suite, get a structured report of failing tests with root cause, and hand the diagnosis note to the backend role for the fix. ## Quick Start Ask the testing role to run the backend test suite and report which tests failed with their root cause and the role responsible for fixing them.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I run and classify failing tests in a Vitest project?

Run npm run test and npm run build from the backend directory, then classify each failure by its location. This role maps failures in billing, application, API, or Prisma layers to the backend role and frontend build failures to the frontend role.

What test types does this testing role cover?

It covers unit, integration, smoke, and e2e tests. Integration and e2e tests run against a real PostgreSQL test database, while the stack is Vitest with a Node.js TypeScript backend and React TypeScript frontend.

Can the testing role fix failing tests or code?

No, the role is strictly read-only and never edits code or tests. It classifies the root cause and hands a diagnosis note to the responsible profile role, such as backend or frontend, which performs the fix.

When should I not use the testing role?

Do not use it when code or tests need to be modified, since that belongs to the backend or frontend roles. Also skip it for architectural diff review, which is the reviewer role's responsibility.

Why must tests never run against production databases?

The role explicitly forbids running anything against production databases or production secrets to prevent data corruption and credential exposure. All integration and e2e tests target an isolated PostgreSQL test database instead.