yyyyolo7a79-sketch/claude-conventions-skill

Claude Code conventions skill for Chinese users

项目介绍Project Overview

Claude Code 全局行为规范 skill,通过 SKILL.md 约束 4 条规则:代码注释默认中文、Bash 命令附中文解释、英文步骤附中文翻译、思考链用中文。每条规则采用 ✅/❌ 正反例对照以增强 LLM 约束力。安装后新开会话、说"写代码"即可自动加载。注意事项:规则 4 明确不可用强制措辞,避免语言偏好挤占真正需要高优先级的流水线或破坏性操作确认。

A Claude Code global behavior conventions skill that enforces four rules via SKILL.md: code comments in Chinese by default, Chinese explanations before Bash commands, Chinese translations for English steps, and Chinese reasoning chains. Each rule uses ✅/❌ contrast examples for stronger LLM compliance. After installation, start a new session and say a trigger phrase to auto-load it. Caveat: Rule 4 explicitly avoids mandatory wording so language preference does not outweigh critical rules like pipeline steps or destructive operation confirmations.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add github:yyyyolo7a79-sketch/claude-conventions-skill

yyyyolo7a79-sketch/claude-conventions-skill 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

conventions-skill

Claude Code 全局行为规范 Skill:代码注释用中文、Bash 命令附解释、英文步骤附中文翻译、思考链用中文。

🚀 给 Claude 的安装指引(AI 自动安装)

本仓库链接发给 Claude Code,对它说"安装这个 skill",Claude 会按以下步骤自动完成:

  1. 下载本仓库的 conventions/SKILL.md

    curl -fsSL https://raw.githubusercontent.com/yyyyolo7a79-sketch/claude-conventions-skill/main/conventions/SKILL.md -o ~/.claude/skills/conventions/SKILL.md
    

    备选(raw 链接超时时用):

    curl -fsSL https://api.github.com/repos/yyyyolo7a79-sketch/claude-conventions-skill/contents/conventions/SKILL.md -H "Accept: application/vnd.github.raw" -o ~/.claude/skills/conventions/SKILL.md
    

    Windows 用户目标路径为 C:\Users\<用户名>\.claude\skills\conventions\SKILL.md

  2. 若目标文件已存在,先询问用户是否覆盖。

  3. 安装完成后提醒用户:新开一个 Claude Code 会话,说"写代码"等触发词即可自动加载。

  4. 可用 /skills 命令验证 skill 已注册。

这是什么

一个 Claude Code 全局行为规范 skill,约束 4 件事:

规则 内容
规则 1 代码注释/文档默认中文(用户明确要求英文除外)
规则 2 Bash 命令必须先附中文解释(做什么 + 为什么)再展示
规则 3 输出英文步骤/术语时括号附中文翻译
规则 4 内部思考/推理链以中文为主(术语/专名可保留英文)

为什么这么设计

两个核心理念:

  1. 对比示例 > 纯描述:每条规则都用 ✅/❌ 正反例对照,对 LLM 的约束力远强于文字描述。
  2. 语言偏好不升格为铁律:规则 4 明确要求不能用"强制/最高优先级"式措辞——把语言偏好 写成铁律,会挤占真正需要强制的规则(流水线步骤、破坏性操作确认)的注意力权重。

手动安装(人类读者)

复制 conventions/ 文件夹到 ~/.claude/skills/ (Windows 为 C:\Users\<用户名>\.claude\skills\),或把内容并入全局 CLAUDE.md

验证

安装后新开会话,说"写代码"——如果模型以中文思考链输出说明已生效。

许可证

MIT © 2026 yyyyolo7a79-sketch

上一个 Prev dsh-cost 下一个 Next dsh-wechat-maid