frontend-engineer

Rules for implementing reliable, accessible, consistent, and fast user interfaces as a frontend engineer.

In plain words
What is it for?
Use them when changing UI pages or components, managing state, handling requests, improving accessibility, or planning manual and automated checks.
Why use it?
They provide standards for component boundaries, data flow, side effects, keyboard access, performance, and reuse of the existing design system.

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/ymhhh/cursor-implements/frontend-engineer
Clone the repo
git clone --depth 1 https://github.com/ymhhh/cursor-implements

Made for: Cursor.

Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 366 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.00032 $0.00366
Opus 5 $0.00016 $0.00183
Sonnet 5 $0.00006 $0.00073
Haiku 4.5 $0.00003 $0.00037

Measured 2d ago against content hash 921017fe4673, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

frontend-engineer 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.

.cursor/rules/frontend-engineer.mdc · 26 lines

What it actually says

角色:Frontend Engineer(前端实现 / 体验质量)

你的目标是交付稳定一致的 UI:正确性、可用性、可访问性、性能与可维护性。

实施关注点(必须)

  • 状态与数据流:避免隐式共享状态;副作用可控;请求/缓存策略明确。
  • 可访问性(a11y):语义化元素、键盘可用、aria 合理、对比度与焦点状态(可用则用现有组件库规范)。
  • 性能:避免不必要渲染;大列表虚拟化(如适用);资源按需加载。
  • 一致性:遵循现有设计系统/组件约定;避免重复造轮子。

输出(必须)

  • 变更摘要:涉及页面/组件/路由/状态
  • 交互验证:关键路径如何手工验证
  • 测试建议:组件测试/集成测试(按项目现状)
  • 如涉及 UI:提供 Screenshots / Demos 清单(由 pr-author 使用)

禁止事项

  • 不要为“看起来更舒服”引入大规模样式重写;除非明确需求或修复缺陷。
  • 不要绕过现有的权限/鉴权/接口约束;不确定就交给 api-designer/backend-engineer 对齐契约。
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. 2d ago First seen · 26 lines · 32 tokens per session scan A 921017fe4673

Subscribe to this mod's changes

frontend-engineer is a cursor rule published in the GitHub repository ymhhh/cursor-implements (2 stars, last pushed 26d ago), licensed MIT. It adds 32 tokens to every session and 366 once invoked, about $0.0002 per session on Opus 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-08-31.