/frontend:pixel-perfectfrom frontend
Enforces a mandatory measurement workflow for CSS/HTML changes to detect pixel drift. Measures computed styles before and after edits to ensure zero pixel diff.
Ships in frontend. 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.
None: SKILL.md is the whole skill.
When making any CSS change or HTML element swap (e.g. <dl> to <ul>, <div> to <section>), follow this workflow exactly. Screenshots alone prove NOTHING about pixel parity, only measured numbers do.
Use browser_evaluate to capture exact values for every affected element:
// Capture dimensions
el.getBoundingClientRect() // width, height, x, y
// Capture computed styles — the ACTUAL rendered values, not what CSS says
getComputedStyle(el).display // may differ from your CSS (global overrides!)
getComputedStyle(el).gap
getComputedStyle(el).margin
getComputedStyle(el).padding
getComputedStyle(el).lineHeight
getComputedStyle(el).fontSize
Store these numbers. Report them. They are your baseline.
Global styles, resets, and browser defaults frequently override scoped CSS. A <dl> might render as display: grid; gap: 16px even though scoped CSS says display: flex; gap: 8px. Never assume, always measure.
Edit the HTML/CSS.
Navigate to the same page. Measure the same elements with browser_evaluate. Report the numbers side by side.
After git stash pop, git checkout, or file restoration, the dev server may serve stale CSS. Touch the file (touch path/to/file) and hard-reload before measuring.
Report a table:
| Metric | Before | After | Diff |
| -------------- | ------ | ----- | ---- |
| footer height | 396px | 396px | 0 |
| section height | 98px | 98px | 0 |
If any measurement differs by even 1px:
| Trap | Example | Fix |
|---|---|---|
| Browser default margins | <ul> has margin: 0 0 16px, <dl> has margin: 1em 0 | Explicitly reset margin: 0 |
| Browser default padding | <ul> has padding-left: 40px | Explicitly reset padding: 0 |
| Default line-height | <li> gets line-height: 1.5 from UA stylesheet | Set line-height: 1 or match original |
| Global CSS overrides | A global dl { display: grid } overrides scoped display: flex | Measure computed styles BEFORE changing elements |
| Scoped CSS not matching | Changed & dl to & ul but Astro scoping attrs differ | Touch file + reload to force CSS rebuild |
What SKILL.md sets; muted values are Claude Code's defaults
13 skills in this plugin
/code-styleCode style rules for all languages: variable naming, brace style, HTML data attributes, markup, forms and locale formatting, CSS nesting. Auto-invoke when editing code files, writing new functions or markup, or naming variables./code-style-cssUse when editing CSS, SCSS, or style blocks in .svelte files. Covers CSS-specific code style rules. Auto-invoke when writing or modifying styles./commentsComment rules for every language: which comments survive, format, protected comments, placement, TODOs. Use when writing, editing, moving or deleting comments, docstrings or TODOs. Auto-invoke when editing code files.npx claudepluginhub fubits1/svelte-skills --plugin frontendOther plugins' skills for the same job