前端编码

前端编码 is a skill for Claude Code, Codex from jianchen08/Agent-os-open. It costs 58 tokens per session (2,211 once invoked), scanned A, original, Apache-2.0.

A front-end coding guide for building components, styles, state handling, API calls, design-system integrations, and browser-based end-to-end tests. A design system is a project's shared set of visual rules and reusable interface parts.

In plain words
What is it for?
Use it for front-end or full-stack work. It guides component structure, props and events, design-token usage, API integration, and Playwright browser tests.
Why use it?
It helps new interface code match the existing project and sets consistent rules for naming, styling, behavior, and testing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for front-end or full-stack work. It guides component structure, props and events, design-token usage, API integration, and Playwright browser tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jianchen08/agent-os-open/code-frontend
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.

Any agent
npx skills add jianchen08/Agent-os-open --skill code-frontend
Clone the repo
git clone --depth 1 https://github.com/jianchen08/Agent-os-open

Made for: Claude Code, Codex.

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 前端编码

README.md
[![agentmods](https://agentmods.dev/badge/skills/jianchen08/agent-os-open/code-frontend/github.svg)](https://agentmods.dev/skills/jianchen08/agent-os-open/code-frontend)
Your own site
<a href="https://agentmods.dev/skills/jianchen08/agent-os-open/code-frontend"><img src="https://agentmods.dev/badge/skills/jianchen08/agent-os-open/code-frontend/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 前端编码

Your own site · 80×15
<a href="https://agentmods.dev/skills/jianchen08/agent-os-open/code-frontend"><img src="https://agentmods.dev/badge/skills/jianchen08/agent-os-open/code-frontend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,211 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.00058 $0.02211
Opus 5.5 $0.00023 $0.00884
Sonnet 5.5 $0.00012 $0.00442
Haiku 4.5 $0.00006 $0.00221

Measured 12d ago against content hash 8899bd3a9b7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

前端编码 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 12d 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.

plugins/shared/mode_coding/skills/code-frontend/SKILL.md · 217 lines

How it starts

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

前端编码

本技能是流程指引,不是逐条打勾清单:按场景判断使用,遇不适用情况保持裁量,不机械执行。

组件规范

组件命名

类型 规范 示例
组件文件 PascalCase UserProfile.vue, LoginForm.tsx
组件名 PascalCase UserProfile, OrderList
组件文件夹 kebab-case user-profile/, order-list/
Props camelCase userName, isLoading
事件名 camelCase(以 on 开头) onClick, onChange
方法名 camelCase handleSubmit, fetchData

组件设计原则

原则 说明 优先级
受控组件 表单值受 state 控制 高
Props 校验 使用 TypeScript 或 PropTypes 高
组件拆分阈值 >150 行评估拆分;>500 行必须拆分(见禁止行为) 中

React 组件结构

// 1. 类型定义 → 2. 组件定义 → 3. Hooks → 4. 业务逻辑 → 5. 渲染 → 6. 导出
interface UserCardProps {
  userId: number;
  userName: string;
  avatar?: string;
}

function UserCard({ userId, userName, avatar }: UserCardProps) {
  const [isEditing, setIsEditing] = useState(false);
  const handleEdit = () => setIsEditing(true);

  return (
    <div className={styles.card}>
      <img src={avatar} alt={userName} />
      <span>{userName}</span>
      <button onClick={handleEdit}>编辑</button>
    </div>
  );
}

export default UserCard;

Vue 组件结构

<template>
  <div class="user-card">
    <img :src="avatar" :alt="userName" />
    <span>{{ userName }}</span>
    <button @click="handleEdit">编辑</button>
  </div>
</template>

<script setup lang="ts">
interface Props { userId: number; userName: string; avatar?: string; }
const props = defineProps<Props>();
const emit = defineEmits<{ (e: 'edit', userId: number): void; }>();
const handleEdit = () => emit('edit', props.userId);
</script>

<style scoped>
.user-card { display: flex; align-items: center; }
</style>

设计系统一致性(编码前必做)

编写前端代码前必须先执行发现步骤,不能跳过:

  1. 识别设计系统来源:查 package.json 的组件库依赖、设计令牌文件(theme.css/tokens.json/tailwind.config)、全局样式文件、已有同类组件实现
  2. 提取设计规范:间距梯度、颜色语义变量、字体梯度、可复用组件、布局断点
  3. 以此为锚点:所有样式决策必须以提取到的规范为基准

间距

  • 先从项目的设计令牌/全局样式找到间距梯度
  • 所有间距值必须从项目定义的梯度中选取
  • 项目未定义时,使用项目中最常见的间距倍数作为基准

颜色

  • 先找到项目的语义色变量(主色、成功色、警告色、错误色)
  • 所有颜色通过项目的变量/token 引用
  • 需新颜色时在设计令牌中新增变量后引用,禁止硬编码

Read the full file on GitHub · 217 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. 12d ago Changed 8899bd3a9b7f
  2. 17d ago Changed 43fc398a5154
  3. 2mo ago Changed 0b7a203c208c
  4. 2mo ago Changed 6f75b2b2023d
  5. 2mo ago Changed · +94 lines b7f598711875
  6. 3mo ago First seen · 123 lines · 58 tokens per session scan A e082ece21169

Subscribe to this mod's changes

前端编码 is a skill published in the GitHub repository jianchen08/Agent-os-open (8 stars, last pushed yesterday), licensed Apache-2.0. It adds 58 tokens to every session and 2,211 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-31.

Related

前端编码 compared with skills from other repositories

前端编码 next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
前端编码jianchen08/Agent-os-openSkill8yesterdayApache-2.0A58Claude Code, Codex
ardot_design_to_codecrane-in-clear-sky/WorkWit-AI-AgentSkill1123mo agononeA200Claude Code
agent-toolvstorm-co/full-stack-ai-agent-templateSkill2.0ktodayMITA66Claude Code
background-taskvstorm-co/full-stack-ai-agent-templateSkill2.0ktodayMITA62Claude Code
rag-knowledgevstorm-co/full-stack-ai-agent-templateSkill2.0ktodayMITA76Claude Code
alembic-migrationvstorm-co/full-stack-ai-agent-templateSkill2.0ktodayMITA56Claude Code
channel-botvstorm-co/full-stack-ai-agent-templateSkill2.0ktodayMITA53Claude Code