e2e
Skill2 starsChanged 7 days agoMITView on GitHub
Writes, runs, and debugs end-to-end tests for web and mobile apps with e2e, the agentic test runner, which mixes agent.act goals with exact locator assertions on a Playwright browser or an iOS or Android device. Also drives a project's running app live over the e2e MCP server to look at a screen, check a UI change, take a screenshot or record a video, and try a locator; and runs bug bashes, parallel e2e explore runs with each bug proven by a repro test. Use when a project depends on e2e or has an e2e.config.ts, when asked for end-to-end, browser, mobile, or agentic UI tests, to check a change in the running app, to QA or bug bash an app or branch, or when an e2e run fails.
- Reads credentials
53 other projects use a version of this, 7 of them edited.
Adopted by
Most recently taken up by
- DGouron/review-flowtheir own version, first seen Nov 29, 2026
- odahcam/hangartheir own version, first seen Nov 29, 2026
- bloknayrb/tandemtheir own version, first seen Nov 29, 2026
- kortix-ai/sunaedited, first seen Nov 28, 2026
- chatquill/claude-code-websitestheir own version, first seen Nov 22, 2026
- agustinsacco/phosphortheir own version, first seen Nov 22, 2026
Used with
Projects with it also use instinct-export, instinct-import and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
TheKREATORSSkillinstinct-export
Export instincts from project/global scope to a file
Also in 3 projects that use this
TheKREATORSSkillinstinct-import
Import instincts from file or URL into project/global scope
Also in 3 projects that use this
diego-tobalinaSkillbuild-fix
Fix build and compilation errors systematically. Run when build fails.
Also in 4 projects that use this
0mlkrizzz655335vSkillsdk
Codex SDK 集成开发。用 TypeScript/Python SDK 做 agent 生命周期、流式输出、本地/云端执行等集成。
Also in 3 projects that use this
MontimageSkilltest-coverage
Improve test coverage by finding untested branches, error paths, and edge cases. Use when measuring or strengthening a project's tests. Don't use for production debugging, code review, or feature implementation.
Also in 3 projects that use this
MicrosoftSkillworktree
Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch. Use from any PR-scoped workflow that needs an isolated checkout to keep current code and build output untouched.
Also in 5 projects that use this
- +1 more from TheKREATORS
Other versions53 projects use a version of this.
Word for word · 0
None found.
Edited · 7
- kortix-ai/CompanyOS★ 21k51% same
- kortix-ai/suna★ 21k51% same
- tester-army/e2e★ 14k13% same
- callstack/react-native-pager-view★ 3.4k54% same
- gronxb/hot-updater★ 1.9k55% same
- open-mercato/cezar★ 1.2k55% same
- robinbril/claude-code-harness★ 355% same
Wrote their own version · 46
- elie222/inbox-zero★ 13ksame name
- getsentry/sentry-javascript★ 8.8ksame name
- entireio/cli★ 5.4ksame name
- openmeterio/openmeter★ 2.5ksame name
- stackia/rtp2httpd★ 2.4ksame name
- alibaba/loongcollector★ 2.2ksame name
- lodev09/react-native-true-sheet★ 2.1ksame name
- kdlbs/kandev★ 1.2ksame name
- Gram-ax/gramax★ 631same name
- hardisgroupcom/sfdx-hardis★ 441same name
36 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- analyticsSkill
- api-designSkill
- commit-and-gitSkill
- conventionsSkill
- cursor-hook-authoringSkill
- data-migrationSkill
- dbSkill
- e2e-testingSkill
- e2etestSkill
- errorpageSkill
- githubSkill
- google-analyticsSkill
- honoSkill
- issue-branch-pr-flowSkill
- japaneseSkill
- japanese-writingSkill
- knowledge-elicitationSkill
- m4l-projectSkill
- refresh-skillsSkill
- skill-escalationSkill
- skill-selectionSkill
- turborepoSkill
- typescript-monorepoSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 1 is distinctive, and 18 are very specific to this project.
0
Common
Most of the 47 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
18
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Read the one reference that matches the request before doing anything else.
- Very specific: line 102
Look at what exists: e2e.config.ts, .mts, .js, or .mjs, the tests glob (default tests//*.e2e.ts), e2e in package.json.
- Very specific: line 108
Before open_session, create tests/<feature>.e2e.ts, opening on the screen it covers (step 3).
- Very specific: line 129
Start the test on the screen it covers, since every rerun pays for the steps before: in a browser a saved session instead of the sign-in …
- Very specific: line 135
Run only the test you are working on: npx e2e run tests/<feature>.e2e.ts:<line>, the line its test( opens on, with the flags in "Rerunning …
- Distinctive: line 141
When it fails, fix it from what the run recorded (next section).
- Very specific: line 149
Read the failure block in the terminal: the failing line with its code frame, the message (an assertion's expected and observed), where the …
- Very specific: line 183
Every run of a failing test waits out its failure, and every agent.act that runs live spends model calls.
- Very specific: line 187
Run by file:line, not the file or the suite.
- Very specific: line 190
Add --action-timeout 5000: a locator that matches nothing fails in 5 s instead of the default 30 s.
- Very specific: line 195
Keep the replay cache on. A failed run keeps the recording of every goal a later check or wait confirmed (the wait closing the arrange …
- Very specific: line 205
Don't rename the test, its describe, or its file, and don't reword a goal, change its params, or change the agent's context or the test's …
- Very specific: line 210
Add --retries 0 when retries are on (retries in the config, or on CI, where the default is 1).
- Very specific: line 227
Keep a session open across runs while you write or fix a web test.
- Very specific: line 230
Run the CLI as npx e2e ...
- Very specific: line 235
Import test, describe, the hooks, expect, credentials, and secrets from e2e.
- Very specific: line 279
When e2e itself gets in your way, offer to tell the e2e team: a command or API that broke (bug), docs or this skill that misled you (docs), …
- Very specific: line 289
Search existing issues first (gh issue list -R e2e-inc/e2e --search "<words>").
- Very specific: line 299
Run it with --dry-run first, show the user what would be sent, and send it only when they agree.
“Common” is measured: kept by at least 6 in 10 of the 47 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
e2e: agentic end-to-end tests
e2e runs UI tests that mix agent goals with exact steps. agent.act drives
one goal; agent.assert, agent.waitFor, and agent.extract judge the
screen; screen, app, browser, and expect act and check exactly. UI
targets use @e2e-dev/web for browsers, @e2e-dev/mobile for iOS
simulators, Android emulators, and connected phones, or @e2e-dev/desktop
(a prototype) for native apps on macOS.
Start here: pick the reference for the job
Read the one reference that matches the request before doing anything else.
Each stands on its own; a reference names another topic only for a side
trip. npx e2e guide <topic> prints the installed package's version of a
reference; prefer it when it differs from this copy.
The Rules and Feedback sections below still apply.
| When you are | Topic | Read |
Adding e2e to a project, writing e2e.config.ts, starting the app from the config, signing in to a model, setting up mobile targets | setup | references/setup.md |
Looking at the running app, checking a UI change, taking a screenshot or video, trying a locator, running a test line, or walking a flow while you write its test, over e2e mcp | mcp | references/mcp.md |
Writing or fixing a test: fixtures, locators, actions, matchers, sign-in sessions, the browser fixture, API-only tests | writing-tests | references/writing-tests.md |
Adding agent.* steps, picking a model, cutting cost, budgets, the replay cache | agent | references/agent.md |
Running tests: CLI flags, CI, reporters, trace pages, report.json for scripts, exit codes | running | references/running.md |
Handling a failed run: error codes and their fixes, --headed, --debug, --ai-trace | debugging | references/debugging.md |
Exploring an app toward a goal without a test file: e2e explore, its budgets and verdict | explore | references/explore.md |
| Asked to bug bash, QA, or hunt for bugs across an app or a branch | bug-bash | references/bug-bash.md |
For anything the references do not cover, the full documentation ships in
the docs/ directory of the installed e2e package
(node_modules/e2e/docs in a single-package project); a link such as
/reference/cli is docs/reference/cli.mdx. Complete projects for Vite,
Next.js, Astro, Angular, Expo, SwiftUI, Jetpack Compose, Kotlin Multiplatform,
Flutter, and .NET MAUI are in https://github.com/e2e-inc/e2e/tree/main/examples.
Quick start
A config with one web target and a model, and a test that drives one goal and pins the outcome:
// e2e.config.ts
import type { E2EConfig } from 'e2e';
import { web } from '@e2e-dev/web';
import { gateway } from 'ai';
export default {
targets: [
{
engine: web(),
app: {
url: 'http://127.0.0.1:3000',
command: { executable: 'pnpm', args: ['dev'], log: '.e2e/logs/app.log' },
},
},
],
// The model behind every agent.* step: an AI SDK instance; gateway() from 'ai' reads AI_GATEWAY_API_KEY or a Vercel OIDC token.
agents: {
default: {
model: gateway('openai/gpt-6-luna-fast'),
system: 'You are a thorough QA agent. Verify every outcome on screen.',
},
},
} satisfies E2EConfig;// tests/billing.e2e.ts
import { describe, test } from '@e2e-dev/web';
import { expect } from 'e2e';
describe('billing', () => {
test('a member upgrades to Pro', async ({ app, agent, screen, browser }) => {
await app.open('/settings/billing');
await agent.act('upgrade the workspace to the Pro plan');
await expect(screen.getByRole('status')).toContainText('Pro');
await expect(browser).toHaveURL('/settings/billing');
});
});Workflow: writing a test
- Look at what exists:
e2e.config.ts,.mts,.js, or.mjs, thetestsglob (defaulttests/**/*.e2e.ts),e2einpackage.json. Nothing there: followsetupwhen the user has requested e2e (see Rules). - With a connected
e2e mcpserver (topicmcp), write the test while you walk the flow, not from memory after the walk. A test written afterwards fails on each name or step you got wrong, one run at a time. Beforeopen_session, createtests/<feature>.e2e.ts, opening on the screen it covers (step 3). Then add each step to the file as you take it in the session. Anactgoal goes in before you walk its path, and the path's actions stay out of the test. Ascreenline is theTest line:its action printed, copied as is. When the outcome shows, run itsexpectwithrun_codeand add it once it passes; a passing line also joinstest_lines; checks go in the test's assert block at the end.run_coderuns JavaScript on the test API, so use it for most of a session's work, a loop or a read and a check in one call, over many single actions. The walk ends with the test written. Without a server, learn the accessible names the app renders from the components or a--headedrun. - Shape the file before the steps (topic
writing-tests, "Structure"): one top-leveldescribeper feature, and in it one test per behavior, titled with the outcome it verifies. Each test runs arrange, act, assert, in that order: reach the starting state, do the one thing under test, then everyexpectoragent.assertat the end. A second outcome worth checking is a second test, so a failing title says what broke. A step is anagent.actgoal orscreenlines. Drive the flow withagent.act, one atomic goal per call; three goals make three calls. Start the test on the screen it covers, since every rerun pays for the steps before: in a browser a saved session instead of the sign-in form andapp.openon that screen's path, on a devicedevice.openLink, and data from the app's API (topicwriting-tests). Exact values go throughscreen: a sign-in form in a setup test, a field that must receive one specific string, a count that must be one number. - Run only the test you are working on:
npx e2e run tests/<feature>.e2e.ts:<line>, the line itstest(opens on, with the flags in "Rerunning a test while you fix it" below. Agent steps need a model in the config and that provider's authentication (a saved subscription login, an API key); a local endpoint may need none. Tests without agent steps need no model. - When it fails, fix it from what the run recorded (next section).
Workflow: fixing a failed test
The run already saw every screen up to the failure. Fix from what it recorded; never walk the flow again from the start over MCP just to see a screen.
- Read the failure block in the terminal: the failing line with its code
frame, the message (an assertion's
expectedandobserved), where the screen was (❯ at: a URL on the web, the app and screen title on a device), and the nodes nearest a failed locator (❯ on screen). Then read the trace page it names (❯ trace .e2e/results/<test>/trace.md): every step with what it did, what the app logged, the agent's turns, and## Screen at failure, the screen one node per line (topicdebugging). - Fix every line that evidence covers, not only the one that failed: the
screen at failure shows the names the rest of that screen's lines need.
Fix the locator, the expectation, or the app. Never add a sleep or a
fixed delay (
setTimeout,waitForTimeout): wait for the state you need withagent.waitFor('<that state>')instead (topicagent; it needs a model). - A test stops at its first failed step (an
expect.softlets it go on), and every wrong line after it costs another run. Before rerunning, check the lines after it as far as you can: against the screen at failure, the app source, or a live session. - For a screen the evidence and the source leave out, look live (topic
mcp).open_session {test: "tests/<feature>.e2e.ts"}(with:<line>of itstest(call when the file holds several) runs the test and stops on the live screen where it failed. Act out the lines after it there and put theTest line:each action prints in place of a wrong one, so the next rerun catches every mistake. Otherwise open or reuse a session, go straight to that screen, thenobserveandlocate, orrun_codefor the fixed line and the ones after it. On the web,navigateto the path of the❯ atURL or the screen's route, and tap only to reach a state no URL opens. A device session starts on the app's launch screen: take the shortest path from there. - Rerun only that test, the way the next section says, or in a new
session with
open_session {test}(topicmcpsays when a session must close first). Repeat with the next failure.
Rerunning a test while you fix it
Every run of a failing test waits out its failure, and every agent.act
that runs live spends model calls. Keep each rerun to the one test and the
lines you changed:
- Run by
file:line, not the file or the suite. After an edit above the test, look itstest(line up again: a stale line runs another test, or fails withNO_TESTSlisting the lines tests start at. - Add
--action-timeout 5000: a locator that matches nothing fails in 5 s instead of the default 30 s. It also bounds each action inside an agent step, so keep it longer than the slowest screen takes to load. Ascreencall's own{ timeout }still wins. Anexpectalready gives up after 5 s by default (assertionTimeout). - Keep the replay cache on. A failed run keeps the recording of every goal
a later check or wait confirmed (the wait closing the arrange block, topic
writing-tests), and the next run replays those with no model call. New, changed, and failed goals run live, and so does a replay the trace page shows as handed off.agent.assert,agent.waitFor, andagent.extractalways call the model. Leave--no-cacheoff: it sends every goal to the model again. Only aread-writecache records: the local default, but not on CI unless the config names that mode, nor in strict mode. A stopped run (Ctrl-C, a command your tool's timeout kills,--max-duration) saves nothing, so give the command a timeout longer than the test. - Don't rename the test, its
describe, or its file, and don't reword a goal, change its params, or change the agent'scontextor the test'sagentContextonce a goal passes. Each is part of a recording's key, so every goal it touches records again live. Fixing a locator or an expectation keeps the recordings. - Add
--retries 0when retries are on (retriesin the config, or on CI, where the default is 1); aretriesoption on the test or itsdescribewins over the flag. Outside strict mode (--strict-cache,cache.strict), a retry never replays: it runs every goal live and waits out the failure again. - Once the test passes, drop
--action-timeoutand run it one time with--no-cache: every goal runs live at the config's timeouts, which shows the agent still reaches it without its recordings.
Rules
- In a project without e2e, set it up when the user requests it. Otherwise ask before adding a test framework, and name any existing framework.
- Live MCP tools need an
e2e mcpserver in the client: the e2e plugin's (Codex and Cursor), or one registered in the project (topicmcp). In a directory with no e2e config, a live look still works:open_session {engine: "@e2e-dev/web", app: {url: "http://localhost:3000"}}opens a session on the engine's defaults. Tests need a config and run with the CLI. Keep a session open across runs while you write or fix a web test; topicmcpsays when a run can go beside it, and what to do onAPP_ALREADY_RUNNING. - Run the CLI as
npx e2e ...(orpnpm exec e2e ...). - The config is
export default { ... } satisfies E2EConfigwithimport type { E2EConfig } from 'e2e'.targetsis required; a UI target names an engine and declares the app beside it:{ engine: web(), app: { url, command } }. A tools-only target can omit the engine and setplatform. - Import
test,describe, the hooks,expect,credentials, andsecretsfrome2e. A test that uses thebrowserfixture importstest,describe, and the hooks from@e2e-dev/web: the same runtime functions, typed withbrowser. - Config and tests are ES modules whatever
package.jsonsets astype. - Locators resolve when used. Actions wait for readiness and
expectretries assertions. Reads such astextContent()wait for one match until the action timeout, then answer the current value;count()andisVisible()answer from the current screen. Nothing waits for a value to change, so use a matcher when a value has to settle. - A locator that matches two nodes fails with
LOCATOR_AMBIGUOUS; narrow it (topicwriting-tests). - Secrets never appear in test code. Declare accounts under
credentialsand every other sensitive value undersecretsin the config; resolve withcredentials.user(name).passwordorsecrets.get(name)(separate namespaces:secrets.getnever returns a password), and hand the opaqueSecretonly tofill()oragent.actparams. - Tests: one top-level
describeper feature, one behavior per test, arrange, act, assert with every assertion last (topicwriting-tests). Bad: one test that adds a todo, checks it, marks it done, and checks again. Good:'adds a todo to the list'and'marks a todo as done', the second adding its todo in its arrange block. - Agent instructions: one goal per
act, the wording on screen, real values in params. A goal is atomic: one outcome that one check confirms. Two outcomes are two goals in twoactcalls (topicagent), never'add a todo and mark it done'. Judge meaning, not phrasing:toContain('Pro'), not an exact sentence a model produced. - End every test that runs an agent goal with a verifying check: a
locator matcher (
expect(locator)), an engine matcher (expect(browser).toHaveURL), oragent.assert. A passing one confirms everyactbefore it, so they can be cached and replayed without model calls, and so dolocator.waitFor,browser.waitForURL, andagent.waitFor. Reads,expect.poll, and plain-valueexpectconfirm nothing (topicagent, "The replay cache"). - Shape the agent for this app:
contextfor vocabulary the screens use,systemfor how it works, tools for a test API, named personas underagents. When a step fails, tighten the goal first, then the context, then the agent. .e2e/is output (report.json,results/,cache/,logs/; the config'soutputmoves the report and artifacts, nevercache/or the app's log). Read it, never edit it.
Feedback
When e2e itself gets in your way, offer to tell the e2e team: a command or
API that broke (bug), docs or this skill that misled you (docs), or a
capability you needed and did not find (feature). Once per problem, after
you worked around it or gave up. Never report:
- failures of the app under test, or its own behavior;
- a problem you saw once and could not see again;
- anything on an outdated e2e: the command refuses it, so upgrade
(
npx e2e@latest upgrade) and check the problem still happens first.
Search existing issues first
(gh issue list -R e2e-inc/e2e --search "<words>"); comment on a match
instead of sending a new report.
A bug needs --repro, steps that reproduce it every time without app
content. Without such steps, or when the bug needs your app to show, omit
--repro: the command then prints a prefilled GitHub issue and sends
nothing; show the user the link and tell them to add a minimal reproduction
and submit it. Never file the issue yourself.
Run it with --dry-run first, show the user what would be sent, and send
it only when they agree.
npx e2e feedback --type bug -m "<one or two sentences>" \
--repro "<steps that reproduce it every time>" --error-code LOCATOR_AMBIGUOUS \
--task "<what you were doing>" --expected "<...>" --actual "<error message>" \
--approach "<what you tried>" --command "<e2e command>" --agent "<agent / model>"Describe e2e's behavior only, briefly: never paste app content, page text, test files, URLs of private apps, or credentials. Secret-named environment variables and common token shapes are redacted, but do not rely on it. After sending, give the user the reference id it prints.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

