
// Agents and skills //
End-to-end testing with personas
runs in Claude Code
A Claude Code skill that has Claude build, or review, the end-to-end tests of a web app with Playwright. Instead of testing "the app," it tests the app as each type of user: what the visitor sees, what the logged-in user without a plan can't see, what the subscriber gets, and where only the admin can go. The core idea: switching persona costs one line. A setup step generates each persona's session before the tests, without going through the login screen and without creating a test route in the app. The real login has a test of its own, with the code read from the local email inbox. Everything runs only on your machine and in CI: the config refuses any database or URL that isn't local, because these tests create accounts and data. It starts by reading the project and figuring out where the tests stand: no end-to-end tests, every test logging in through the screen, only one role tested, admin with no proof, a test that fails sometimes, or moving to CI. What it delivers: the personas in the seed data, one account per role, only in the local environment; sessions without the login screen, with the files kept out of git; safety locks that stop the suite before the first test if the database, the URL, or the email inbox isn't local; test data that doesn't linger, with a fixed prefix and cleanup by that prefix; what to test for each persona (the admin guard, what each role sees and doesn't see, the real login, the mandatory form that can't be skipped, and the draft that survives a reload); desktop and mobile as two projects; four reference sheets; six templates (Playwright config, helpers with safety locks and session generation, admin guard, login reading the local email, CI job, and personas in SQL); and a checker, conferir.py, that only reads the project and flags a forgotten .only, fixed time-based waits, remote URLs written into tests, session files in git, and tests that write without the cleanup prefix. Limitations: the skill only runs the tests against the local environment and CI; it doesn't test production and doesn't accept production keys. The templates are Playwright with TypeScript, and session generation is written for Supabase; for another auth provider it gives the order of decisions, and those paths weren't run. The templates came from a suite in use, with the names changed, and passed the type checker with Playwright 1.64 and TypeScript 5.9; the SQL ran on Postgres 18, and no template was run in this form against an app. The measured number (86 tests in 22.6 seconds against the production build) is from one system, on an 8 GB machine; in your project the time will be different. Mobile is emulation in Chromium, not a real device's browser. The CI template is for GitHub Actions. Proving that paid content doesn't leave the server is the job of the sister skill vazamento-de-paywall; login and database permissions belong to app-com-supabase. The checker reads text, line by line; not finding something doesn't prove it isn't there. Requirements: Node 20.12 or newer, @playwright/test in the project, and a local database that starts with a command. Python 3.8 or newer, only for the checker, which uses only the standard library and doesn't access the network. To install, unzip the .zip into ~/.claude/skills/.
- Runs in Claude Code
- Advanced
A Claude Code skill that has Claude build, or review, the end-to-end tests of a web app with Playwright. Instead of testing "the app," it tests the app as each type of user: what the visitor sees, what the logged-in user without a plan can't see, what the subscriber gets, and where only the admin can go. The core idea: switching persona costs one line. A setup step generates each persona's session before the tests, without going through the login screen and without creating a test route in the app. The real login has a test of its own, with the code read from the local email inbox. Everything runs only on your machine and in CI: the config refuses any database or URL that isn't local, because these tests create accounts and data. It starts by reading the project and figuring out where the tests stand: no end-to-end tests, every test logging in through the screen, only one role tested, admin with no proof, a test that fails sometimes, or moving to CI. What it delivers: the personas in the seed data, one account per role, only in the local environment; sessions without the login screen, with the files kept out of git; safety locks that stop the suite before the first test if the database, the URL, or the email inbox isn't local; test data that doesn't linger, with a fixed prefix and cleanup by that prefix; what to test for each persona (the admin guard, what each role sees and doesn't see, the real login, the mandatory form that can't be skipped, and the draft that survives a reload); desktop and mobile as two projects; four reference sheets; six templates (Playwright config, helpers with safety locks and session generation, admin guard, login reading the local email, CI job, and personas in SQL); and a checker, conferir.py, that only reads the project and flags a forgotten .only, fixed time-based waits, remote URLs written into tests, session files in git, and tests that write without the cleanup prefix. Limitations: the skill only runs the tests against the local environment and CI; it doesn't test production and doesn't accept production keys. The templates are Playwright with TypeScript, and session generation is written for Supabase; for another auth provider it gives the order of decisions, and those paths weren't run. The templates came from a suite in use, with the names changed, and passed the type checker with Playwright 1.64 and TypeScript 5.9; the SQL ran on Postgres 18, and no template was run in this form against an app. The measured number (86 tests in 22.6 seconds against the production build) is from one system, on an 8 GB machine; in your project the time will be different. Mobile is emulation in Chromium, not a real device's browser. The CI template is for GitHub Actions. Proving that paid content doesn't leave the server is the job of the sister skill vazamento-de-paywall; login and database permissions belong to app-com-supabase. The checker reads text, line by line; not finding something doesn't prove it isn't there. Requirements: Node 20.12 or newer, @playwright/test in the project, and a local database that starts with a command. Python 3.8 or newer, only for the checker, which uses only the standard library and doesn't access the network. To install, unzip the .zip into ~/.claude/skills/.
How to use
01
Copy the prompt
Use the Copy prompt button on this page.
02
Paste it into your AI
Open Claude Code in the project folder and paste the prompt.
03
Install the skill you downloaded
Install the downloaded file in Claude and call the skill in any chat.
In the package
- Prompt ready to copy and paste
- Skill as a .zip to install in Claude
Goes with
- Paywall leaksProves, per user type, that paid content doesn't leave the server: markers in the test data, searched for in the raw response of every route.TestsSecurityAdvanced
- Project engineeringA method for taking a software project from idea to production with Claude Code, on any stack, for people who've never coded and for experienced devs.MethodSpecificationBeginner

