m4bwav/brandwright/brandwright-capture
Claude Code and agent skill by m4bwav/brandwright
- community
Checking that the SKILL.md file is still in the repository.
Turn a brand's websites into a clean LoRA training set and a token file: crawl pages with a headless browser (or the user's own signed-in browser session, or screenshots they supply), mask personal data, hide cookie banners, read design tokens and component styles into brand.css, then tile pages, crop components, drop duplicates, cap repeated headers and write captions that describe content and quote visible text but never colours or fonts. Use when the user wants to capture or crawl a site for a brand LoRA, feed screenshots in, build or caption a dataset for a UI or style LoRA, extract design tokens or brand colours and fonts from a live site, or asks 'how many screenshots do I need', 'how should I caption UI screenshots'. Part of brandwright (start there for the whole job). Also for 'refresh brandwright-capture'. Not for screenshot testing of an app, or scraping content.
Install
npx vskill@latest install m4bwav/brandwright/brandwright-captureSKILL.md
The same SKILL.md was published earlier as m4bwav/brandwright/brandwright-capture.
brandwright-capture
From sites (or screenshots) to capture/, tokens.json + brand.css, and dataset/<lora>/ with captions. BW is python "<brandwright skill folder>/scripts/bw.py" (python3 on macOS and Linux); the kit exists already (BW new, see the brandwright skill).
Step 0: freshness
Read evergreen.json; if past next_due or contradiction is set, say so, do the task, refresh after (MAINTENANCE.md).
Step 1: how the pictures get in
Ask the user, per site; never assume a login or a crawl is allowed.
| Situation | Command | |
|---|---|---|
| Public site | BW capture KIT --site NAME URL... --crawl 10 | |
| Behind their login (SSO, intranet) | BW login KIT --site NAME URL --channel msedge: a window opens, they sign in and close it; then BW capture KIT --site NAME URL --crawl 10 --channel msedge reuses the session | |
| Already open and signed in in their browser | they start Edge or Chrome with --remote-debugging-port=9222; BW capture ... --cdp http://127.0.0.1:9222 | |
| Not reachable from here, or automation not allowed | they save screenshots to a folder: BW import KIT --site NAME FOLDER (--kind component for single components, --viewport mobile for phone shots) |
--channel msedge(orchrome) uses the installed browser, so nothing is downloaded: right for locked-down work machines. Without it, Playwright needspython -m playwright install chromiumonce (python3on macOS and Linux).- Never type, request or store a password. The
auth/folder is a live session: private, never shared. - Crawling visits same-site links by GET only and skips sign-out, delete, cancel, mailto and file links. Nothing is clicked except what
--clicknames. Keep--crawlmodest (10-30): the aim is variety of page types, not volume. - Name at least one page with the main call-to-action button (a form, a start or sign-up page) among the URLs. Crawls follow navigation, and index pages rarely carry it (L-002).
- Competitor pages for side-by-side review: capture public pages only, as their own site with
"lora": falseand"competitor": true; never put them in a dataset (Wheeler pp. 130-131). For a redesign, capture the old pages and marks first as a dated "before" site, and list marks worth keeping inmarks_to_keep(Wheeler p. 129). - Default viewports:
desktop(1440x900) andmobile(390x844 at 2x).--viewports desktop,tablet,mobile,laptop.
Step 2: masks
By default, before each screenshot: e-mail addresses become name@example.com, digit runs (phones, account and card numbers) become 5s, typed field values are replaced, and consent banners, chat bubbles and survey pop-ups are hidden. Names, addresses and free text cannot be detected:
- capture staging or a test account where possible;
--hide SELECTORremoves regions (better than--blur: blurred boxes teach the LoRA to draw blur);- look at a few
capture/<site>/pages/*.pngbefore training. Read them with the image viewer, not by dumping the files.
Step 3: tokens (the code route's input)
BW tokens KIT merges every capture into tokens.json (DTCG 2025.10 shape: brand base plus per-site overrides), brand.css (custom properties, the site's own :root variables, @font-face rules, and .bw-button, .bw-input, .bw-card, .bw-header, .bw-nav, .bw-footer, .bw-alert, .bw-hero recipes from the most common real element of each kind), tokens.md and palette.png (with Pillow). Show the user tokens.md. If tokens says no primary button was captured, capture a page that has one and run it again. For deeper token work, dembrandt (MIT, npx dembrandt URL --dtcg) is a well-kept alternative.
Step 4: the dataset
BW prep KIT builds one folder per LoRA:
- full pages become viewport-sized tiles from the top (
--tiles 3); trainers only downscale, so a whole long page would be illegible; - components (header, nav, footer, hero, card, form, button, input, table, dialog, tabs, alert, pagination, breadcrumb) are cropped and set on the page's background as specimens, at most 2x upscale;
- near-duplicates go (
--dedupe 4, perceptual hash), and repeated parts are capped (2 headers, 2 footers, 2 navs per site); brandtakes an equal share from every site (--brand-max 90); each site LoRA takes only its own site (--max-per-site 60).
Sizes that work: brand 40-100 pictures across sites, a site 20-40. Fewer than 15 is thin: capture more page types.
Step 5: captions
prep writes template captions: triggers, view, what the tile shows, and text reads "..." for short component text. Better captions come from a vision model:
BW caption KITuses a local Ollama vision model (--model qwen3-vl:8b;BW doctorlists hosts). Local keeps the screenshots on the machine.- Or the agent writes them: open each picture, write the
.txt. Only with the user's yes if the agent is a cloud model, since the screenshots then leave the machine.
The rule for every caption: describe content and arrangement (page type, components, order, the main headings and button labels in double quotes), never colours, fonts, corners, shadows, spacing, "clean", "modern" or the brand name. Those are what the LoRA should learn. caption flags style words it finds. Then BW review KIT writes review.html: delete weak pictures (and their .txt), fix captions, and the set is ready for brandwright-train. Detail and examples: references/captions.md.
Maintenance
Evergreen: evergreen.json, RESEARCH.md, CHANGELOG.md, LEARNINGS.md, TESTS.md, evals/evals.json. Protocol: MAINTENANCE.md.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/brandwright-capture/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/m4bwav/brandwright/brandwright-capture)