awesome-coding-skills-cn CLAUDE.md

A project instruction file that sets coding rules for a Chinese collection of development practices, including debugging, test-driven development, older codebases, and React or Vue interfaces.

In plain words
What is it for?
Use it to guide work on bugs, features, legacy projects, and React or Vue front ends with explicit assumptions and step-by-step verification.
Why use it?
It tells the coding agent to verify facts, make focused changes, preserve existing conventions, and test behavior before and after edits. Test-driven development means writing a test for the expected behavior before implementing it.

Instructions file

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 instructions/wade-devcode/awesome-coding-skills-cn/claude-md
Clone the repo
git clone --depth 1 https://github.com/Wade-DevCode/awesome-coding-skills-cn
Per session 1,765 This file is loaded in full into every session.
When invoked 1,765 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 86% copy Near-identical to another mod 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.01765 $0.01765
Opus 5 $0.00882 $0.00882
Sonnet 5 $0.00353 $0.00353
Haiku 4.5 $0.00177 $0.00177

Measured 2d ago against content hash 0f40aff16dc8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

awesome-coding-skills-cn CLAUDE.md 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 2d 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.

Origin

This is a copy

86% identical to awesome-coding-skills-cn AGENTS.md — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 74 lines

How it starts

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

把本文件放进项目根目录即可让 Claude Code 遵守以下规则。

核心纪律

  • 不造 API:只调用确认存在的库函数,不确定就查文档或源码,禁止凭记忆编造。
  • 外科手术式改动:只改与当前任务直接相关的代码行,不顺手触碰格式、import 或无关逻辑。
  • 拒绝过度工程:只实现当前需求的最小方案,不预留"将来可能用到"的抽象或扩展点(YAGNI)。
  • 显式暴露假设:动手前列出关键假设,歧义处先问清楚,不闷头猜测。
  • 改前先读:修改任何文件前先完整读一遍,理解命名规范和错误处理约定再动手。

系统化调试

  • 先复现:动代码前先写下稳定复现步骤和"期望行为 vs 实际行为",无法复现就先补日志。
  • 读真实报错:逐字读完整堆栈,从第一次抛出点开始定位,不跳过、不脑补。
  • 二分缩小范围:用打印或注释二分法把问题缩到最小代码段,不靠直觉猜位置。
  • 找根因不贴补丁:能用一句话解释"为什么会错"之后再改代码,禁止用空 try/except 吞异常掩盖症状。
  • 改完验证:重跑最初的复现步骤确认修复,再跑全量测试套件确认无新的失败。

测试驱动

  • 先写测试:在任何实现代码存在之前,先写表达期望行为的测试用例。
  • 看它失败:写完测试立即运行,确认失败原因是"功能缺失"而非测试本身写错。
  • 最小实现:只写刚好让当前测试通过的代码,克制"顺手加逻辑"的冲动。
  • 全量验证:实现后运行完整测试套件,新测试绿且原有测试全部仍绿才算完成。
  • 测行为不测实现:断言返回值和可观察状态,不 mock 或 spy 内部私有方法。

改老项目不崩

  • 先摸地形:改动前用搜索找出所有调用点和依赖关系,影响面超出预期时先向用户确认。
  • 跟随既有约定:完全模仿该仓库的命名风格、文件结构、错误处理方式,不引入个人偏好。
  • 小步可回退:每次提交只做一件事,提交信息清楚说明改了什么和为什么改。
  • 不动公共接口除非必要:改对外函数签名或 HTTP 端点前评估所有下游影响,优先保持向后兼容。
  • 保留并复用既有工具:动手前先搜索仓库里有没有现成实现,不重复造轮子,不引入功能重复的新依赖。

前端最佳实践(React/Vue)

  • 组件单一职责:一个组件只做一件事;超过 300 行必须拆分;展示组件不持有业务状态、不调接口。
  • 状态就近放置:状态只提升到真正需要它的最近公共祖先,只有跨路由需要共享时才引入全局 store。
  • 避免无谓重渲染:传给子组件的对象和函数必须保持稳定引用;React 用 useMemo/useCallback,Vue 用 computed。
  • 副作用收口:请求和订阅必须放进受控 effect,用 AbortController 或 onUnmounted 正确清理,防止竞态和内存泄漏。
  • 可访问性默认开:可点击元素用 <button>/<a>,图片加 alt,表单 input 关联 label,Tab 键可正常遍历所有控件。

中文 commit 规范

  • 格式固定为 type(scope): 中文主题:type 只用七个英文关键字(feat/fix/docs/refactor/test/chore/perf),主题用中文祈使句,不超过 50 字,末尾不加句号。
  • 主题写"做了什么"而非流水账:动词放句首,一眼能判断是否需要点进 commit 看细节。
  • 正文只写"为什么":解释动机与权衡,不逐行复述 diff;主题与正文之间空一行。
  • 一次只提一件事:提交前用 git diff --staged 确认每处改动服务同一目的,混入的无关改动用 git add -p 拆分。
  • scope 用真实模块名:对应项目中真实存在的目录或包名,不编造 misc/global 等占位词。

国内技术栈适配

  • 小程序/uniapp 禁用 DOM/BOM API:window/document/localStorage 全部换成 wx.*/uni.* 对应接口;setData 合并调用并用 path 精确更新,禁止在循环里多次调用。
  • uniapp 跨端必须用条件编译:平台差异逻辑用 #ifdef APP-PLUS/#ifdef MP-WEIXIN/#ifdef H5 包裹,不写死单端 API。
  • 微信登录走官方流程:前端只传 code 给后端,后端用 code2session 换 openid;openid 和 session_key 不落前端存储。
  • SpringBoot 分层清晰:Controller 只接参/返响应;业务逻辑全在 Service;参数校验用 @Valid + @ControllerAdvice 统一处理,不在 Controller 里写业务或 if-else 校验。
  • 国内镜像与合规:npm 用淘宝镜像,Maven 用阿里云镜像,前端资源走国内 CDN;上线前对照合规清单检查隐私政策与权限申请说明。

Read the full file on GitHub · 74 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. 2d ago First seen · 74 lines · 1,765 tokens per session scan A 0f40aff16dc8

Subscribe to this mod's changes

awesome-coding-skills-cn CLAUDE.md is an instructions file published in the GitHub repository Wade-DevCode/awesome-coding-skills-cn (6 stars, last pushed 2mo ago), licensed MIT. It adds 1,765 tokens to every session, about $0.0088 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to awesome-coding-skills-cn AGENTS.md, differing in 12 lines, and is treated as a copy.

Related

Other instructions, from other repositories

superpowers-zh CLAUDE.md

Instructions for jnMetaCode/superpowers-zh, covering superpowers — 贡献者指南, 如果你是 ai agent, pull request 要求, 我们不会接受的内容 and 第三方依赖.

jnMetaCode/superpowers-zh · 2,083 tokens

superpowers-zh GEMINI.md

Instructions for jnMetaCode/superpowers-zh, covering superpowers-zh 中文增强版, 核心规则, 可用 skills and 如何使用.

jnMetaCode/superpowers-zh · 1,105 tokens

superpowers-zh AGENTS.md

Instructions for jnMetaCode/superpowers-zh, a project described as: 🦸 AI 编程超能力 · 中文增强版 — superpowers(116k+ ⭐)完整汉化 + 6 个中国原创 skills,让 Claude Code / Copilot CLI / Hermes Agent / Cursor / Windsurf / Kiro / Gemini CLI 等 16 款 AI 编程工具真正会干活.

jnMetaCode/superpowers-zh · 4 tokens

spec-kit-zh AGENTS.md

Instructions for loulanyue/spec-kit-zh, covering agents.md, about spec kit and specify, general practices, adding new agent support and current supported agents.

loulanyue/spec-kit-zh · 3,968 tokens

spec-superflow GEMINI.md

Instructions for MageByte-Zero/spec-superflow, covering spec-superflow and spec-superflow v1.0.1 | 阶段: {{state}} | 工作流: {{workflow}}.

MageByte-Zero/spec-superflow · 178 tokens

mattpocock-skills-zh CLAUDE.md

Instructions for devcxl/mattpocock-skills-zh, a project described as: Matt Pocock 技能集的中文翻译版 — 地道中文,原汁原味的技术术语。基于 mattpocock/skills 复刻。每日中午12点钟同步.

devcxl/mattpocock-skills-zh · 969 tokens