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.
npx skills add hxy91819/mason-skills --skill mobile-web-shellgit clone --depth 1 https://github.com/hxy91819/mason-skillsWrote 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.
[](https://agentmods.dev/skills/hxy91819/mason-skills/mobile-web-shell)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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。
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.
- agents/openai.yaml 417 B
- assets/templates/Caddyfile.snippet 1.6 KB
- assets/templates/e2e/keyboard-layout.spec.ts 4.1 KB runs code
- assets/templates/e2e/pwa-offline.spec.ts 7.4 KB runs code
- assets/templates/e2e/safe-area.spec.ts 2.0 KB runs code
- assets/templates/eslint-platform-boundary.mjs 2.8 KB runs code
- assets/templates/index-head.html 1.6 KB
- assets/templates/manifest.webmanifest 656 B
- assets/templates/platform/dom.ts 665 B runs code
- assets/templates/platform/keyboard-viewport.ts 3.0 KB runs code
- assets/templates/platform/navigation.ts 177 B runs code
- assets/templates/platform/network.ts 370 B runs code
- assets/templates/platform/push.ts 8.6 KB runs code
- assets/templates/platform/README.md 2.4 KB
- assets/templates/platform/route.ts 1.0 KB runs code
- assets/templates/platform/service-worker.ts 2.6 KB runs code
- assets/templates/platform/swipe-back.ts 4.1 KB runs code
- assets/templates/platform/web-chrome.ts 1.2 KB runs code
- assets/templates/README.md 2.9 KB
- assets/templates/sw.js 6.1 KB runs code
- assets/templates/vite-sw-version.mjs 1.4 KB runs code
- references/cn-distribution.md 31 KB
- references/interaction-polish.md 5.5 KB
- references/keyboard-viewport.md 6.2 KB
- references/offline-update.md 6.1 KB
- references/platform-boundary.md 7.0 KB
- references/push.md 5.1 KB
- references/pwa-shell.md 6.6 KB
- references/verification.md 5.6 KB
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.
- yesterday First seen · 148 lines · 52 tokens per session scan A 6b76e0704018
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.
mobile-web-shell compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mobile-web-shellhxy91819/mason-skills | Skill | 3 | today | MIT | A | 52 | Claude Code, Codex |
| orca-emulator-androidstablyai/orca | Skill | 119k | today | MIT | A | 102 | Claude Code, Codex |
| glance-canonical-layoutsandroid/skills | Skill | 10k | 2d ago | Apache-2.0 | A | 56 | Claude Code |
| android-tombstone-symbolicationdotnet/skills | Skill | 5.9k | today | MIT | A | 176 | Claude Code |
| dogfoodcallstack/agent-device | Skill | 5.3k | today | MIT | A | 55 | Claude Code |
| winapp-mauimicrosoft/winappCli | Skill | 1.4k | yesterday | MIT | A | 68 | Claude Code |
| app_remixrome-os/rome | Skill | 894 | yesterday | MIT | A | 50 | Claude Code, Codex |