Agent skill

Create Run E2E Tests

by PackmindHub in PackmindHub/packmind

Guide for writing and running new Playwright end-to-end tests in the apps/e2e-tests/ directory of the Packmind monorepo.

Apache-2.0Auto-check passedTesting & QA

Install Create Run E2E Tests

skills CLI
$ npx skills add PackmindHub/packmind --skill create-run-e2e-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PackmindHub/packmind create-run-e2e-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PackmindHub/packmind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/create-run-e2e-tests .claude/skills/create-run-e2e-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
create-run-e2e-tests
GitHub stars
317
Token cost
~2.8k tokens
SKILL.md length
1,058 words
Files
1
Skills in repo
35
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guide for writing and running new Playwright end-to-end tests in the apps/e2e-tests/ directory of the Packmind monorepo.

  • Works in 2 steps: Never use Playwright's raw test. Always… → Drive the UI through Page Objects, never…
  • Modify a spec that drives the real frontend and API — for example testing a user flow
  • SKILL.md covers Overview, Where files go, Choosing a fixture and Writing a Page Object, plus 5 more sections
  • Calls npx, npm and docker

What it does

Create Run E2E Tests is an agent skill from PackmindHub/packmind. Guide for writing and running new Playwright end-to-end tests in the apps/e2e-tests/ directory of the Packmind monorepo. Use this skill whenever you add or modify a spec that drives the real frontend and API — for example testing a user flow, a new page/route, a feature behind a flag, or a UI behavior end-to-end. Triggers on "write an e2e test", "add a Playwright test", "test this flow end-to-end", "cover this page with an e2e", "e2e for the frontend", or any work that lands a .spec.ts under apps/e2e-tests/src/…

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering End-to-end testing. It works with Playwright. The repository describes itself as: Packmind seamlessly captures your engineering playbook and turns it into AI context, guardrails, and governance. The licence is Apache-2.0.

When your agent uses it

  • Modify a spec that drives the real frontend and API — for example testing a user flow
  • A new page/route
  • A feature behind a flag
  • A UI behavior end-to-end

Example prompts

  • “write an e2e test”
  • “add a Playwright test”
  • “test this flow end-to-end”
  • “/create-run-e2e-tests”

Requirements

  • Node.js
  • Docker

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Never use Playwright's raw test. Always use one of the project fixtures. They handle user creation, sign-up, and API-key setup so each…
  2. Drive the UI through Page Objects, never raw selectors in specs. A spec should read like a user story; selectors live inside page objects…

What it can do on your machine

Read from SKILL.md and the folder at commit 8a10541. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm
    • docker
    • nx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, npm and docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Create Run E2E Tests loads about 2.8k tokens when it runs. Until then it costs about 171 tokens; SKILL.md has 1,058 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~171
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PackmindHub/packmind at commit 8a10541, republished under its Apache-2.0 licence (© PackmindHub). 1,058 words, ~2,793 tokens.

Download SKILL.mdSave it as .claude/skills/create-run-e2e-tests/SKILL.md (or your agent's skills folder).
name
create-run-e2e-tests
description
Guide for writing and running new Playwright end-to-end tests in the `apps/e2e-tests/` directory of the Packmind monorepo. Use this skill whenever you add or modify a spec that drives the real frontend and API — for example testing a user flow, a new page/route, a feature behind a flag, or a UI behavior end-to-end. Triggers on "write an e2e test", "add a Playwright test", "test this flow end-to-end", "cover this page with an e2e", "e2e for the frontend", or any work that lands a `*.spec.ts` under apps/e2e-tests/src/. Prefer this over hand-rolling raw Playwright `test()` calls — the codebase has mandatory fixtures and a Page Object Model you must follow.

Authoring Packmind E2E Tests

Overview

apps/e2e-tests/ runs Playwright against the real frontend (http://localhost:4200) and API. Tests drive the browser through a Page Object Model and seed irrelevant setup data through the API, not the UI. The dev stack must be running first (see michel-run-local-dev-stack).

Two rules dominate everything here, and both come from the project's .packmind standards:

  1. Never use Playwright's raw test. Always use one of the project fixtures. They handle user creation, sign-up, and API-key setup so each test starts from a clean, authenticated state.
  2. Drive the UI through Page Objects, never raw selectors in specs. A spec should read like a user story; selectors live inside page objects so a markup change breaks one file, not twenty tests.

Where files go

File typeLocationNaming
Specsrc/features/<area>/<Feature>.spec.ts — one spec per feature
Page object interfacesrc/domain/pages/index.tsIXxxPage
Page object implsrc/infra/pages/XxxPage.ts
API gateway typesrc/domain/api/IPackmindApi.tsGateway<IXxxUseCase>
API gateway implsrc/infra/api/PackmindApi.ts—
API data factorysrc/domain/apiDataFactories/apiXxxFactory.ts

This mirrors the hexagonal split used across the repo: domain/ holds interfaces, infra/ holds implementations.

Choosing a fixture

The three fixtures form a chain — each extends the previous and adds one capability. Pick the lowest one that gives you what the test needs, so you don't pay for setup you won't use.

FixtureProvidesUse when
testWithUserDatauserData (email/password), pageTesting sign-up / activation / trial itself — i.e. flows that run before a session exists. You drive the PageFactory yourself.
testWithUserSignedUpeverything above + dashboardPage (already signed in)Testing in-app UI where you don't need to seed API data.
testWithApieverything above + packmindApiYou must seed standards/packages/skills/etc. before exercising the UI.

All three live in src/fixtures/packmindTest.ts. Import the one you need:

typescript
import { testWithApi } from '../../fixtures/packmindTest';
Example — UI-only test
typescript
import { testWithUserSignedUp } from '../../fixtures/packmindTest';
import { expect } from '@playwright/test';

testWithUserSignedUp('user sees an empty standards list', async ({ dashboardPage }) => {
  const standardsPage = await dashboardPage.openStandards();

  // eslint-disable-next-line playwright/no-standalone-expect
  expect(await standardsPage.hasNoStandards()).toBe(true);
});
Example — seed via API, assert via UI

Seed everything not under test through packmindApi (it's faster and less brittle than clicking through setup), then exercise the actual feature in the browser:

typescript
import { testWithApi } from '../../fixtures/packmindTest';
import { apiStandardFactory } from '../../domain/apiDataFactories/apiStandardFactory';
import { expect } from '@playwright/test';

testWithApi.describe('packages page', () => {
  testWithApi('lists a standard added to a package', async ({ packmindApi, dashboardPage }) => {
    const standard = await apiStandardFactory(packmindApi);
    // ...seed package referencing standard.id...

    const packagesPage = await dashboardPage.openPackages();
    const packagePage = await packagesPage.openPackage('My package');
    const standards = await packagePage.listStandardsInPackage();

    // eslint-disable-next-line playwright/no-standalone-expect
    expect(standards).toEqual([{ name: standard.name }]);
  });
});

The eslint-disable playwright/no-standalone-expect line is required: the lint rule can't tell that a fixture-extended testWithApi(...) callback is a real test body. Add it on any expect that ESLint flags.

Writing a Page Object

A page object is the typed API a spec uses to talk to one route. Adding one is four mechanical steps — keep them in sync or TypeScript will complain.

1. Declare the interface in src/domain/pages/index.ts. In-app pages extend IPackmindAppPage (gives openStandards, openSettings, etc. for free); pre-login pages extend IPackmindPage.

typescript
export interface IBillingPage extends IPackmindAppPage {
  listInvoices(): Promise<{ date: string; amount: string }[]>;
}

2. Implement it in src/infra/pages/BillingPage.ts, extending the matching abstract base, and define expectedUrl() as a RegExp (the project standard — Playwright's glob matching is too loose):

typescript
import { IBillingPage } from '../../domain/pages';
import { AbstractPackmindAppPage } from './AbstractPackmindAppPage';

export class BillingPage extends AbstractPackmindAppPage implements IBillingPage {
  async listInvoices(): Promise<{ date: string; amount: string }[]> {
    await this.page.locator('table tbody tr').first().waitFor();
    // ...read rows...
  }

  expectedUrl(): RegExp {
    return /.*\/billing$/;
  }
}

3. Register it in the factory — add a getter to IPageFactory and PageFactory. Navigation methods that land on this page return the page object, so specs chain naturally (dashboardPage.openBilling() → IBillingPage).

4. Prefer data-testid over text/role selectors for app chrome that's likely to be reworded. The codebase exports test-id enums from @packmind/frontend (e.g. SidebarNavigationDataTestId) — reuse them.

Why navigation returns a page object

After any navigation, the factory calls waitForLoaded() (which awaits expectedUrl) before handing back the typed page. That's the project's this.pageFactory()-after-navigation rule: it guarantees the URL actually changed before the next interaction runs, killing a whole class of race conditions. Never page.goto + interact directly in a spec — go through the factory.

Seeding data through the API

When a test needs a resource that already exists in the product, create it via the API rather than clicking through the UI. Add the capability bottom-up:

  1. Add myThing: Gateway<ICreateMyThingUseCase>; to IPackmindApi (src/domain/api/IPackmindApi.ts). All gateway methods are typed with Gateway<IXxxUseCase> from @packmind/types.
  2. Implement it in PackmindApi (src/infra/api/PackmindApi.ts) using the private post/get helpers — they inject the auth header and assert the status code.
  3. Wrap it in an apiXxxFactory under src/domain/apiDataFactories/, reusing the shared @packmind/<domain>/test factory for default field values (see apiStandardFactory.ts / apiPackageFactory.ts for the shape).

This keeps specs declarative: const standard = await apiStandardFactory(packmindApi) instead of a paragraph of POST plumbing.

Show full SKILL.md (421 more words)Show less

Feature flags

Before writing, ask: is the feature under test gated by a feature flag?

If yes, the test user must have a @packmind.com email so the flag resolves to on. Flip the fixture option at the top of the file, before any describe/test:

typescript
testWithApi.use({ underFeatureFlag: true });

Without it the fixture creates an @example.com user, the flag stays off, and the feature is invisible — the test fails for the wrong reason. (Implementation: see the underFeatureFlag option in packmindTest.ts.)

Assertion style

  • Split distinct expectations into separate tests or describe blocks rather than one mega-test — a failure name then tells you exactly what broke.
  • Read state through a page-object method (listInvoices(), listStandards()) and assert on the returned plain object. Don't reach into the DOM from the spec.
  • For multi-step scenarios (sign up → create → verify), nest describe blocks with their own beforeEach, each building on the parent's state. See CliInstallDistribution.spec.ts for the pattern.

Running the tests

There are two ways to run, and they share the same entry point — npm run e2e (i.e. npx playwright test). Never run the suite through Nx; it isn't wired for it.

Local iteration — fast feedback while writing a spec

Bring the stack up first (michel-run-local-dev-stack) so localhost:4200 serves the frontend. Then, from apps/e2e-tests/:

bash
npm run e2e                              # all specs (BASE_URL defaults to http://localhost:4200)
npx playwright test <Feature>.spec.ts    # one file
npx playwright test --headed             # watch it run
npx playwright test --debug              # step through with the inspector
npx playwright show-report               # open the last HTML report
Full / CI run — containerized, the canonical way

CI runs the suite inside the run-e2e-tests Docker Compose service (Playwright image), whose entrypoint is the same npm run e2e but with BASE_URL=http://frontend:4200. It lives behind the e2e profile, so it only starts when you ask for it. Launch it, then block on its exit code with the helper script — this is what CI does and what keeps the two consistent:

bash
# From the repo root, with PACKMIND_EDITION=oss already exported
docker compose --profile=e2e up -d run-e2e-tests
./scripts/wait-for-e2e-tests.sh          # waits for the container, returns its exit code

wait-for-e2e-tests.sh matches the container by the run-e2e-tests name pattern, waits for it to finish, prints its logs, and exits with the container's code — so a non-zero exit means a failing suite. Reports land in apps/e2e-tests/playwright-report/ and apps/e2e-tests/test-results/ via the volume mount, exactly as in local runs.

Use local iteration while authoring a spec; use the containerized path to reproduce a CI result or run the whole suite the way the pipeline does.

Checklist before you call it done

  • Spec uses a testWith* fixture, not raw test.
  • No raw selectors in the spec — all interaction goes through page objects.
  • New page object: interface in domain/pages, impl in infra/pages, registered in PageFactory + IPageFactory, expectedUrl() is a RegExp.
  • Setup data not under test is seeded via packmindApi / an apiXxxFactory.
  • testWithApi.use({ underFeatureFlag: true }) added iff the feature is flagged.
  • npx playwright test <file> passes locally against a running stack.
  • ./node_modules/.bin/nx lint e2e-tests is clean.

© PackmindHub, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/create-run-e2e-tests of PackmindHub/packmind.

Open the folder on GitHubat commit 8a10541

Compare with similar skills

Create Run E2E Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Create Run E2E Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create Run E2E Tests this skillPackmindHub/packmind317—~2.8kAutomated safety check: PassApache-2.0
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
playwright-cli Browser Automationgithub/gh-aw5.4k24 repos~2.8kAutomated safety check: PassMIT
Write and Verify Playwright Testsappsmithorg/appsmith41k—~2.9kAutomated safety check: NotesApache-2.0
Cucumber and Playwright E2E Testslanggenius/dify158k—~682Automated safety check: PassCustom licence
E2E Testinglangflow-ai/langflow156k—~3.3kAutomated safety check: PassMIT

Similar skills

  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Testing & QAAuto-check passed
  • Official

    Drives a real browser from the command line with playwright-cli to open pages, interact, mock requests, save state and work with Playwright tests.

    5.4k GitHub starsUsed in 24 repos~2.8k tokens
    Testing & QAAuto-check passed
  • Writes a Playwright end-to-end test from a prompt, runs it against a live Appsmith deployment and retries with fixes up to three times until it passes.

    41k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check: notes
  • Guides changes and reviews of the Cucumber and Playwright end-to-end suite under `e2e/`: feature files, step definitions, support code, tags, locators and assertions.

    158k GitHub stars~682 tokensUpdated today
    Testing & QAAuto-check passed
  • E2E Testing

    langflow-ai/langflow

    Write and review Playwright E2E tests for Langflow. An agent skill from langflow-ai/langflow.

    156k GitHub stars~3.3k tokensUpdated today
    Testing & QAAuto-check passed
  • E2E

    callstack/react-native-pager-view

    Agentic end-to-end tests with e2e, the e2e runner. An agent skill from callstack/react-native-pager-view.

    3.4k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check passed

More from PackmindHub/packmind

All 35 skills in this repo
  • Michel CLI Demo Recorder

    PackmindHub/packmind

    Produce proof-of-execution demos of the Packmind CLI (packmind-cli) as terminal-styled images (colors and formatting preserved exactly), for embedding in a GitHub PR.

    317 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Michel UI Demo Recorder

    PackmindHub/packmind

    Record polished UI demo videos and screenshots of a running web app using Playwright MCP — for client deliverables, release notes, feature walkthroughs, or bug repros.

    317 GitHub stars~6.4k tokensUpdated today
    Auto-check passed
  • Packmind Create Skill

    PackmindHub/packmind

    Guide for creating effective skills. An agent skill from PackmindHub/packmind.

    317 GitHub stars~3.5k tokensUpdated today
    Auto-check: notes
  • Doc Audit

    PackmindHub/packmind

    Audit Packmind end-user documentation (apps/doc/) for broken links, outdated CLI references, non-existent concepts, misleading information, and missing coverage.

    317 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Feature Sprint

    PackmindHub/packmind

    Execute the implementation plan produced by /feature-spec. An agent skill from PackmindHub/packmind.

    317 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Review an implemented GitHub issue the way a senior Packmind engineer would — the human-judgment checks that ESLint, the TypeScript compiler, and e2e tests cannot catch (authorization scoping…

    317 GitHub stars~2.7k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Create Run E2E Tests

What does Create Run E2E Tests do?

Guide for writing and running new Playwright end-to-end tests in the apps/e2e-tests/ directory of the Packmind monorepo. Create Run E2E Tests is an agent skill from PackmindHub/packmind. Guide for writing and running new Playwright end-to-end tests in the apps/e2e-tests/ directory of the Packmind monorepo.

When should I use Create Run E2E Tests?

Create Run E2E Tests fits situations like: modify a spec that drives the real frontend and API — for example testing a user flow; A new page/route; A feature behind a flag; A UI behavior end-to-end.

How do I install Create Run E2E Tests in Claude Code?

Run `npx skills add PackmindHub/packmind --skill create-run-e2e-tests -a claude-code`. Or copy the skill folder (.claude/skills/create-run-e2e-tests in PackmindHub/packmind) into .claude/skills/create-run-e2e-tests in your project. Claude Code loads it when a task matches its description.

How do I install Create Run E2E Tests in Codex?

Run `npx skills add PackmindHub/packmind --skill create-run-e2e-tests -a codex`. Or copy the skill folder (.claude/skills/create-run-e2e-tests in PackmindHub/packmind) into .agents/skills/create-run-e2e-tests in your project. Codex loads it when a task matches its description.

Can I use Create Run E2E Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PackmindHub/packmind --skill create-run-e2e-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-run-e2e-tests, .gemini/skills/create-run-e2e-tests, .github/skills/create-run-e2e-tests and .opencode/skills/create-run-e2e-tests in your project.

What does Create Run E2E Tests need to run?

Going by SKILL.md and its folder, Create Run E2E Tests needs the command-line tools its instructions call (npx, npm, docker and nx). Our summary lists: Node.js; Docker.

Does Create Run E2E Tests access the network?

SKILL.md contains no URLs. Its commands use npx, npm and docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Create Run E2E Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Create Run E2E Tests use?

Create Run E2E Tests is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Create Run E2E Tests use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Create Run E2E Tests?

Skills that share tags, products or a category with Create Run E2E Tests: Web Application Testing (anthropics/skills, 180k stars), playwright-cli Browser Automation (github/gh-aw, 5.4k stars), Write and Verify Playwright Tests (appsmithorg/appsmith, 41k stars) and Cucumber and Playwright E2E Tests (langgenius/dify, 158k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create Run E2E Tests?

PackmindHub (a GitHub organization) maintains it in PackmindHub/packmind, which has 317 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 8, 2026.

Source: PackmindHub/packmind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.