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 agentmods add rules/lawofall/agentcore/cross-platform-frontendgit clone --depth 1 https://github.com/Lawofall/AgentCoreWhat 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 | $0.00000 | $0.00701 |
| Opus 5 | $0.00000 | $0.00351 |
| Sonnet 5 | $0.00000 | $0.00140 |
| Haiku 4.5 | $0.00000 | $0.00070 |
Grade A, and why
cross-platform-frontend 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 2d 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.
What it actually says
前端跨端架构(产品页单树 + 壳自适应)
桌面 + 窄屏 / Capacitor 是同一产品:窄屏 = 桌面 − 物理做不到的能力层。实现策略 = 产品页走桌面 renderer 一棵树,壳随宽度变,能力按 capabilities.ts 减。 权威蓝图 → 前端技术与架构.md §五 客户端架构(桌面 + 手机);原生壳 / 商店余项 → 产品路线图摘要(详细提案不在公开仓 / 维护者本地)。
结构
apps/desktop/ 唯一产品页树(对话 / 文件 / IM / 设置 / 登录)+ AppShell 宽/窄
apps/mobile/ Capacitor 壳(webDir = desktop dist-web);旧 SPA / fold 已清
packages/ protocol-conformance + contract-types + design-tokens + protocol-fold-kit
硬规则
- 产品页不另写——对话 / 文件 / IM / 设置 / 登录禁止在
apps/mobile再做一套业务实现。窄屏改AppShell+ 页面响应式,不新建 ChatPage。 - 壳自适应、不是缩桌面——宽屏侧栏 + 右坞;窄屏(<768px)底栏 4-tab + ☰ 会话抽屉 + 右坞全屏 sheet。禁把侧栏和 ≥280px 坞原样挤进 390px。禁再养一套长期
TabLayout。 - 能力减法——禁
if (platform === "mobile")开产品叉。本机盘 / sidecar / MCP / 热键走capabilities.ts(与生产 web 同一套)。窄屏不上工具箱 / 白板 / 手册 / 站立任务。 - fold 一套——生产 fold 只留桌面。改 fold 必过
pnpm conformance(见protocol-conformance.mdc)。契约只走后端单一源。 - 主题——窄屏 / Capacitor 仅浅色;宽屏可暗色。
分步
产品改动只落桌面树。pnpm conformance 只跑桌面。浏览器窄屏走 app.;独立 m. 站已下线。
否决各端全新建一套业务页 → 前端技术 §五 客户端架构(桌面 + 手机)。
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.
- 2d ago First seen · 35 lines · 0 tokens per session scan A 63ec6045ed87
cross-platform-frontend is a cursor rule published in the GitHub repository Lawofall/AgentCore (78 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 701 tokens. 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-08-30.
Other cursor rules, from other repositories
project-overview
Core project architecture, patterns, and conventions for the AI Documentation Generator.
code-patterns
Python code style and recurring patterns (config, logging, errors, paths).
mobile-responsive
Mobile responsiveness patterns — breakpoints, navbar collapse, scrollable tabs, CSS conventions.
swift-argument-parser
Documentation and usage patterns for Swift Argument Parser for command-line tools.
react_hooks
React Hooks best practices for frontend package.
xcf-quickref
Cursor rule "xcf-quickref" from CodeFreezeAI/xcf, covering xcf quick reference guide 🚀, 🎛️ xcf core actions, permissions & project management, build & execute and system & analysis.