everything-claude-code-zh: Skill for Claude Code

.agents/skills/frontend-patterns/SKILL.md

frontend-patterns is a skill for Claude Code, Codex from xu-xiang/everything-claude-code-zh. It costs 32 tokens per session (3,937 once invoked), scanned A, original, MIT.

A collection of front-end development patterns for React and Next.js, tools for building web interfaces and applications with JavaScript or TypeScript.

In plain words
What is it for?
Use it when designing React components, managing application state, fetching data, building forms, handling navigation, or improving the speed and accessibility of a user interface.
Why use it?
It provides guidance for common interface problems such as component structure, shared state, data loading, forms, routing, accessibility, responsiveness, and performance.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

This is xu-xiang/everything-claude-code-zh's own configuration. It tells Claude Code and Codex how to work on everything-claude-code-zh 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 everything-claude-code-zh configures →

Part of the everything-claude-code-zh plugin — 17 skills, 26 commands, 13 agents shipped together

About the project

everything-claude-code-zh is a Chinese translation of a collection of configurations for Claude Code and other AI coding agents. It provides agents, skills, hooks, commands, rules, and MCP configurations intended to support development workflows such as memory persistence, security scanning, evaluation, and research-first work. The catalogue includes commands, skills, agents, instructions, and a plugin from this configuration set.

xu-xiang/everything-claude-code-zh · 1,933 stars · on GitHub · oneskill.one

Reuse

Borrowing it

Nothing to install: this file belongs to xu-xiang/everything-claude-code-zh. 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/xu-xiang/everything-claude-code-zh/main/.agents/skills/frontend-patterns/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/xu-xiang/everything-claude-code-zh

Made for: Claude Code, Codex.

Or install everything-claude-code-zh, the plugin that ships this one along with the rest of its 17 skills, 26 commands, 13 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-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/xu-xiang/everything-claude-code-zh/frontend-patterns.svg)](https://agentmods.dev/skills/xu-xiang/everything-claude-code-zh/frontend-patterns)
Your own site
<a href="https://agentmods.dev/skills/xu-xiang/everything-claude-code-zh/frontend-patterns"><img src="https://agentmods.dev/badge/skills/xu-xiang/everything-claude-code-zh/frontend-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,937 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00032 $0.03937
Opus 5 $0.00016 $0.01969
Sonnet 5 $0.00006 $0.00787
Haiku 4.5 $0.00003 $0.00394

Measured 7d ago against content hash 630645e28d6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

frontend-patterns scanned grade A with 1 finding 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 7d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

fetch(url)
.agents/skills/frontend-patterns/SKILL.md · 643 lines

How it starts

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

前端开发模式 (Frontend Development Patterns)

适用于 React、Next.js 和高性能用户界面的现代前端模式。

何时激活 (When to Activate)

  • 构建 React 组件(组合、Props、渲染)时
  • 管理状态(useState、useReducer、Zustand、Context)时
  • 实现数据获取(SWR、React Query、服务端组件)时
  • 优化性能(记忆化、虚拟化、代码分割)时
  • 处理表单(验证、受控输入、Zod 模式)时
  • 处理客户端路由和导航时
  • 构建具备可访问性(Accessible)且响应式的 UI 模式时

组件模式 (Component Patterns)

组合优于继承 (Composition Over Inheritance)

// ✅ 推荐:组件组合 (Component composition)
interface CardProps {
  children: React.ReactNode
  variant?: 'default' | 'outlined'
}

export function Card({ children, variant = 'default' }: CardProps) {
  return <div className={`card card-${variant}`}>{children}</div>
}

export function CardHeader({ children }: { children: React.ReactNode }) {
  return <div className="card-header">{children}</div>
}

export function CardBody({ children }: { children: React.ReactNode }) {
  return <div className="card-body">{children}</div>
}

// 使用示例
<Card>
  <CardHeader>标题</CardHeader>
  <CardBody>内容</CardBody>
</Card>

复合组件 (Compound Components)

interface TabsContextValue {
  activeTab: string
  setActiveTab: (tab: string) => void
}

const TabsContext = createContext<TabsContextValue | undefined>(undefined)

export function Tabs({ children, defaultTab }: {
  children: React.ReactNode
  defaultTab: string
}) {
  const [activeTab, setActiveTab] = useState(defaultTab)

  return (
    <TabsContext.Provider value={{ activeTab, setActiveTab }}>
      {children}
    </TabsContext.Provider>
  )
}

export function TabList({ children }: { children: React.ReactNode }) {
  return <div className="tab-list">{children}</div>
}

export function Tab({ id, children }: { id: string, children: React.ReactNode }) {
  const context = useContext(TabsContext)
  if (!context) throw new Error('Tab 必须在 Tabs 内部使用')

  return (
    <button
      className={context.activeTab === id ? 'active' : ''}
      onClick={() => context.setActiveTab(id)}
    >
      {children}
    </button>
  )
}

// 使用示例
<Tabs defaultTab="overview">
  <TabList>
    <Tab id="overview">概览</Tab>
    <Tab id="details">详情</Tab>
  </TabList>
</Tabs>

Read the full file on GitHub · 643 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 643 lines · 32 tokens per session scan A 630645e28d6b

Subscribe to this mod's changes

frontend-patterns is a skill published in the GitHub repository xu-xiang/everything-claude-code-zh (1,933 stars, last pushed 6mo ago), licensed MIT. It adds 32 tokens to every session and 3,937 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ui-design

Designs and builds React/Next/Tailwind UI and audits visual and interaction defects. Use when asked to "build a landing page", "extract our design system", "add dark mode", "make this responsive", "remove UI slop", or "audit this component". For product decisions use product-design; for browser measurements use…

mblode/agent-skills · 80 tokens

scaffold-nextjs

Scaffolds a Next.js turborepo with Blode UI, icons, Ultracite, workspace hooks, and GitHub/Vercel setup. Use when asked to "create a Next.js project", "bootstrap a turborepo", or "start a new web app". For a page in an existing app use ui-design; for a CLI use scaffold-cli.

mblode/agent-skills · 80 tokens

frontend-code-review

Trigger when the user requests a review of frontend files (e.g., .tsx, .ts, .js). Support both pending-change reviews and focused file reviews while applying the checklist rules.

sangrokjung/claude-forge · 42 tokens

optimise-seo

Implements Next.js crawlability, metadata, canonicals, status codes, JSON-LD, hreflang, and crawler policy with served-page evidence. Use when asked to "fix SEO", "add a sitemap", "fix soft 404s", or "add llms.txt". For demand research, briefs, or Search Console monitoring use seo-program.

mblode/agent-skills · 77 tokens

ui-animation

Builds, reviews, and measures UI motion, including springs, gestures, scroll effects, and curve fitting from recordings. Use when asked to "add animation", "match this easing", "reverse engineer this motion", or find animation opportunities. For action semantics use product-design; for visual layout use ui-design.

mblode/agent-skills · 65 tokens

typography-audit

Audits font loading, type scales, measure, spacing, OpenType, and rendered punctuation with 78 scoped rules. Use when asked to "audit typography", "fix the fonts", or "review my type system". For a new visual direction use ui-design Direction; for general UI defects use ui-design Audit.

mblode/agent-skills · 68 tokens