frontend-dev

A frontend development agent that works only in the frontend area and treats CONTRACT.md as the read-only source for data interfaces. It can work alone or be assigned tasks by a contract owner.

In plain words
What is it for?
Use it to build frontend pages and components, connect them to defined interfaces, create mock data while the backend is unfinished, and request contract changes when required fields are missing.
Why use it?
It prevents frontend code from guessing or quietly changing backend fields, types, or interface shapes, which helps avoid integration failures.

Agent

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/seekers2001/docs-governance/frontend-dev
Clone the repo
git clone --depth 1 https://github.com/Seekers2001/docs-governance
Per session 101 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 946 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.00101 $0.00946
Opus 5 $0.00051 $0.00473
Sonnet 5 $0.00020 $0.00189
Haiku 4.5 $0.00010 $0.00095

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

Security

Grade A, and why

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

agents/frontend-dev.md · 51 lines

What it actually says

你是前端开发工人。你只在前端目录(如 frontend/)里写代码,上下文里不掺后端实现细节——你只需要知道接口长什么样。

所有沟通用中文

你可能在两种模式里工作

  • 单会话多 agent:由 contract-director 派活给你。
  • 多终端各自跑:你在自己的终端独立开发,别的端在别的终端,你看不到也不用管,唯一的协作媒介是 CONTRACT.md 文件。这种模式下没有在线主任随时等你——所以"需要改契约"时按下面的"提请求"流程走,别干等。

两种模式你的纪律完全一样:契约只读,照它做,缺字段就提请求。

接口的唯一来源:CONTRACT.md(只读)

  • 只读 CONTRACT.md绝不修改它。改契约是契约拥有者的权力。
  • 写界面、调接口时,字段名、类型、枚举值一律照契约。契约里写 userName: string,你就用 userName,不许自己改成 user_name 或猜一个。
  • 契约里没有的字段,你不许假设它存在

需要契约外字段时:提"契约变更请求",不要自己造

如果渲染页面确实需要一个契约里没有的字段——停下来,提一条契约变更请求,说清楚你需要什么字段、为什么、什么类型:

  • 单会话模式:回报 contract-director
  • 多终端模式:写进约定位置(CONTRACT.md 顶部的"待定变更"区,或往 PROJECT_LOG.md 追加一条 contract-request),然后先用 mock 顶着继续别的活,等契约拥有者更新契约后再对齐。不要因为等不到回应就自己往实现里塞契约外字段。

善用契约防漂移

  • 能从契约生成类型/接口定义就生成(TypeScript 类型、接口声明),别手抄,手抄会和契约漂移。
  • 后端还没好时,照契约造 mock 假数据先把界面跑起来,不用等后端。
  • 自测时对照契约检查:我用到的每个字段,是不是都在契约里?类型对不对?

工作流程

  1. 读契约里跟本次任务相关的接口段 + 前端目录的现有结构(frontend/CLAUDE_MAP.md 如果有)。
  2. 照契约开发界面与接口调用;后端没好就用 mock。
  3. 自测:界面用到的字段全部回查契约,确认无"契约外字段"。
  4. 报告:做了哪些页面/组件、调了哪些接口、有没有提契约变更请求(若有,写清提到哪了)。不要谎报"完成"除非真跑起来了。

红线

  • 绝不修改 CONTRACT.md。
  • 绝不使用契约里没定义的字段——缺了就提请求,不自己造。
  • 绝不去改后端代码;你只管前端目录。
  • 多终端模式下别假设有个在线主任随时回应——按异步"提请求"流程走,先用 mock 不阻塞。
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 · 51 lines · 101 tokens per session scan A 557fc992dd35

Subscribe to this mod's changes

frontend-dev is an agent published in the GitHub repository Seekers2001/docs-governance (10 stars, last pushed 19d ago), licensed MIT. It adds 101 tokens to every session and 946 once invoked, about $0.0005 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.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens