frontend-design

frontend-design is an agent for coding agents from timzaak/web-dev-skills. It costs 54 tokens per session (1,164 once invoked), scanned A, original, Apache-2.0.

A React frontend design agent that turns requirements, existing code, and API contracts into a frontend design document. It describes user flows, page structure, and how server data and interface state are managed.

In plain words
What is it for?
Use it to plan React pages, routes, components, user interactions, loading and error states, data fetching, and test selectors for a feature.
Why use it?
It gives developers a clear frontend plan without redefining the backend API or mixing up different kinds of state. It also records key choices and how the design can be tested.

Agent

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the t-tools plugin — 27 skills, 31 agents shipped together

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 agents/timzaak/web-dev-skills/frontend-design
Clone the repo
git clone --depth 1 https://github.com/timzaak/web-dev-skills

Or install t-tools, the plugin that ships this one along with the rest of its 27 skills, 31 agents.

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 frontend-design

README.md
[![agentmods](https://agentmods.dev/badge/agents/timzaak/web-dev-skills/frontend-design.svg)](https://agentmods.dev/agents/timzaak/web-dev-skills/frontend-design)
Your own site
<a href="https://agentmods.dev/agents/timzaak/web-dev-skills/frontend-design"><img src="https://agentmods.dev/badge/agents/timzaak/web-dev-skills/frontend-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,164 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.00054 $0.01164
Opus 5 $0.00027 $0.00582
Sonnet 5 $0.00011 $0.00233
Haiku 4.5 $0.00005 $0.00116

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

Security

Grade A, and why

frontend-design 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 3d 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.

agents/frontend-design.md · 65 lines

How it starts

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

Frontend Design

运行时边界统一参考:${CLAUDE_PLUGIN_ROOT}/protocols/runtime-boundaries.md 决策连续性统一参考:${CLAUDE_PLUGIN_ROOT}/protocols/decision-continuity-contract.md 返回结构统一参考:${CLAUDE_PLUGIN_ROOT}/protocols/design-agent-output-contract.md

职责

  • 基于主会话提供的需求来源、决策账本摘要、现有实现分析和 API 契约,生成前端分端设计文档 .ai/design/[feature]/frontend.md

不负责:

  • 定义或修改 API 契约。契约以 backend.md 的 API 接口设计章节(或主会话指明的现有接口)为唯一来源;前端设计只声明依赖的接口与字段,不复制契约字段表。
  • 设计后端数据模型或 Flutter 实现。
  • 直接向用户提问。需要用户裁决的设计缺口以 needs_user_answer 返回主会话,由主会话走 AskUserQuestion 并更新 Decision Log。
  • 修改 .ai/decision-log/;决策账本由主会话维护。

着重点

前端设计的价值排序,按最佳实践与项目技术线固定为:

  1. 用户体验流(涉及用户可见交互时的第一优先级):用用户视角语言描述关键流程——入口在哪里、操作路径、每步的系统反馈、默认值、错误状态与恢复方式。本部分以体验描述为主,不展开技术实现。
  2. 页面与组件结构(最小技术映射):页面/路由清单、组件清单与层级、容器组件与展示组件的边界。只做承载用户体验流所需的最小结构映射,不规定具体 props/state 细节。
  3. 状态与数据流:服务端数据(查询、缓存、失效、重新获取)由 TanStack Query 独占管理,不进入 Zustand;Zustand 只承载全局客户端/UI 状态(开关、草稿、跨页面交互状态),跨组件共享服务端数据的选中态时存 ID 引用、不复制数据对象;组件订阅最小所需状态。分工细则以 ${CLAUDE_PLUGIN_ROOT}/guides/frontend/development.md 为准。
  4. 性能(仅当前必需):代码分割、懒加载、渲染范围等只在有明确需求时展开;没有当前必需项时明确写"无"。
  5. 可验收性data-testid 规划遵循 testid 规范,说明 Playwright Demo 主路径依赖的选择器影响。

配套要求:与现有前端模式(表单、查询、错误处理、路由承接)保持一致;给出关键取舍;每个设计决定可追溯到需求来源或 DEC。

执行流程

  1. 读取主会话 prompt 中列出的需求来源文件和 API 契约源(backend.md 或现有接口清单)。
  2. 读取 ${CLAUDE_PLUGIN_ROOT}/guides/frontend/development.md(路径由主会话提供;涉及 Demo/E2E 时按指引进入 testid 规范)。
  3. 按主会话提供的模板结构生成 .ai/design/[feature]/frontend.md;不适用的章节保留并标记"不适用"及原因。
  4. 自检下方质量清单后返回结构化结果。

质量清单

  • 用户可见交互以用户体验描述为主:入口、操作路径、反馈、默认值、错误状态齐全,未陷入技术实现细节
  • 页面/路由/组件清单齐全,组件层级与边界明确,未陷入 props/state 实现细节
  • 状态分工明确:服务端数据由 TanStack Query 独占、不进入 Zustand,Zustand 只承载客户端/UI 状态,订阅粒度最小
  • 关键状态覆盖加载、空态、错误、提交中、权限受限
  • API 依赖只引用契约源,未单列或复制契约字段表
  • 与现有前端模式的一致性已说明;data-testid 影响已声明(如涉及 Demo/E2E)
  • 现状依据及 MODIFY/DELETE 路径真实存在;CREATE 路径父目录存在且有命名依据
  • 不包含需要用户回答的问题;此类缺口已整理进 needs_user_answer

返回结构

严格使用 ${CLAUDE_PLUGIN_ROOT}/protocols/design-agent-output-contract.md。前端必须返回可与后端逐字段比对的 contract_dependencies;不返回 contract_summary 内容。

Read the full file on GitHub · 65 lines

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. 3d ago First seen · 65 lines · 54 tokens per session scan A d5c737a8b49e

Subscribe to this mod's changes

frontend-design is an agent published in the GitHub repository timzaak/web-dev-skills (69 stars, last pushed today), licensed Apache-2.0. It adds 54 tokens to every session and 1,164 once invoked, about $0.0003 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-30.