/powerups:mockupsfrom powerups
Captures product UI via Chrome DevTools Protocol and composites marketing mockups in Shots.so with a house recipe (Mystic gradient, Glass Light rim, 4:3). For blog heroes, landing pages, changelogs, docs, launch/social posts, and decks.
Ships in powerups. 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.
Two steps, always in this order: capture the UI raw over CDP, then run it through Shots with the house recipe below. Never ship a raw capture, a browser-chrome screenshot, or a flat crop.
This skill needs a browser you control. Step 1 needs a Chrome with a CDP port open; step 2 is a GUI app, so it needs an agent that can click (Devin's computer tool, Claude in Chrome, a human). Without one, do step 1, save the raw capture, and hand off step 2 — do not substitute a hand-rolled gradient, a CSS frame or an AI-generated background.
capture.py ships next to this file.
python3 -m pip install "pillow>=11.0" "websockets>=14.0"
python3 <skill-dir>/capture.py <url> <selector> raw-<name>.png
It drives the Chrome already listening on http://localhost:29229 (--cdp to change) and
clips to the element, so there is no browser chrome to crop off. --click <text> puts the
page in the state worth shooting, --wait covers pages that render skeletons first,
--hide <selector> drops banners and chat widgets, --eval <js> edits the DOM before the
shot (each --eval is followed by another --wait, so an evaluated action that fires a
request has time to render), and --storage KEY=ENV_VAR seeds an auth token read from the
environment before the page loads, for a signed-in page (never put the token itself on the
command line).
Defaults are the house settings, so don't pass them: --scale 2 (retina), --zoom 1.25
(text stays readable once the image is scaled down in a post or a deck), and --pad 4.5,
the white margin that becomes the breathing room inside the glass rim — Shots has no
inner-padding control, so it has to be in the source.
Margin rule: at least 20 px between every visible element and every edge of the raw
source, measured on the source file, on all four sides, before it goes into Shots. Text,
avatars, buttons, table rules, scrollbars — anything drawn counts. Shots rounds the corners
and adds the rim right at the image edge, so an element that touches the edge reads as cut
off in the export. --pad 4.5 gives ~65 px on a 1440-wide capture, so a capture.py shot
passes unless the clipped element is very narrow; check the number on narrow ones.
When the source didn't come from capture.py (a phone screenshot the requester sent, a
Discord or Slack capture), measure it and, if anything sits inside 20 px of an edge, pad it
with the source's own background colour before uploading — sample the colour from a corner,
never white on a dark UI — and pad generously (40–50 px), not to the minimum:
from PIL import Image, ImageOps
im = Image.open("raw-discord.png").convert("RGB")
bg = im.getpixel((2, 2))
ImageOps.expand(im, border=(48, 40, 48, 40), fill=bg).save("raw-discord-padded.png")
This is padding the source, not compositing — the background, rim and shadow still come from Shots.
A marketing image is published forever, so treat the frame as a public document. Never shoot a screen that shows, in any form:
sk_live_example_key), and prefer a different screen entirely.Default to a generic example, don't ask. Rewrite the strings in the DOM with --eval
before the capture — the shot must read as a generic product demo, not as the requester's
account — walking text nodes so nested markup doesn't end up overlapping:
const swap = new Map([["Wo ist meine Bestellung?", "Where is my order?"]]);
const w = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT);
const nodes = []; while (w.nextNode()) nodes.push(w.currentNode);
nodes.forEach(n => { const t = n.nodeValue.trim(); if (swap.has(t)) n.nodeValue = swap.get(t); });
Keep counts, dates and labels plausible, and keep raw captures out of the repo's image directory — they are inputs, not assets.
capture.py reads the text inside the clipped element and refuses to write the file
when it looks like a credential, a masked key, an email address or a personal instance URL.
That check is a floor, not a substitute for looking: it can't read text baked into a
canvas, an image or a chart. When it fires, fix the DOM with --eval; --allow-secrets
is only for a hit that is already public (a docs URL, a fake key), never a way past a real
one.
The same rule covers everything around the image: crop or rewrite before sharing, and don't paste the raw capture, the page URL or the console output containing them into a blog, a PR, a Slack thread or a changelog.
Open https://shots.so/ and load the raw capture: CDP DOM.setFileInputFiles on the
media control's hidden input[type=file], or Input.dispatchDragEvent
(dragEnter/dragOver/drop with data.files) onto the media control. Both work; both
sometimes need a second try before the editor swaps the active media, so verify the
canvas actually shows the new image before touching any setting.
The recipe, all of it free-tier:
| Setting | Value |
|---|---|
| Mockup → style | Glass Light |
| Mockup → border | Curved, radius 20 |
| Mockup → shadow | Spread, opacity 10 (the slider's floor) |
| Frame → ratio | Default 4:3 → exports 1920 × 1440 |
| Frame → background | Mystic, the number the requester asked for |
| Frame → Bg effects | Noise 84, Blur 0 |
| Canvas zoom | 114% |
Background: Mystic has 15 gradients, previewed at
https://assets.shots.so/mystic-gradients/original/<1-15>.jpg. Ask which number unless
the request names one — never pick one at random. Send the numbered contact sheet of all 15
with the question. #14 is the default when the requester has no preference. Stay inside the
Mystic family — that family is the house look.
Export downloads a watermark-free PNG to ~/Downloads/<n>_1x_shots_so.png at 1920 × 1440.
2x/4K is a paid tier; don't buy it, 1920 is enough everywhere we ship images.
Open the export and look at it: one background, glass rim intact on all four sides, even margin inside the rim, real product UI. Measure the inner margin: nothing drawn may sit within 20 px of the rim on any side (in the 1920 × 1440 export that is roughly 20 px of the source scaled, so aim for visibly more — 50 px+ of dark or white space between the rim and the nearest text or avatar). If a side is tight, go back to step 1 and pad the source; don't ship it and don't fix it in Shots. Then read every string in the frame, including the dim ones and the ones half-scrolled out — no key or key fragment, no email, no instance URL, no customer text, nothing stale. If you can't read a string in the export, zoom in until you can; an unreadable string is not a safe string. Then open the page it lands on at real width and confirm nothing is cropped through a heading — the site CSS has to be 4:3 too, or a 4:3 export gets sliced.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
marketing-mockups, product-screenshots, shots-so, cdp-capture
npx claudepluginhub jackyliang/powerups --plugin powerups14 skills in this plugin
/best-practicesUse for any code change — bug fix, small feature, refactor, or improvement. Ensures TDD, clarifying questions, codebase investigation, DRY, proper branching/worktrees, UI skills, and doc updates. PDD invokes this automatically for large features./bug-fixUse when fixing a bug — enforces reproduce-first-then-fix discipline with a strict step-by-step protocol. Prevents wrong-approach loops by gating each step on success criteria./change-logUse after completing a feature or bug fix to log the change in CHANGELOG.md using plain, business-user-friendly languageOther plugins' skills for the same job