mobile-viewport-overflow

mobile-viewport-overflow is a skill for Claude Code, Codex from BrentFarris/echo. It costs 38 tokens per session (702 once invoked), scanned A, original, MIT.

A guide to finding and preventing a mobile web page from becoming wider than the phone screen because of misplaced absolutely positioned elements.

In plain words
What is it for?
Use it to diagnose and fix viewport overflow in the Echo single-page app, especially around mobile navigation badges.
Why use it?
It explains why the page can scroll sideways or appear zoomed out, including how CSS overflow and containing blocks interact.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to diagnose and fix viewport overflow in the Echo single-page app, especially around mobile navigation badges.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/brentfarris/echo/mobile-viewport-overflow
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add BrentFarris/echo --skill mobile-viewport-overflow
Clone the repo
git clone --depth 1 https://github.com/BrentFarris/echo

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mobile-viewport-overflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/brentfarris/echo/mobile-viewport-overflow/github.svg)](https://agentmods.dev/skills/brentfarris/echo/mobile-viewport-overflow)
Your own site
<a href="https://agentmods.dev/skills/brentfarris/echo/mobile-viewport-overflow"><img src="https://agentmods.dev/badge/skills/brentfarris/echo/mobile-viewport-overflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mobile-viewport-overflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/brentfarris/echo/mobile-viewport-overflow"><img src="https://agentmods.dev/badge/skills/brentfarris/echo/mobile-viewport-overflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 702 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00702
Opus 5.5 $0.00015 $0.00281
Sonnet 5.5 $0.00008 $0.00140
Haiku 4.5 $0.00004 $0.00070

Measured 4d ago against content hash e8eecba74cab, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mobile-viewport-overflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.echo/skills/mobile-viewport-overflow/SKILL.md · 31 lines

How it starts

The opening of the file, as written. The whole thing — 31 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mobile viewport overflow in the Echo SPA

Symptom

On phones the whole page can scroll/pan down and right past the app, which renders smaller than the screen with empty space around it. A stray plugin count badge may float at the screen edge.

Root cause chain

  1. .mobile-nav-tabs (in web/css/app.css, @media (max-width: 720px)) is the horizontal scroller for the mobile nav tabs. Its content (.tabsScrollW ≈ 400-450px) routinely exceeds its width (~222px), so later tabs sit beyond the right edge, clipped.
  2. Any position: absolute decoration inside those tabs (e.g. .plugin-count, which has no top/left and relies on static position) resolves its containing block to the nearest positioned ancestor. .mobile-nav-tab had no position, so the containing block was .mobile-bottom-nav (position: relative) — an ancestor OUTSIDE the .mobile-nav-tabs scroller. Per CSS overflow rules, an abspos element whose containing block is an ancestor of a scroller is NOT clipped by that scroller.
  3. The badge therefore renders past the nav's right edge and widens the document (e.g. 459px vs 360px viewport).
  4. Mobile Chrome shrink-to-fit then zooms the layout viewport out to the document width (innerWidth becomes 459), so the app lays out at 360px inside a 459px viewport: pannable empty space right/bottom, everything looking "smaller than the screen".

Rule

Any absolutely-positioned badge/pin inside a scroll-clipped container must have its nearest positioned ancestor INSIDE that container. Fixed by adding position: relative to .mobile-nav-tab (app.css mobile block).

The same rule applies to .mobile-nav-pill, .plugin-notice, and any future decorations in .mobile-nav-tabs or other overflow containers.

Debugging technique

Reproduce with an isolated instance (no auth risk to the user's data): build the Go binary (embeds web/dist — run npm run build in web/ FIRST or you verify stale CSS), run it with -port=<free> -data=<temp>/echo.json, drive with Playwright chromium at viewport 360x800, isMobile: true, hasTouch: true, complete setup, create a workspace + stage/approve a builtin plugin (POST /api/plugins/stages {source:{type:"builtin",builtin:"notes"}} then POST /api/plugins/stages/{id}/approve {scope:"global",enable:true}), then evaluate document.documentElement.scrollWidth/scrollHeight vs innerWidth/innerHeight. innerWidth GROWING beyond the viewport width is the shrink-to-fit signature; scan all elements for rects past the viewport to find offenders (skip position: fixed, ignore elements clipped by an ancestor scroller).

Read the full file on GitHub · 31 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 31 lines · 38 tokens per session scan A e8eecba74cab

Subscribe to this mod's changes

mobile-viewport-overflow is a skill published in the GitHub repository BrentFarris/echo (11 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 702 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-12.

Related

Other skills, from other repositories

Webdesign

Design and integrate web interfaces via three paths: DirectDesign (write design inline with Anthropic frontend-design philosophy — the default workhorse), native /design + /design-sync Claude Code commands (preferred for code integration and design-system sync), or ClaudeDesign (drive claude.ai/design through…

danielmiessler/LifeOS · 134 tokens

sn-motion-html

Build continuous-shot motion-driven HTML stories from a subject or narrative, including research, story structure, consistent AI stills, Seedance scene and connector clips, interface styling, media normalization, and browser QA. Use for immersive journeys, timelines, product stories, fictional worlds, or other…

OpenSenseNova/SenseNova-Skills · 84 tokens

claude_code_delegation

Delegate coding, review, and refactor tasks to Claude Code CLI through Row-Bot's approval-gated shell workflow.

siddsachar/row-bot · 31 tokens

ui-html-renderer

Use this specialist for unusually complex stateful HTML, blank/runtime-risk repair, strict source-to-HTML fidelity, reusable component galleries, brand boards, or detailed implementation handoff. Ordinary single-page HTML uses ui-design-executor, which already preserves HTML-default delivery and baseline…

Orkas-AI/Orkas · 4 tokens

product-ui

Use this skill when UI design and UI implementation should happen together. It turns product context into usable frontend screens, components, layout decisions, design-system choices, accessibility rules, and visual polish.

Orkas-AI/Orkas · 2 tokens

developer_coding

Structured workflow for implementing code changes in a conversation's code folder.

siddsachar/row-bot · 17 tokens