Skill library

Agent skill UI design

Viewports

Organize content through layout, alignment and responsive composition.

  • Responsive layout

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add raphaelsalaja/skills --skill viewports --agent claude-code --yes

Check this file in your project.claude/skills/viewports/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add raphaelsalaja/skills --skill viewports

    Select 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 route, its breakpoint definitions, and browser tools that support viewport settings and script evaluation.

View operation manual

What this skill helps with

  • Organize content through layout, alignment and responsive composition.

Good for

  • Composition and spacing
Publisher
Raphael Salaja
Shipped tools or recipes
overflow.js, stretch.js
Result
Screenshots and findings organized by viewport, breakpoint edge, and stress mode.
Skill name
viewports

Common pitfall

Avoid this prompt

Read the media queries and confirm the page works on mobile.

Breakpoint boundaries, translated text, and touch-only behavior need actual rendered evidence.

Use these steps

  1. Read project breakpoints and choose the quick or full sweep for the task.
  2. Run the measurement script at each viewport and rerun it with selected text stresses.
  3. Tap reachable controls and attach numbered screenshots to confirmed findings.

Hands-on walkthrough

Render the widths that matter to a layout change, measure overflow, and exercise stressed text and touch controls.

Render the widths that matter to a layout change, measure overflow, and exercise stressed text and touch controls.

  1. Choose the viewport matrix

    Read project breakpoints and choose the quick or full sweep for the task.

    Prompt · Step 1
    Use the Viewports skill on [settings route]. Read its CSS or token breakpoints. Evaluate the installed overflow.js once to inspect breakpoints.edges and breakpoints.unreadSheets, and add any relevant JavaScript-only breakpoints by hand. For a routine layout change, use 375, 768, and 1440px plus the closest breakpoint widths and one pixel below each. Use the source’s full sweep before release or when requested.
  2. Capture overflow and stressed text

    Run the measurement script at each viewport and rerun it with selected text stresses.

    Prompt · Step 2
    Render each chosen width, then evaluate overflow.js to capture viewport, pageOverflow, and candidate findings. At 375px, evaluate stretch.js and call window.__stretch.run("spacing"), then rerun overflow.js and take a screenshot. Test "unbreakable" when the route displays long identifiers. Capture each case separately and use window.__stretch.restore() when done.
  3. Verify touch controls and report by size

    Tap reachable controls and attach numbered screenshots to confirmed findings.

    • Each tested size includes a live render and a measurement.
    • Touch and text stress findings name their viewport and state.
    Prompt · Step 3
    With touch emulation, test [row actions and primary control] at 375px. For the full sweep open the relevant overlays at 812×375 and see whether their action controls are reachable. At each affected size, call window.__viewports.highlight() after the applicable measurement, capture evidence, and report width, height, state, rule, and measured overflow or clipping. List skipped layouts and states.

Workflow lookup

Find the local files and calls used in the walkthrough.

Read breakpoint edges and overflowIncluded
Command or reference
overflow.js · breakpoints.edges · pageOverflow
Examples
Measure both 767px and 768px for a 768px breakpoint.
Stress real textIncluded
Command or reference
window.__stretch.run("spacing") · restore()
Examples
Repeat the overflow measurement after the spacing change and restore after capturing evidence.

FAQ

Does stretch.js return layout failures?

It applies the selected text or spacing changes. Run overflow.js again and check the screenshot to confirm which failures are visible at that width.

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.