mobile-web-shell

mobile-web-shell is a skill for Claude Code, Codex from hxy91819/mason-skills. It costs 52 tokens per session (3,674 once invoked), scanned A, original, MIT.

A set of implementation guidelines for making a mobile website or progressive web app feel more like a native phone app. It covers installation, safe areas around phone controls, keyboards, offline updates, gestures, system prompts, and web push notifications.

In plain words
What is it for?
Use it when building or refining mobile web shells, home-screen installation, offline behaviour, update prompts, touch interactions, and phone notifications.
Why use it?
Mobile browsers introduce issues such as content hidden by the status bar, keyboards covering fields, and updates appearing unexpectedly. The guidelines keep browser-specific code in one platform layer instead of spreading it through the application.

Skill for Claude CodeCodex

Written for Claude Code and Codex: disable-model-invocation in frontmatter, but also agents/openai.yaml present.

Good fit Use it when building or refining mobile web shells, home-screen installation, offline behaviour, update prompts, touch interactions, and phone notifications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hxy91819/mason-skills/mobile-web-shell
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 hxy91819/mason-skills --skill mobile-web-shell
Clone the repo
git clone --depth 1 https://github.com/hxy91819/mason-skills

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-web-shell

README.md
[![agentmods](https://agentmods.dev/badge/skills/hxy91819/mason-skills/mobile-web-shell/github.svg)](https://agentmods.dev/skills/hxy91819/mason-skills/mobile-web-shell)
Your own site
<a href="https://agentmods.dev/skills/hxy91819/mason-skills/mobile-web-shell"><img src="https://agentmods.dev/badge/skills/hxy91819/mason-skills/mobile-web-shell/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-web-shell

Your own site · 80×15
<a href="https://agentmods.dev/skills/hxy91819/mason-skills/mobile-web-shell"><img src="https://agentmods.dev/badge/skills/hxy91819/mason-skills/mobile-web-shell.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,674 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.00052 $0.03674
Opus 5.5 $0.00021 $0.01470
Sonnet 5.5 $0.00010 $0.00735
Haiku 4.5 $0.00005 $0.00367

Measured yesterday against content hash 6b76e0704018, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mobile-web-shell 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 yesterday.

The scan reads SKILL.md. This mod also ships 15 executable files (assets/templates/e2e/keyboard-layout.spec.ts, assets/templates/e2e/pwa-offline.spec.ts, assets/templates/e2e/safe-area.spec.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

common-skills/mobile-web-shell/SKILL.md · 148 lines

How it starts

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

移动 Web 外壳

用户说“像 App”“去网页感”“添加到主屏幕”“键盘顶起”“离线可用”“发版后提示更新”“手机上能收到通知”时,用这套清单。也可以在新移动 H5 项目立项时按顺序落地。它处理浏览器外壳,不替代业务页面设计。

先定适配层边界

外壳能力集中在一个平台适配层(下称 src/platform/),业务页面、组件和 Store 只调用适配层函数。

  • 浏览器宿主对象只在适配层出现,且一律经 globalThis.xxx 访问。裸全局名(document、window、fetch 等)全项目禁止,适配层也不例外。
  • 用 ESLint 三层拦截:no-restricted-globals 拦裸名,no-restricted-properties 拦 globalThis.window/document/navigator/location/visualViewport/localStorage/sessionStorage/fetch/history/XMLHttpRequest,no-restricted-syntax 拦类型断言和方括号访问。src/platform/** 用 override 放行后两条。
  • 例外只按文件写进 override,并在指南里写原因。不要用别名、断言或跨层 import 绕过。
  • 适配层只提供能力,不决定“哪些页面是 Tab、顶部用什么颜色、通知文案是什么”。这些是应用外壳策略,留在应用层。

各文件职责、可复制的适配器和 ESLint 片段见 references/platform-boundary.md 与 assets/templates/。

按这个顺序做

先做用户第一眼能感知、做错会直接坏交互的部分;推送放最后,因为它依赖前面的 Service Worker 与主屏幕安装。

1. PWA 外壳

  • 提供 Web App Manifest:name、short_name、start_url、scope、display: standalone、主题/背景色、192/512 图标,以及一张留足中心安全区的 maskable 图标。
  • index.html 补齐 iOS meta、apple-touch-icon 和按“逻辑分辨率 × 像素比”匹配的竖屏启动图;新增机型时图片和 media 条件同时补齐。
  • viewport 带 viewport-fit=cover。Tab 页用自绘页头,页面根容器从视口顶端开始,内容用 env(safe-area-inset-top) 让开状态栏;子页保留框架导航栏以提供返回按钮。
  • theme-color 跟随当前页顶部:Tab 页取页面背景,子页取导航栏背景;路由变化、主题切换、浏览器前进/后退都要同步。默认值写在 HTML 里,避免首屏闪错色。
  • 系统弹窗、Toast、ActionSheet 和下拉刷新露出的画布在页面容器之外,要把整份主题色板写到文档根(data-theme + CSS 变量),不能只靠页面容器上的变量。

细节和 iOS 能力边界见 references/pwa-shell.md。

2. 键盘与视口

  • 键盘状态只有一个入口。页面需要“输入区贴住键盘”时调用统一的 composable/hook,不在业务代码里读 visualViewport、innerHeight 或 matchMedia。
  • iOS 弹键盘时布局视口不变,只缩小 visualViewport,还可能把可见区域上推 offsetTop。贴键盘布局只用可见区域坐标:top = offsetTop、height = visualViewport.height;底部被挡住的高度是 innerHeight - offsetTop - height。
  • 键盘打开时隐藏 TabBar、收起大页头,把可见区域留给内容和输入框。整页高度用 100dvh,保留 100vh 回退。
  • 普通表单优先放文档流。底部弹窗内放输入框时,用 insetBottom 把底边抬到可见区域底边,高度不超过可见高度,确认按钮留在弹窗底部;必须在 iPhone 真机验证。
  • 输入语义按内容选:时间保留文本键盘,人数用数字键盘,搜索用 inputmode="search",并用 enterkeyhint 标出“下一项/完成/搜索”。

原理、检测阈值和 --window-top 陷阱见 references/keyboard-viewport.md。

Read the full file on GitHub · 148 lines

Files

What ships with it

29 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 148 lines · 52 tokens per session scan A 6b76e0704018

Subscribe to this mod's changes

mobile-web-shell is a skill published in the GitHub repository hxy91819/mason-skills (3 stars, last pushed today), licensed MIT. It adds 52 tokens to every session and 3,674 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-11-07.

Related

mobile-web-shell compared with skills from other repositories

mobile-web-shell next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mobile-web-shellhxy91819/mason-skillsSkill3todayMITA52Claude Code, Codex
orca-emulator-androidstablyai/orcaSkill119ktodayMITA102Claude Code, Codex
glance-canonical-layoutsandroid/skillsSkill10k2d agoApache-2.0A56Claude Code
android-tombstone-symbolicationdotnet/skillsSkill5.9ktodayMITA176Claude Code
dogfoodcallstack/agent-deviceSkill5.3ktodayMITA55Claude Code
winapp-mauimicrosoft/winappCliSkill1.4kyesterdayMITA68Claude Code
app_remixrome-os/romeSkill894yesterdayMITA50Claude Code, Codex