setup-profiles

setup-profiles is a command for coding agents from neonwatty/playwright-profiles. It costs 11 tokens per session (1,194 once invoked), scanned B, original, MIT.

A setup command for Playwright, a browser-automation tool, that creates saved login profiles for a project.

In plain words
What is it for?
Use it to check Playwright configuration, create profiles, refresh existing profiles, or add new ones.
Why use it?
It avoids repeating interactive logins whenever automated browser tests or tasks run.

Command

Part of the playwright-profiles plugin — 3 skills, 2 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/neonwatty/playwright-profiles/setup-profiles
Clone the repo
git clone --depth 1 https://github.com/neonwatty/playwright-profiles

Or install playwright-profiles, the plugin that ships this one along with the rest of its 3 skills, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup-profiles

README.md
[![agentmods](https://agentmods.dev/badge/commands/neonwatty/playwright-profiles/setup-profiles.svg)](https://agentmods.dev/commands/neonwatty/playwright-profiles/setup-profiles)
Your own site
<a href="https://agentmods.dev/commands/neonwatty/playwright-profiles/setup-profiles"><img src="https://agentmods.dev/badge/commands/neonwatty/playwright-profiles/setup-profiles.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,194 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00011 $0.01194
Opus 5 $0.00005 $0.00597
Sonnet 5 $0.00002 $0.00239
Haiku 4.5 $0.00001 $0.00119

Measured 3d ago against content hash 8ece3e2e483a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

setup-profiles scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Verify that a Playwright MCP server is configured. Check the project's `.mcp.json` and the user's global MCP config (`~/.claude/settings.json`) for a Playwright MCP server entry.
commands/setup-profiles.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Setup Playwright Authentication Profiles

Set up persistent Playwright storageState authentication profiles for the current project. This enables authenticated browser automation without logging in every session.

Step 1: Check MCP Configuration

Verify that a Playwright MCP server is configured. Check the project's .mcp.json and the user's global MCP config (~/.claude/settings.json) for a Playwright MCP server entry.

If no Playwright MCP server is configured, guide the user to add one:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"]
    }
  }
}

The Playwright MCP server runs in headed mode by default, which is required for the interactive login flow.

Step 2: Check for Existing Profiles

Check if .playwright/profiles.json already exists in the project root.

If it exists: Read it and present the existing profiles to the user. Ask whether they want to:

  • Refresh specific existing profiles (ask which ones)
  • Add new profiles
  • Refresh all profiles

Then skip to the appropriate step below.

If it does not exist: Proceed to Step 3 for fresh setup.

Step 3: Define Profiles

Ask the user the following questions, one at a time:

  1. What user roles/profiles do you need? (e.g., "admin, planner, speaker" or just "user")
  2. What is the login URL? Ask per-profile if they might differ, but often all roles share the same login page.
  3. Optional: brief description for each role (e.g., "Full admin permissions" or "Can only view assigned decks"). If the user skips this, generate reasonable descriptions based on the role names.

For projects spanning multiple apps, suggest using descriptive prefixed names (e.g., admin-panel-admin, storefront-buyer).

Step 4: Write Configuration

Create the directory structure:

.playwright/
  profiles.json
  profiles/

Write .playwright/profiles.json with the profile definitions. Format:

{
  "profiles": {
    "role-name": {
      "loginUrl": "https://example.com/login",
      "description": "Role description"
    }
  }
}

Read the full file on GitHub · 140 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 140 lines · 11 tokens per session scan B 8ece3e2e483a

Subscribe to this mod's changes

setup-profiles is a command published in the GitHub repository neonwatty/playwright-profiles (4 stars, last pushed 4mo ago), licensed MIT. It adds 11 tokens to every session and 1,194 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.