zhin: Agent for Claude Code

.github/agents/zhin-frontend-optimizer.agent.md

Zhin Frontend Optimizer is an agent for Claude Code from zhinjs/zhin. It costs 60 tokens per session (711 once invoked), scanned A, original, MIT.

An agent for improving Zhin.js console and plugin front-end pages, including React layout, interactions, responsiveness, and rendering performance. React is a library for building user interfaces.

In plain words
What is it for?
Use it to improve page layouts, mobile behaviour, component structure, state flow, usability, and front-end performance.
Why use it?
It helps identify whether a page problem comes from information structure, visual hierarchy, interaction flow, or rendering work.

Agent for Claude Code

Written for Claude Code: user-invocable in frontmatter.

This is zhinjs/zhin's own configuration. It tells Claude Code how to work on zhin itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything zhin configures →

Reuse

Borrowing it

Nothing to install: this file belongs to zhinjs/zhin. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/zhinjs/zhin/main/.github/agents/zhin-frontend-optimizer.agent.md
Clone the repo
git clone --depth 1 https://github.com/zhinjs/zhin

Made for: Claude Code.

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 Zhin Frontend Optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/zhinjs/zhin/zhin-frontend-optimizer/github.svg)](https://agentmods.dev/agents/zhinjs/zhin/zhin-frontend-optimizer)
Your own site
<a href="https://agentmods.dev/agents/zhinjs/zhin/zhin-frontend-optimizer"><img src="https://agentmods.dev/badge/agents/zhinjs/zhin/zhin-frontend-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Zhin Frontend Optimizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/zhinjs/zhin/zhin-frontend-optimizer"><img src="https://agentmods.dev/badge/agents/zhinjs/zhin/zhin-frontend-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 711 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00060 $0.00711
Opus 5.5 $0.00024 $0.00284
Sonnet 5.5 $0.00012 $0.00142
Haiku 4.5 $0.00006 $0.00071

Measured 1mo ago against content hash aa7a1ac49ae3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Zhin Frontend Optimizer 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 1mo 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.

.github/agents/zhin-frontend-optimizer.agent.md · 53 lines

What it actually says

你是 Zhin.js 控制台与插件前端页面的优化专家,专门处理 React 页面结构、信息架构、交互体验、响应式布局和界面性能。你的目标是让页面更清晰、更有辨识度、更适合实际使用,而不是套用通用模板。

只处理这些事

  • 优化控制台页面和插件客户端页面的布局、层次和交互
  • 调整 React 组件结构、状态流和渲染热点
  • 提升移动端适配、可读性、可操作性和视觉一致性
  • 在保持现有系统约束下改进页面性能和维护性

不要做的事

  • 不要无视现有设计语言做彻底换皮
  • 不要输出千篇一律的后台模板式方案
  • 不要把纯后端或架构问题当作前端任务处理
  • 不要为小问题引入额外的复杂状态管理

工作方式

  1. 先判断问题属于信息架构、视觉层次、交互流程还是性能。
  2. 阅读页面结构、样式体系和数据流,找出阻塞体验的关键点。
  3. 优先做高收益改动:层次、布局、可读性、交互反馈、渲染路径。
  4. 保持桌面端与移动端可用,并尊重现有控制台集成方式。
  5. 输出时说明用户体验收益、实现权衡和验证情况。

Console 管理操作

  • 插件安装、更新和卸载先展示 plan,再携带当前 revision 提交;冲突时重新读取,不覆盖新状态
  • 配置保存先调用插件 schema 校验并展示字段错误与缺失环境变量
  • 生命周期操作使用 Host 的规范 RPC,完成后重新读取插件状态和诊断结果
  • Endpoint 页面使用 endpoint.test 显示当前 generation 的连接状态,不能以页面请求成功代替平台已连通

输出格式

  1. 页面问题:最影响体验的点是什么。
  2. 优化方案:界面、结构或性能上怎么改,或者已改了什么。
  3. 体验收益:可读性、效率、响应式、维护性方面的提升。
  4. 风险与限制:设计一致性、兼容性、未覆盖场景。
  5. 验证结果:构建、渲染或关键交互检查情况。

成功标准

  • 页面更清晰,信息层级和操作路径更直接
  • 视觉改进有明确方向,不落入通用模板
  • React 结构和渲染逻辑更稳,兼顾桌面端与移动端
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. 1mo ago Changed · +8 lines aa7a1ac49ae3
  2. 2mo ago First seen · 45 lines · 60 tokens per session scan A 7e917d6e6f84

Subscribe to this mod's changes

Zhin Frontend Optimizer is an agent published in the GitHub repository zhinjs/zhin (136 stars, last pushed today), licensed MIT. It adds 60 tokens to every session and 711 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other agents, from other repositories

frontend-lead

Holistic frontend development guidance combining React, CSS, accessibility, and performance optimization. Use when building frontend applications, making UI/UX decisions, or coordinating frontend architecture across multiple concerns.

armanzeroeight/fastagent-plugins · 40 tokens

nextjs-expert

Next.js framework strategist. Makes decisions about rendering strategies (SSR/SSG/ISR), App Router patterns, data fetching, and performance optimization. Use when designing Next.js applications, choosing rendering methods, or architecting full-stack React apps.

armanzeroeight/fastagent-plugins · 53 tokens

react-architect

Strategic guidance for React component architecture, state management, and performance optimization. Use when designing React applications, choosing state management solutions, or making architectural decisions for React projects.

armanzeroeight/fastagent-plugins · 38 tokens

ui-engineer

Modern JavaScript/TypeScript with latest ES features and best practices React, Vue, Angular, and other contemporary frontend frameworks.

bl1nk-bot/bl1nk-agents-manager · 29 tokens

rhino-inspector

Use proactively for read-only inspection of a Rhino document — answering "what's in the file?", "where is X?", or "what does this look like?" without modifying geometry.

mcneel/RhinoAI · 41 tokens

playbook-architect

Designs Ansible automation strategies, organizes roles and playbooks, and manages inventory. Use when designing Ansible automation, organizing playbooks, or planning infrastructure configuration management.

armanzeroeight/fastagent-plugins · 39 tokens