Agent skill

testing-rules

Ultra Builder Pro testing discipline rules

Stars 5
Forks 3

Install this agent skill to your Project

npx add-skill https://github.com/rocky2431/ultra-builder-pro/tree/main/skills/testing-rules

SKILL.md

Testing Rules

These rules are mandatory for all test-related work.

TDD Workflow

RED → GREEN → REFACTOR (all new code).

Test Strategy

Layer Test Type Mock Strategy
Functional Core Unit Test No mocks needed (pure input→output)
Imperative Shell Integration Testcontainers (real DB/services)
External APIs Test Double With // Test Double rationale: [reason]

Forbidden Patterns

These patterns are never acceptable:

Pattern Why Forbidden Alternative
jest.fn() for Repository/Service/Domain Invalid test — doesn't prove production works Testcontainers
class InMemoryRepository Diverges from real DB behavior Real DB container
class MockXxx / class FakeXxx Hides integration issues Direct instantiation or Testcontainers
jest.mock('../services/X') Skips real collaboration Test real collaboration
it.skip('...database...') "Too slow" is not valid Testcontainers are fast enough

Coverage Requirements

  • 80% overall minimum
  • 100% Functional Core (pure logic must be fully tested)
  • Critical paths for Imperative Shell

Dev/Prod Parity

Tests must use real dependencies:

  • Real database via Testcontainers (not in-memory substitutes)
  • Config via environment variables
  • Mock tests passing ≠ production working

Detection Checklist

When analyzing test files, flag:

  1. Any jest.fn() usage on Repository, Service, or Domain classes
  2. Any InMemory* or Mock* or Fake* class definitions
  3. Any jest.mock() calls on internal modules
  4. Any skipped tests with database/slow excuses
  5. Missing error case coverage
  6. Missing edge case coverage

Expand your agent's capabilities with these related and highly-rated skills.

rocky2431/ultra-builder-pro

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

5 3
Explore
rocky2431/ultra-builder-pro

recall

Search and manage cross-session memory. Query past sessions by keyword, semantic similarity, or hybrid search. Save summaries and tags for future recall.

5 3
Explore
rocky2431/ultra-builder-pro

code-review-expert

Structured code review checklists: SOLID, security, performance, boundary conditions, removal planning. Injected into code-reviewer agent.

5 3
Explore
rocky2431/ultra-builder-pro

use-railway

Operate Railway infrastructure: create projects, provision services and databases, deploy code, configure environments and variables, manage domains, troubleshoot failures, check status and metrics, and query Railway docs. Use this skill whenever the user mentions Railway, deployments, services, environments, build failures, or infrastructure operations, even if they don't say "Railway" explicitly.

5 3
Explore
rocky2431/ultra-builder-pro

security-rules

Ultra Builder Pro security rules

5 3
Explore
rocky2431/ultra-builder-pro

ai-collab-base

Shared collaboration protocol, modes, and prompt templates for AI collab skills. Consumed by gemini-collab, codex-collab, and ultra-verify as a shared foundation.

5 3
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results