desktop-layout

A set of desktop web-page layout rules covering content widths, spacing, text sizes, corner rounding, buttons, icons, and narrow-screen behaviour.

In plain words
What is it for?
Use it when adding or changing desktop pages, choosing container widths, handling conversation and file views, or adapting the interface below 768 pixels wide.
Why use it?
It gives developers consistent layout choices and prevents incompatible widths, sizes, and spacing across pages.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/lawofall/agentcore/desktop-layout
Clone the repo
git clone --depth 1 https://github.com/Lawofall/AgentCore

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 519 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00519
Opus 5 $0.00000 $0.00260
Sonnet 5 $0.00000 $0.00104
Haiku 4.5 $0.00000 $0.00052

Measured yesterday against content hash 50cf50bd87ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

desktop-layout 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.

.cursor/rules/desktop-layout.mdc · 29 lines

What it actually says

桌面端布局规范

完整规格(宽度梯度、padding、字体、圆角、按钮、图标) → UI-Pattern索引.md §桌面端布局规格

速查

梯度 Tailwind 适用
content max-w-4xl mx-auto 详情、表单
canvas max-w-[1200px] mx-auto 列表、文件管理
对话页 max-w-3xl mx-auto 消息区 + 输入区(768px)
IM 会话列 max-w-[52rem] mx-auto 消息页右栏:消息区 + 输入区(832px;≠ 对话页 768px)

自有布局豁免:对话页、文件页、设置页、全屏页、消息页两栏壳不走 content/canvas 梯度。消息页右栏内走 IM 会话列。

窄屏(<768px):AppShell 收成底栏 4-tab + 对话 ☰ 抽屉 + 右坞全屏 sheet,不要把侧栏和 ≥280px 坞挤进主列。权威 → 前端技术 §五。字号仍 4 级:sm 14→16、base 16→17,xs/xl 不动(底栏、按钮、工具行保持密度);.markdown-body 必须走 token。实现 → globals.css

禁止

  • 字号:禁 text-[10px]/text-[11px]/text-[13px]/text-lg 及自定义像素值(4 级:xs/sm/base/xl)。
  • 圆角:禁 rounded-sm/rounded-md/rounded-2xl/rounded-3xl(3 级:lg/xl/full)。
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 · 29 lines · 0 tokens per session scan A 50cf50bd87ca

Subscribe to this mod's changes

desktop-layout is a cursor rule published in the GitHub repository Lawofall/AgentCore (78 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 519 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.