- Home
- Skills
- Frontend & Web Apps
- responsive ui debug
Works with the AI Agents you already use
responsive ui debug
Diagnose and fix horizontal overflow, broken flexbox layouts, and mobile viewport bugs using measurement-based scripts.
$5
responsive ui debug
Example session with this skill installed
The mobile version of index.html is scrolling sideways. Can you find what's causing the overflow and fix it?
- Read your context and instructions
- Compiled the responsive ui debug
- Generated the design tokens stylesheet
I have diagnosed the horizontal overflow in index.html. Using the diagnostic script, I identified that a grid container was propping the page open to 491px on a 390px viewport because of a long URL in a child element.
Diagnostic Results
| Viewport | Element | Width | Overlap |
|---|---|---|---|
| 390px | main.content-wrapper | 491px | +101px |
| 390px | span.user-bio-link | 480px | +90px |
The main element is the outermost culprit. It uses display: grid with 1fr tracks, which defaults to minmax(auto, 1fr). The long URL inside the bio link is preventing the grid track from shrinking.
Applied Fixes
/* Optimized grid track to allow shrinkage */
.content-wrapper {
display: grid;
grid-template-columns: minmax(0, 1fr);
}
/* Force long URLs to wrap and allow container to shrink */
.user-bio-link {
display: block;
width: 100%;
min-width: 0;
word-break: break-all;
}
I re-ran the diagnostic tool at 390px, 768px, and 1440px widths. All tests passed with 0px horizontal overflow.
Next steps
- Verify the
word-breakappearance on the bio link to ensure it meets design standards. - Check if other grid containers in
dashboard.htmlrequire similarminmax(0, 1fr)safety nets.
index.html
CSS · design tokens
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop guessing why your layouts break on mobile. This skill provides a measurement-first workflow for identifying and fixing responsive UI bugs, specifically targeting horizontal overflow, disappearing gutters, and layout shifts. It replaces visual guesswork with data-driven diagnostics to find the exact DOM element propping a container open.
What it does
- Horizontal overflow detection identifying elements wider than the viewport that cause sideways scrolling.
- Interaction-based debugging triggering clicks on UI components to find layout breaks that only appear in specific states.
- Grid and flex repair applying
min-widthandminmaxcorrections to prevent containers from resisting shrinkage. - Typography constraints fixing unbreakable strings and long URLs that force containers to expand.
- Spacing audits resolving shorthand property collisions that cause side padding to disappear.
How it works
- Run diagnostics using
scripts/diagnose.pyto render the page at multiple viewport widths and list the specific overflow culprits. - Reproduce interactions by passing selectors to the diagnostic tool to check for layout regressions during state changes.
- Apply targeted fixes based on the measurement data, focusing on the outermost offending parent element.
- Verify the fix by re-running the diagnostic script to ensure the exit code is clean before committing code.
Frameworks & tools
Works with any HTML/CSS stack, including React, Vue, Tailwind, and static sites. Uses Playwright for headless browser rendering and DOM measurement.
Why this beats prompting it yourself
Generic prompts often result in the LLM suggesting overflow-x: hidden as a band-aid. This skill enforces a "measure before touching" rule, ensuring you fix the root cause (like flexbox intrinsic sizing) instead of hiding the symptoms.
Use cases
- Fix pages that scroll sideways on iPhone but look fine on desktop.
- Debug cards that overflow only after a "read more" button is clicked.
- Restore missing side margins caused by CSS shorthand overrides.
- Cap line lengths for better readability on ultra-wide monitors.
Known limitations
Requires Playwright and Chromium to be installed in the environment. It cannot diagnose bugs that only occur on physical device hardware sensors or specific legacy mobile browsers.
Requires Playwright and Chromium for measurements. Cannot diagnose hardware-specific mobile sensor bugs or legacy IE layout issues.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 27 days ago
Requires
Permissions
What it does: Diagnoses and fixes responsive layout bugs in HTML/CSS pages — horizontal overflow, broken mobile/desktop layouts, bugs that only appear after an interaction, and side padding that silently disappears — by measuring the actual rendered page instead of reasoning about CSS blind. How it works: Runs scripts/diagnose.py (Playwright) to render the page at several widths, detect horizontal overflow, and name the specific outermost offending element — optionally clicking through interactive states one at a time to catch bugs that only surface after a selection. Matches the culprit to one of several documented recurring causes (grid/flex children that won't shrink, unbreakable long strings, form controls with intrinsic HTML-attribute widths, padding shorthand clobbering long-hand values, unbounded text measure on desktop), applies the single matching fix, then re-runs the diagnostic to confirm before considering it done — the script's exit code doubles as a pass/fail regression check. Guardrails: Never guesses from the stylesheet without measuring first. Fixes the outermost culprit, not whatever inner element happens to visually break. Never calls the fix complete without re-measuring — overflow-x: hidden as a bare backstop is explicitly flagged as hiding the symptom, not fixing it.