代码实现

代码实现 is a skill for Claude Code, Codex from jianchen08/Agent-os-open. It costs 54 tokens per session (2,259 once invoked), scanned A, original, Apache-2.0.

A coding workflow for checking requirements, understanding existing code, designing module boundaries, writing tests first, implementing changes, and reviewing risks. TDD means writing a failing test, making it pass, then improving the code.

In plain words
What is it for?
Use it when building features, changing code, refactoring, or adding tests. It guides requirement checks, code investigation, test design, implementation, and regression checks.
Why use it?
It reduces guesswork before coding and helps prevent duplicate work, broken interfaces, and changes that are not covered by tests.

Skill for Claude CodeCodex

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

Good fit Use it when building features, changing code, refactoring, or adding tests. It guides requirement checks, code investigation, test design, implementation, and regression checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jianchen08/agent-os-open/code-implement
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-implement
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-implement/github.svg)](https://agentmods.dev/skills/jianchen08/agent-os-open/code-implement)
Your own site
<a href="https://agentmods.dev/skills/jianchen08/agent-os-open/code-implement"><img src="https://agentmods.dev/badge/skills/jianchen08/agent-os-open/code-implement/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-implement"><img src="https://agentmods.dev/badge/skills/jianchen08/agent-os-open/code-implement.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,259 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.00054 $0.02259
Opus 5.5 $0.00022 $0.00904
Sonnet 5.5 $0.00011 $0.00452
Haiku 4.5 $0.00005 $0.00226

Measured 1mo ago against content hash d2552666eec9, 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 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.

plugins/shared/modes/mode_coding/skills/code-implement/SKILL.md · 130 lines

How it starts

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

代码实现

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

执行流程

第 1 步:确认需要(编码前必做)

进入编码前,先确认输入和目标就绪,缺则停下追问,不靠猜测推进。

  1. 确认功能目标:逐条过验收标准(AC),确认每条都理解且可执行;有 state_machine 时确认要覆盖所有状态和转换
  2. 确认涉及范围:本任务要改哪些模块/文件,各自职责是什么
  3. 确认技术栈与约束:前端/后端/全栈;前端任务的设计系统约束;接口契约变更预期
  4. 确认上下文就位:相关参考文件、现有代码位置、依赖的接口契约都已拿到
  5. 信息不全则停下:通过 human_interaction 向上追问,确认齐了再进入第 2 步

第 2 步:摸清现有实现(防重复实现、防破坏架构,编码前必做)

调研现有实现,需要得出以下结论:

  • 调用链摘要:相关模块/函数的调用关系和数据流
  • 可复用项清单:逐项标注【可直接调用】/【改一下能兼容(说明怎么改)】/【不适用(说明理由)】
  • 接口契约:本任务要依赖/修改的对外接口的现有签名、入参出参、异常、调用约束
  • 架构边界:涉及的模块职责边界、依赖方向,本改动是否违反模块边界规则

调研深度按任务规模调整:单文件小改不必深挖;跨模块/涉及复用判断的任务必须把上下游和接口都摸清。

第 3 步:模块边界设计

按 coding_domain_rules.md §5.2 执行模块边界设计。

新增文件前先更新所在模块的「结构 > 文件清单」,改接口前先更新模块级/项目级文档(文档不存在先创建)。

迁移/重构任务(强制门禁):涉及迁移旧代码、大规模重构、修改多个模块交互方式时,必须先执行架构审查:

  1. 使用 file_read 读取涉及的旧代码/现有架构,梳理模块结构、依赖关系、数据流向,产出架构摘要
  2. 标注现有架构中的耦合点和内聚性问题
  3. 将架构审查报告写入 docs/working/architecture_review_report.md,必须包含:(1) 现有架构概述 (2) 计划变更范围 (3) 接口契约变更清单 (4) 风险评估
  4. 调用 task_evaluate 标记架构审查完成,通过 human_interaction 向用户确认后再编码;禁止未经确认就开始修改架构

新建任务跳过此步。

第 4 步:测试设计(Red 阶段,先写失败测试)

优先复用现有测试:先搜项目中已有测试,已覆盖的场景跳过,只补缺失的。

场景覆盖清单(补缺失部分):

  • 正常场景:标准输入,预期成功
  • 边界场景:最小/最大值、空值、临界值
  • 异常场景:错误输入、异常处理路径
  • 状态机:有 state_machine 时,覆盖所有状态和转换(state_coverage=100%,transition_coverage=100%)

测试类型选择:

  • 单元测试:单函数/方法,隔离外部依赖
  • 集成测试:多组件协作,验证模块间交互
  • API 端点测试(后端/全栈任务必做):每端点覆盖 2xx 成功 + 4xx 客户端错误 + 5xx 服务端错误,校验响应 Schema
  • 前端 E2E(前端任务必做):用 playwright_test 做浏览器级测试,不能只用 Jest 组件测试代替

防拟合要求(测试怎么写,实现才无法靠硬编码期望值/路径刷绿):按 coding_domain_rules §6.5 执行——同一行为 ≥2 组有区分度输入、关键行为配性质断言、可枚举输入 parametrize、关键路径走真实依赖断言,禁止单点输入拟合/全 mock。

写完测试必须运行确认全部失败(Red),保留失败证据。禁止在本阶段写实现代码。 接口契约测试:跨模块交互必须编写接口契约测试,验证调用方与被调用方的接口约定。

第 5 步:实现代码(Green 阶段)

  1. 写最少的代码让测试通过
  2. 每个公共接口的实际实现必须与第 3 步的契约一致
  3. 完整类型注解和文档字符串
  4. 每个 must 级 AC 必须在代码中有对应实现
  5. 复用落地:第 2 步判定为"直接复用/需修改现有实现"的,按结论执行;禁止在实现阶段另起炉灶重复造轮子
  6. 运行测试确认通过(Green)
  7. 防拟合自检:实现必须满足契约而非具体测试用例——(a) 泛化性自检:用测试集之外的同契约输入验证结果正确;(b) 删值实验:把疑似硬编码的返回值/路径改为其他值,相关测试必须变红。禁止以硬编码测试期望值作为实现终态(TDD 过渡硬编码必须由后续用例驱动移除)

Read the full file on GitHub · 130 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. 1mo ago Changed · +14 lines d2552666eec9
  2. 1mo ago First seen · 116 lines · 54 tokens per session scan A b6ade87b3884

Subscribe to this mod's changes

代码实现 is a skill published in the GitHub repository jianchen08/Agent-os-open (7 stars, last pushed 9d ago), licensed Apache-2.0. It adds 54 tokens to every session and 2,259 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.