brainstorming-and-plan…
Use before ANY creative work — creating features, building components, adding functionality, modifying behavior, or starting a new project. Also use when…
Use when you need to autonomously iterate through test-fix cycles without human intervention. Use when someone says 'make it work', 'run tests and fix', 'iterate until green', 'take yourself out of the loop', 'fix until tests pass', or when the agent is going in circles on the
$ npx -y skills add burhankhatri/e2e-testing --skill test-automation-loop --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/test-automation-loopContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when you need to autonomously iterate through test-fix cycles without human intervention. Use when someone says 'make it work', 'run tests and fix', 'iterate until green', 'take yourself out of the loop', 'fix until tests pass', or when the agent is going in circles on the
name: test-loop description: "Use when you need to autonomously iterate through test-fix cycles without human intervention. Use when someone says 'make it work', 'run tests and fix', 'iterate until green', 'take yourself out of the loop', 'fix until tests pass', or when the agent is going in circles on the same problem. Also use when setting up a new integration, adding a new agent, or doing any work where automated tests can drive the development instead of manual prompting."
> The core insight: if the agent is going in circles, it needs a test — not more prompts. Write the test. Let the agent iterate against it. Walk away.
Every project should have a `testing.md` at the root (or in relevant submodule folders) containing EVERYTHING the agent needs to run tests autonomously:
# Testing Guide ## Environment Setup - Required env vars: [list with descriptions] - Database: [commands to start/seed test DB] - Services: [docker-compose, external APIs] - Test user: [how to create/seed test data] ## Running Tests ### Unit Tests Command: `npm test` Location: `tests/unit/` ### Integration Tests Command: `npm run test:integration` Env vars needed: [list] What they test: [scope description] ### E2E Tests (Playwright) Command: `npx playwright test` Setup: `npx playwright install chromium` Base URL: [how it's configured] Auth: [how test auth works] Location: `tests/e2e/` ## Debugging Failed Tests - Single test: `npm test -- -t "test name"` - Headed browser: `npx playwright test --headed` - Traces: `npx playwright show-trace test-results/*/trace.zip` - Verbose: `npm test -- --verbose`
**Create this file FIRST** if it doesn't exist. The agent cannot iterate autonomously without it.
1. Read testing.md
2. Set up the test environment (DB, env vars, services)
3. Ensure screenshot capture is enabled:
- Verify playwright.config.ts has screenshot: 'on'
- Verify video: 'retain-on-failure' is set
- Verify trace: 'on-first-retry' is set
4. Run the relevant test suite
5. If tests fail:
a. Analyze failure output carefully (Phase 1 of /debug)
b. Check screenshot/trace artifacts in test-results/:
- Screenshots: what does the page look like at the failure point?
- Trace: open with `npx playwright show-trace` for DOM + network + console
- Diff images (*-diff.png): for visual regression failures, what changed?
c. Form hypothesis about root cause
d. Fix the CODE — never the test (using /tdd — failing test → fix → verify).
Editing a test to match broken behavior requires explicit user sign-off.
e. Run tests again
f. Repeat until ALL tests pass with ZERO skipped
6. If tests pass:
a. Run visual regression suite if project uses toHaveScreenshot():
npx playwright test --grep @visual --repeat-each=3
b. Run full suite MULTIPLE TIMES to catch flakiness
c. Use /verify-done before claiming success# E2E stability check npx playwright test --repeat-each=3 --reporter=line # Unit/integration stability for i in 1 2 3; do npm test; done
console.log('[DEBUG] State before action:', JSON.stringify(state));
console.log('[DEBUG] API response:', JSON.stringify(response));
console.log('[DEBUG] Element visible:', await element.isVisible());Run with logs → analyze output → THEN fix. Remove debug logs after.
When adding a new API, agent, service, or integration:
**This entire cycle can run without human intervention** if testing.md and the plan are well-specified.
When a bug is found (manually or reported):
1. Write a test that reproduces the EXACT bug behavior 2. Verify test FAILS (confirms it catches the bug) 3. Fix the code 4. Verify test PASSES 5. Run full suite for regressions 6. Run the specific test multiple times to confirm stability
This test permanently prevents the bug from returning.
When test output alone
A set of 8 global skills for Claude Code that enforce disciplined, test-driven agentic development. Install once, use in any project.
Repo: burhankhatri/e2e-testing
Use before ANY creative work — creating features, building components, adding functionality, modifying behavior, or starting a new project. Also use when…
Use when a major project step has been completed and needs review against the plan and coding standards. Also use when someone says 'review this', 'check my…
Battle-tested Playwright E2E testing patterns for Next.js/React apps. Use when writing, running, debugging, or fixing Playwright tests. Also triggers on 'e2e',…
Master orchestrator skill that kicks off the full development pipeline. Routes tasks through the correct skill chain (brainstorm, debug, tdd, e2e, verify)…
Use when encountering ANY bug, test failure, unexpected behavior, or error — before proposing fixes. Also use when someone says 'fix this', 'it's broken', 'not…
Enforces strict test-driven development. Use when implementing ANY feature, bugfix, or refactor — before writing implementation code. Also use when someone…