src/orchestrator/skills/testing-workflow/SKILL.md
Generates test plans, writes unit/integration/E2E test files, identifies coverage gaps, flags common testing anti-patterns. Use when writing tests, creating test suites, planning test strategies, mocking dependencies, measuring code coverage, or test planning.
npx skillsauth add monkilabs/opencastle testing-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Rule | Detail |
|------|--------|
| One suite per session | Never run all suites in one conversation |
| Max 3 screenshots | Per session |
| evaluate_script() over take_snapshot() | Returns less data |
| Reload between flows | Clears state |
| Log results | Append to .opencastle/logs/e2e-results.md |
Suite files: see .opencastle/project.instructions.md.
| Category | What to cover | |----------|---------------| | Initial state | Page loads with defaults; components in expected state | | User interactions | Buttons, dropdowns, filters (URL params + refetch), form validation | | State transitions | Filter changes produce different results; loading states; backend sync | | Edge cases | Empty results, min/max boundaries, invalid input, network errors | | Integration | Data flow server→UI, URL params↔state, server vs client filtering | | Responsive (MANDATORY for UI) | All breakpoints per browser-testing skill / validation-gates Gate 3 |
| Layer | Minimum | |-------|---------| | Unit (functions, components, hooks) | 95% | | Integration (boundaries, URL sync) | All boundaries | | E2E (journeys, interactions, errors) | All critical paths |
| Anti-Pattern | Correct Approach | |---|---| | Testing only initial page load | Test filter changes, different results | | Assuming filters work because they render | Verify each option changes results | | Client-side only | Verify server requests are triggered | | Single scenario | Test urban, rural, edge, out-of-range | | Visual inspection only | Verify data values programmatically |
# Unit / integration
npx vitest run --coverage # all tests + coverage
npx vitest run src/utils.test.ts # single file
# E2E (Playwright)
npx playwright test # all E2E suites
npx playwright test --ui # interactive mode
// Unit test with mock
import { describe, it, expect, vi } from 'vitest';
import { fetchItems } from './api';
describe('fetchItems', () => {
it('returns filtered results', async () => {
vi.spyOn(global, 'fetch').mockResolvedValue(
new Response(JSON.stringify([{ id: 1, name: 'test' }]))
);
const items = await fetchItems({ category: 'active' });
expect(items).toHaveLength(1);
expect(fetch).toHaveBeenCalledWith(expect.stringContaining('category=active'));
});
});
// E2E test (Playwright)
import { test, expect } from '@playwright/test';
test('filter updates results and URL', async ({ page }) => {
await page.goto('/items');
await page.getByRole('combobox', { name: 'Category' }).selectOption('active');
await expect(page).toHaveURL(/category=active/);
await expect(page.getByRole('listitem')).not.toHaveCount(0);
});
| Resource | Purpose |
|----------|--------|
| browser-testing skill | Chrome DevTools automation for E2E |
| validation-gates Gate 3 | Responsive breakpoint checks |
| project.instructions.md | Suite files, project-specific test config |
development
Defines 10 sequential validation gates: secret scanning, lint/test/build checks, blast radius analysis, dependency auditing, browser testing, cache management, regression checks, smoke tests. Use when running pre-deploy validation or CI checks, CI/CD pipelines, deployment pipeline validation, pre-merge checks, continuous integration, or pull request validation.
development
Provides model routing rules, validates delegation prerequisites, supplies cost tracking templates, defines dead-letter queue formats for Team Lead orchestration. Load when assigning tasks to agents, choosing model tiers, starting delegation session, running multi-agent workflow, delegating work, choosing which model to use, or assigning tasks.
testing
Saves, restores session state including task progress, file changes, delegation history. Use when saving progress, resuming interrupted work, picking up where you left off, or checkpointing current work.
data-ai
Implements technical SEO: meta tags, JSON-LD structured data, sitemaps, crawlability fixes. Use when adding schema markup, JSON-LD, robots.txt updates, canonical URLs, Open Graph tags, or improving crawlability.