qa-target-setup
Skill15 starsChanged 17 days agoMITView on GitHub
Interactive setup for a new target application. Navigates to the URL, detects auth requirements, walks through login flow creation, auto-detects scope, and saves target config. Use when user says: "setup target", "add target", "configure app", "new target".
- Reads credentials
In this repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- qa-explore-cleanupSkill
- qa-explore-feedbackSkill
- qa-explore-mobileSkill
- qa-explore-quickSkill
- qa-explore-reportSkill
- qa-exploreSkill
- qa-gatherSkill
- qa-knowledge-addSkill
- qa-knowledge-listSkill
- qa-target-setupSkill
- qa-verify-backendSkill
- qa-explore-cleanupSkill
- qa-explore-feedbackSkill
- qa-explore-mobileSkill
- qa-explore-quickSkill
- qa-explore-reportSkill
- qa-exploreSkill
- qa-gatherSkill
- qa-knowledge-addSkill
- qa-knowledge-listSkill
- qa-verify-backendSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 7 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Ask the user for:
- Very specific: line 40
Use the session id -s=setup-<HHmm>-<name> on every command (omitted below):
- Very specific: line 59
Ask the user for the env var names for username and password (values go in qa/.env).
- Very specific: line 74
If the identity provider needs MFA, reopen headed (playwright-cli open <login_url> --headed) and let the user complete it by hand.
- Distinctive: line 75
Verify login succeeded (snapshot shows dashboard/profile).
- Distinctive: line 80
Ask for the token env var name and the injection method (cookie or localStorage).
- Distinctive: line 85
After login (or on the landing page):
- Distinctive: line 96
Ask the user to confirm/modify scope.
- Very specific: line 103
Ask whether mobile emulation is needed (browser.device, e.g.
- Very specific: line 107
If the production rule fired, or the user says this is production: safety.read_only: true, safety.no_form_submit: true.
- Very specific: line 112
Write qa/target.yml (default) or data/targets/<name>.yml (--shared) with all gathered configuration.
- Very specific: line 120
Update qa/.env.example (create it if missing) with every env var name the config references, each as a commented # NAME= line.
- Distinctive: line 133
If the user plans to author full Playwright tests against this target later (not just exploratory sessions), offer to scaffold the Test …
- Distinctive: line 146
Test Agents are scaffolded.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Target Application Setup
Interactive wizard that writes a target config. By default it writes the project-local
qa/target.yml (the file every session skill reads when no --target is given; see
${CLAUDE_SKILL_DIR}/../qa-explore/references/paths.md). With --shared, it writes
data/targets/<name>.yml instead, for a target the whole team shares by name. A target file
holds no secret values (credentials stay in qa/.env, by name only), so qa/target.yml can
be committed when the team shares it. A target with internal hostnames that must stay local
goes in data/targets/local-*.yml, which qualiow init adds to .gitignore.
Security: ${CLAUDE_SKILL_DIR}/../qa-explore/references/security-rules.md applies (the
production rule decides the safety: block; never write a credential value into YAML).
The fields written here are what the session skills read to fill **Environment:** and the
session metadata in ${CLAUDE_SKILL_DIR}/../qa-explore/references/output-contract.md, so
id, environment.kind and base_url must be the real ones.
Flow
1. Gather Basic Info
Ask the user for:
- Target name (slug, e.g.
company-staging; becomesid:and, with--shared, the filename) - Base URL (e.g.
https://staging.company.com) - Domain type (
ecommerce,saas,fintech,marketing,identity, or auto-detect against<data>/domains/*.yml)
Apply the production rule to the hostname now and tell the user what it decided.
2. Navigate and Analyze
Use the session id -s=setup-<HHmm>-<name> on every command (omitted below):
playwright-cli open <base_url>
playwright-cli snapshotFrom the snapshot, detect:
- Is this a login page? (password fields, "Sign in" buttons)
- What's the main navigation structure?
- What kind of application is this? (helps auto-detect the domain)
3. Handle Authentication
If no login detected: set auth.strategy: none and skip to step 4.
If login detected, ask which strategy to use:
Option A: Storage State (recommended)
- Ask the user for the env var names for username and password (values go in
qa/.env). - Log in via playwright-cli. The username may be filled as a literal; the password is filled
by
qualiow auth fill, which reads the variable itself so the value never passes through you.--sessiontakes thesetup-<HHmm>-<name>id without-s=; writequaliowas the prefix resolved from${CLAUDE_SKILL_DIR}/../qa-explore/references/paths.md(CLI):playwright-cli snapshot # find form fields playwright-cli fill <email_ref> "<username value>" qualiow auth fill --session <sid> --ref <password_ref> --env <the password env var NAME> --target <name> playwright-cli click <submit_ref>auth filltypes only a login credential the target declares. With names other thanQA_USER/QA_PASS, write the target file'sauth.credentialsblock (step 5) before logging in. Exit 2 means the variable is not set inqa/.envyet: ask the user to add it there, never to paste the value into the conversation. If the identity provider needs MFA, reopen headed (playwright-cli open <login_url> --headed) and let the user complete it by hand; never automate an MFA challenge. - Verify login succeeded (snapshot shows dashboard/profile).
- Save state:
playwright-cli state-save .auth/<name>.json - Set
auth.strategy: storage_statewithstate_file: ".auth/<name>.json", plusauth.credentials.username/auth.credentials.passwordnaming the env vars so a session can re-login when the state expires.
Option B: Token
- Ask for the token env var name and the injection method (cookie or localStorage).
- Set
auth.strategy: token,auth.token: <ENV_VAR_NAME>.
4. Detect Scope
After login (or on the landing page):
playwright-cli snapshotFrom the snapshot, identify:
- Top-level navigation sections → suggest as
scope.start_pages - Suggest
scope.include_patternsbased on the URL structure - Suggest
scope.exclude_patternsfor common exclusions (/admin,/api,*.pdf) scope.max_depth(default 3)
Ask the user to confirm/modify scope.
5. Configure Browser Settings
Suggest defaults:
headless: false(so the user can watch)viewport: { width: 1280, height: 720 }- Ask whether mobile emulation is needed (
browser.device, e.g.iPhone 15, used withplaywright-cli open --device="iPhone 15", or--mobilefor a generic mobile device — the two flags are mutually exclusive, and--mobileis unsupported on Firefox)
6. Safety Settings
- If the production rule fired, or the user says this is production:
safety.read_only: true,safety.no_form_submit: true. - Otherwise:
safety.read_only: false,safety.no_form_submit: false.
7. Save Config
Write qa/target.yml (default) or data/targets/<name>.yml (--shared) with all gathered
configuration; id equals the target name. Then close the session:
playwright-cli close
playwright-cli delete-dataUpdate qa/.env.example (create it if missing) with every env var name the config references,
each as a commented # NAME= line. Never write values.
8. Confirm
Present the saved config to the user:
- Target name and URL
- Auth strategy configured
- Scope defined
- How to use:
/qa-explore(picks upqa/target.yml) or/qa-explore --target <name>for a shared target
9. Optional — Offer Playwright Test Agents Bootstrap
If the user plans to author full Playwright tests against this target later (not just exploratory sessions), offer to scaffold the Test Agents workspace now while credentials and scope are already loaded:
npx playwright init-agents --loop=claudeWith --loop=claude this writes the planner / generator / healer definitions into
.claude/agents/, a .mcp.json registering the playwright-test server, and a specs/
scaffold with a seed spec if the project has none (Playwright 1.56+; other loops: codex,
copilot, opencode, vscode, vscode-legacy). It is strictly optional; declining does not affect
the target config just written. If the user accepts, note in the config's notes field that
Test Agents are scaffolded.
This step requires @playwright/test and a playwright.config.* in the target project. If
either is missing, skip it silently.
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.

