/skills:test-ui-worst-casefrom skills
Stress-tests UI components with worst-case real data (long text, missing fields, edge cases) at phone and desktop widths, measures overflow and breakage, then fixes the component without altering the data.
Ships in skills. 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.
Demo data is written to look good. Real data has a 40-letter surname, an email with no place to break, no avatar, zero rows and a count in the millions. A component is done when it survives those.
Read the component and where its data comes from: each field, its type, whether it can be missing, and what the person does in it (a button, a link). Note the widths the project supports; with none stated, use 390 and 1280.
Pick only what the field can really receive:
averyveryverylong…@example.com), right-to-left text, emojinull, an empty stringWrite them as one or more data files in the component's own format, next to the demo data. Keep the demo data unchanged.
Load the real component with each data set at both widths, in a headless browser (Playwright). Measure, don't eyeball:
// inside page.evaluate, for each card or row element `el`
const box = el.getBoundingClientRect();
const over = [...el.querySelectorAll('*')].filter((c) => c.getBoundingClientRect().right > box.right + 1);
const pageScroll = document.documentElement.scrollWidth > innerWidth;
const broken = [...document.images].filter((i) => i.complete && i.naturalWidth === 0);
const words = document.body.innerText.match(/\b(?:undefined|null|NaN)\b|\[object Object\]/g);
Also check plurals ("1 tasks"), number formatting, an empty list that shows nothing, and a button pushed out of view. Take a screenshot of each failing case. Every failure goes on a list with its data set and width.
Fix in the component and its styles, never by trimming the data:
min-width: 0 on flex children, then wrap (overflow-wrap: anywhere for emails and URLs) or truncate with the full value in title; keep actions on screenerrorundefinedIntl.NumberFormat and Intl.PluralRules, or the project's own helpersChange only what a measured failure needs; keep the component's look with the demo data.
Rerun every data set at both widths, plus the demo data. All checks from step 3 must pass, and the demo must look as before. Leave the worst-case data files and the script in the repo if it has a place for tests.
Copybook's notes for the agent:
Based on emilkowalski/skills (MIT), rewritten by Copybook.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ui-testing, edge-cases, stress-test, responsive-testing, component-fix
npx claudepluginhub heyvhuang/copybook-skills --plugin skills24 skills in this plugin
/add-pre-commit-checksUse when asked to add pre-commit hooks, set up Husky or lint-staged, stop bad commits, or run Prettier and type checks on commit. Sets up a pre-commit hook that formats staged files, type-checks with the project config, and runs related tests, proven by blocked and fast commits. Not for picking a test set for a change (run-affected-tests)./build-throwaway-prototypeUse when asked to prototype, spike, try an idea out quickly, sanity-check a state model or logic, or mock up what a UI should look like. Builds a throwaway prototype that answers one named design question from one command or one HTML file while leaving production code untouched. Not for building a finished production page (design-web-page)./Other plugins' skills for the same job