Agent skill UI design
Alignment
Organize content through layout, alignment and responsive composition.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add raphaelsalaja/skills --skill alignment --agent claude-code --yesCheck this file in your project.claude/skills/alignment/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add raphaelsalaja/skills --skill alignmentSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. A running page, its spacing tokens, and browser tools that support script evaluation and 2× screenshots.
View operation manualWhat this skill helps with
- Organize content through layout, alignment and responsive composition.
Good for
- Composition and spacing
- Publisher
- Raphael Salaja
- Shipped tools or recipes
- measure.js, report.html
- Result
- A numbered local alignment report with measurement overlays and crops.
- Skill name
alignment- Repository
raphaelsalaja/skills
Common pitfall
Avoid this prompt
The heading looks a little off. Correct all the padding.
Visual judgment alone leaves the actual offset and the component responsible for it unidentified.
Use these steps
- Choose the viewport and states and read the project’s spacing scale.
- Evaluate the installed script and confirm the suspect positions in screenshot crops.
- Use the shipped report template and match each finding to its screenshot overlay.
Hands-on walkthrough
Measure the rendered page and collect visual proof for each reported mismatch.
Measure the rendered page and collect visual proof for each reported mismatch.
Open the real page
Choose the viewport and states and read the project’s spacing scale.
Prompt · Step 1Use the Alignment skill on [billing route and state]. Open the running page at its intended viewport with device scale factor 2. Record the state, theme, and spacing scale from project tokens. Take a 2× screenshot after the relevant text and icons have loaded.Measure candidates
Evaluate the installed script and confirm the suspect positions in screenshot crops.
Prompt · Step 2Set window.__alignmentOptions = { scale } using the project’s numeric spacing values. Pass the installed measure.js contents to page.evaluate or the browser’s evaluation tool. For each candidate, check its rectangle and measured values against the 2× screenshot. Record CSS px separately from physical screenshot pixels. Inspect the price and billing interval baseline, and judge visual weight at normal zoom.Open the annotated report
Use the shipped report template and match each finding to its screenshot overlay.
- Overlays and crops match the right scale and state.
- Every finding has a rule, a measured value or visual observation, and a rectangle.
Prompt · Step 3Copy the installed report.html into an ignored local .alignment/<page>/index.html. Save the 2× screenshot there and write report.js using the template’s window.report schema. Open it and check that each item has a numbered rectangle, readable crop, and rule ID. Include CSS px values for measured rules and a visual explanation for weight. List surfaces you could not verify.
Workflow lookup
Find the local files and calls used in the walkthrough.
Read the rendered spacingIncluded
- Command or reference
measure.js · window.__alignmentOptions- Examples
- Pass your real token scale and inspect the returned findings.
Save the 2× proofIncluded
- Command or reference
report.html · report.js- Examples
- Place the screenshot beside the template and match the schema’s scale and viewport fields.
FAQ
How do I count a 2× screenshot offset?
An offset of four physical screenshot pixels at device scale factor 2 corresponds to two CSS pixels. Report the CSS measurement and keep the crop for visual proof.
Where are the installed files?
Open the project skill directory reported by the installer. The files referenced by this walkthrough sit alongside the skill’s SKILL.md.