/marketing-studio:frontend-verifyfrom marketing-studio
Automated end-to-end smoke testing for frontend changes. Runs headless Playwright checks across routes, reading console errors and failed network requests first to minimize token cost. Works with Next.js, React, Vite, and any local dev server.
Ships in marketing-studio. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The slow loop is: edit code, start the dev server, open a browser, click each
page, watch the console, eyeball the layout, repeat. This skill does that pass
programmatically with @playwright/cli running headless, and it does it without
dumping every page state into the model context.
Reading a full accessibility snapshot or a screenshot into context on every route is the expensive part, not running the browser. So the order of operations is always cheapest signal first:
verify-routes.mjs runs steps 1 and 2 across all changed routes in one browser
pass, writes the detail to disk, and prints a compact PASS / WARN / FAIL table.
You read the table, then open detail files for flagged routes only. Do not read
detail for routes that passed.
Almost never. Reach for one only when:
For everything else, the console plus a text assertion tells you whether the page works. A screenshot tells you how it looks, which is a different and more expensive question.
Confirm the CLI is installed before running anything:
playwright-cli --help
If that fails, the user installs it once with (PowerShell):
npm install -g @playwright/cli@latest
playwright-cli install-browser chrome-for-testing
It runs headless by default, so no window opens during a verify run.
git diff --name-only
git diff --name-only --staged
Keep the files under the frontend (for Next.js that is app/, pages/,
components/, src/). Ignore server only, config, and test files unless they
back a route you are checking.
This is the judgment step. Map changed files to URLs:
app/dashboard/page.tsx serves /dashboard.
app/page.tsx serves /. Strip route groups in parentheses, so
app/(marketing)/pricing/page.tsx serves /pricing. A [slug] segment needs
a real value, so pick one that exists (for example /blog/hello-world).pages/about.tsx serves /about,
pages/index.tsx serves /.git grep -l "PricingCard" -- "*.tsx" "*.jsx"
Then map those importing files to routes the same way. Walk up until you reach
files that are actual routes.If the route set is unclear, ask the user which routes the change should affect rather than crawling the whole site. Verify only what changed.
The config points at a base URL like http://localhost:3000. If nothing is
serving there, start the dev server (for example npm run dev) in a separate
terminal first, or ask the user to. verify-routes.mjs will report a navigation
failure if the server is down, which is the signal to start it.
Create a small JSON config (shape below) listing the affected routes, then:
node <skill-path>/scripts/verify-routes.mjs verify.json
The script exits non zero if any route fails, so it slots into a chain that should stop on failure.
The script prints something like:
[PASS] /
[FAIL] /pricing 2 JS console error(s); 1 request failure(s)
[WARN] /play canvas route: accessibility tree is blind
That table plus report.json is usually all you need. Only open
.frontend-verify/<route>/detail.json for a route marked FAIL or WARN. That file
has the exact error lines and the failed request log. console.txt and
requests.txt sit next to it if you want the raw capture.
For a failing route, after reading its detail.json:
playwright-cli -s=fe-verify goto http://localhost:3000/pricing
playwright-cli -s=fe-verify snapshot --filename snap.yml
playwright-cli -s=fe-verify --raw eval "document.querySelector('h1')?.innerText"
Apply the rule above. If the route is canvas or PixiJS, or the bug is visual, take one screenshot and look. Otherwise stop, you already know if it works.
State, per route, PASS or FAIL and the reason, then a one line verdict. Do not restate passing detail. See the report template at the end.
{
"baseUrl": "http://localhost:3000",
"session": "fe-verify",
"settleMs": 800,
"apiFilter": "/api/",
"checkWarnings": false,
"outDir": ".frontend-verify",
"routes": [
{
"path": "/",
"expectText": ["Dashboard"],
"expectNoText": ["NaN", "undefined"]
},
{
"path": "/pricing",
"waitForText": "Pro plan"
},
{
"path": "/play",
"canvas": true
}
]
}
Field notes:
expectText: substrings that must appear in the page body. Missing one is a
FAIL.expectNoText: substrings that must not appear. "NaN" and "undefined" are
cheap catches for broken data binding.waitForText: for async or client rendered routes, poll until this text shows
before checking. Use it when content arrives after a fetch.canvas: marks a canvas / WebGL / PixiJS route so a clean text pass is
reported as WARN, not a false PASS, since the checks cannot see the canvas.settleMs: pause after load so client side fetches fire and failed API calls
register. Raise it for slow pages.apiFilter: regex, only list requests whose URL matches. /api/ keeps the
request log focused on your own calls.checkWarnings: set true to surface console warnings as WARN. Off by default
so warning noise does not bury real failures.Log in once and save the browser state, then point the config at it:
playwright-cli -s=fe-verify open
playwright-cli -s=fe-verify goto http://localhost:3000/login
# drive the login with find / form_input / eval, then:
playwright-cli -s=fe-verify state-save auth.json
Add "stateFile": "auth.json" to the config. The script loads it before
visiting routes, so protected pages render as a logged in user.
Do:
verify-routes.mjs once over the changed routes and read the summary.--filter on requests and targeted eval to pull single values.Do not:
window (for example a game store or a
ready flag) or by taking one screenshot.playwright-cli goto exits 0 even when navigation fails (connection refused,
DNS error). The script already detects this from the command output, so trust
its navigation-failed result over a raw exit code if you run goto yourself.Frontend verify: <branch or change summary>
[PASS] / ok
[FAIL] /pricing 2 JS console errors, 1 failed /api/plans (500)
[WARN] /play canvas route, screenshot checked: renders correctly
Verdict: 1 route broken. /pricing throws in PricingCard and its plans
fetch returns 500. Fix before shipping.
scripts/verify-routes.mjs: the verification driver. Reads a JSON config,
runs one headless pass, writes detail to disk, prints the summary, exits non
zero on any failure.references/playwright-cli-cheatsheet.md: the verification focused command
list and the output-format gotchas. Read it before driving playwright-cli
by hand.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ucsandman/marketing-studio --plugin marketing-studio15 skills in this plugin
/announceUse when a product or feature is ready to go public — after shipping, when the user says "announce it", "go live", "tell people about it", or wants a release marketed end to end./audio-trackUse when the user wants music, voiceover, narration, or a soundtrack added to a video asset, OR wants standalone generated audio for any purpose (e.g. "/audio-track", "add music to the launch video", "narrate the demo", "make a 30 second music sting", "generate a voiceover mp3", "jingle for the intro")./de-vibeAudit and fix the tells that software was vibe-coded / AI-generated, then give it a small distinctive identity, so it ships looking handcrafted and professional. Use whenever the user says "de-vibe", "does this look AI-generated / vibe coded?", "make this look shippable / handcrafted / professional", "remove the AI slop", "polish before launch", asks why their site "looks like every other AI site", or is about to ship/demo/hand off a project that was built largely with AI assistance — even if they don't use the word "vibe". Pairs naturally before /ship./launchTake a developed project end-to-end through launch — domain, hosting, payments, email infra, algorithm-researched copy, and multi-platform distribution — with zero copy-paste. Trigger on "launch <project>", "ship <project>", "take <project> live", or "/launch <dir>"./launch-videoUse when the user wants a full launch video, hero video, or 20–60s product film combining product proof, brand, narration, music, and authored motion./logo-revealUse when the user wants a logo reveal / logo animation / brand intro video for any product (e.g. "/logo-reveal", "make a logo reveal for DashClaw", "animated logo for the landing page").Other plugins' skills for the same job