Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Testing patterns for unit, integration, and end-to-end tests. Use when writing tests, setting up test fixtures, or validating RLS enforcement. Routes to existing test conventions.
.claude/skills/bybren-llc-testing-patterns/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -43% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -52% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -42% | 0% |
Guide consistent and effective testing. Routes to existing test patterns and provides evidence templates.
typescript// Direct Prisma calls bypass RLS const user = await prisma.user.findUnique({ where: { user_id } }); // Shared test state causes flaky tests let sharedUser: User; beforeAll(() => { sharedUser = createUser(); });
typescript// Use RLS context helpers const user = await withSystemContext(prisma, "test", async (client) => { return client.user.findUnique({ where: { user_id } }); }); // Isolated test state beforeEach(() => { const testUser = createTestUser(); }); // Unique identifiers const userId = `user-${crypto.randomUUID()}`;
bashyarn test:unit # Unit tests yarn test:integration # Integration tests yarn test:e2e # E2E tests (Playwright) yarn ci:validate # Full validation
__tests__/
├── unit/ # Fast, isolated tests
├── integration/ # API and database tests
├── e2e/ # End-to-end tests
└── setup.ts # Global setupmarkdown**Test Execution Evidence** **Test Suite**: [unit/integration/e2e] **Files Changed**: [list files] **Test Results:** - Total Tests: [X] - Passed: [X] - Failed: [0] **Commands Run:**
yarn test:unit --coverage
jest.config.jslib/rls-context.ts| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 18,293 | 8,928 | -51% | 1 | 1 | 0% | 3,087 | 2,098 | -32% | 0 | 0 | — |
case-02 | pass→pass | 9,261 | 2,424 | -74% | 1 | 1 | 0% | 1,585 | 829 | -48% | 0 | 0 | — |
case-03 | fail→pass | 8,066 | 4,150 | -49% | 1 | 1 | 0% | 1,384 | 1,114 | -20% | 0 | 0 | — |
case-04 | fail→pass | 14,766 | 4,517 | -69% | 1 | 1 | 0% | 2,060 | 1,180 | -43% | 0 | 0 | — |
case-05 | pass→pass | 11,581 | 5,257 | -55% | 1 | 1 | 0% | 1,636 | 1,282 | -22% | 0 | 0 | — |
case-06 | pass→pass | 13,924 | 4,458 | -68% | 1 | 1 | 0% | 2,119 | 1,123 | -47% | 0 | 0 | — |
case-07 | pass→pass | 5,136 | 2,037 | -60% | 1 | 1 | 0% | 836 | 762 | -9% | 0 | 0 | — |
case-08 | fail→pass | 10,247 | 3,037 | -70% | 1 | 1 | 0% | 1,632 | 778 | -52% | 0 | 0 | — |
case-09 | pass→pass | 3,882 | 2,186 | -44% | 1 | 1 | 0% | 583 | 775 | +33% | 0 | 0 | — |
case-10 | fail→pass | 7,694 | 1,731 | -78% | 1 | 1 | 0% | 1,171 | 682 | -42% | 0 | 0 | — |
case-11 | fail→pass | 16,490 | 6,331 | -62% | 1 | 1 | 0% | 2,735 | 1,460 | -47% | 0 | 0 | — |
case-12 | fail→pass | 10,614 | 1,779 | -83% | 1 | 1 | 0% | 1,616 | 697 | -57% | 0 | 0 | — |
case-13 | fail→pass | 13,493 | 2,398 | -82% | 1 | 1 | 0% | 1,927 | 755 | -61% | 0 | 0 | — |
case-14 | fail→pass | 15,003 | 2,743 | -82% | 1 | 1 | 0% | 2,374 | 803 | -66% | 0 | 0 | — |
case-15 | fail→pass | 6,971 | 2,070 | -70% | 1 | 1 | 0% | 1,126 | 721 | -36% | 0 | 0 | — |
case-16 | pass→pass | 3,573 | 1,568 | -56% | 1 | 1 | 0% | 522 | 594 | +14% | 0 | 0 | — |
case-17 | fail→pass | 9,464 | 1,746 | -82% | 1 | 1 | 0% | 1,363 | 687 | -50% | 0 | 0 | — |
case-18 | pass→pass | 15,919 | 4,397 | -72% | 1 | 1 | 0% | 2,170 | 1,178 | -46% | 0 | 0 | — |
case-19 | pass→pass | 11,957 | 4,978 | -58% | 1 | 1 | 0% | 1,727 | 1,247 | -28% | 0 | 0 | — |
case-20 | pass→pass | 10,793 | 6,714 | -38% | 1 | 1 | 0% | 1,843 | 1,599 | -13% | 0 | 0 | — |
case-21 | pass→pass | 8,369 | 5,757 | -31% | 1 | 1 | 0% | 1,346 | 1,366 | +1% | 0 | 0 | — |
case-22 | pass→pass | 9,498 | 6,038 | -36% | 1 | 1 | 0% | 1,578 | 1,514 | -4% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +50 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.