conventions

conventions is a skill for Claude Code, Codex from yyyyolo7a79-sketch/claude-conventions-skill. It costs 102 tokens per session (1,652 once invoked), scanned A, original, MIT.

A set of general behavior rules for an AI coding assistant, written in Chinese. It requires Chinese code comments, explanations for Bash commands, Chinese notes alongside English technical steps, and Chinese reasoning.

In plain words
What is it for?
Use it to standardize how the assistant writes comments, explains commands, presents English procedures, and communicates its reasoning.
Why use it?
It makes the assistant’s output easier to follow for Chinese-speaking teams and explains potentially consequential terminal commands before they run. The description does not define software-development capabilities beyond these behavior rules.

Skill for Claude CodeCodex

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

Good fit Use it to standardize how the assistant writes comments, explains commands, presents English procedures, and communicates its reasoning.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yyyyolo7a79-sketch/claude-conventions-skill/conventions
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 yyyyolo7a79-sketch/claude-conventions-skill --skill conventions
Clone the repo
git clone --depth 1 https://github.com/yyyyolo7a79-sketch/claude-conventions-skill

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 conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/yyyyolo7a79-sketch/claude-conventions-skill/conventions/github.svg)](https://agentmods.dev/skills/yyyyolo7a79-sketch/claude-conventions-skill/conventions)
Your own site
<a href="https://agentmods.dev/skills/yyyyolo7a79-sketch/claude-conventions-skill/conventions"><img src="https://agentmods.dev/badge/skills/yyyyolo7a79-sketch/claude-conventions-skill/conventions/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 conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/yyyyolo7a79-sketch/claude-conventions-skill/conventions"><img src="https://agentmods.dev/badge/skills/yyyyolo7a79-sketch/claude-conventions-skill/conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,652 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.00102 $0.01652
Opus 5 $0.00051 $0.00826
Sonnet 5 $0.00020 $0.00330
Haiku 4.5 $0.00010 $0.00165

Measured 11d ago against content hash 8583226cc641, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

conventions 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 11d 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.

conventions/SKILL.md · 146 lines

How it starts

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

全局行为规范

以下三条规则在所有对话中默认生效,除非用户明确要求例外。


规则 1:代码注释默认中文

生成任何代码(Python、Java、JS、SQL、Shell 等)时,注释、docstring、文档字符串默认使用中文

# ✅ 正确 — 中文注释
def calculate_score(answers: list[dict]) -> float:
    """
    根据答题结果计算最终得分。
    每道题权重相同,答对 +1,答错 +0,未答跳过。
    """
    score = 0.0
    for item in answers:
        if item.get("correct"):  # 仅统计已答且正确的题目
            score += 1.0
    return score
# ❌ 错误 — 未经要求就写英文注释
def calculate_score(answers):
    # Calculate final score based on answers
    score = 0.0
    ...

例外:仅当用户明确说"注释写英文""用英文注释""comments in English"时,才使用英文注释。


规则 2:Bash 命令必须先解释再请求执行

每次向用户展示终端命令时,必须附带中文解释,说明:

  • 这条命令做什么(功能描述)
  • 为什么需要执行它(意图)

格式:

**这条命令的作用**:<一句话中文说明>
**为什么需要**:<一句话中文说明>

```bash
<命令>
```

实际示例

**这条命令的作用**:安装 psycopg2-binary Python 数据库驱动包
**为什么需要**:本地脚本需要通过此驱动连接 PostgreSQL 数据库读写数据

```bash
python3 -m pip install psycopg2-binary
```

当需要用户审批权限时,解释尤为重要——让用户不需要读 bash 代码就能判断该不该批准。

适用范围:需要用户审批的命令、有副作用的命令(写入/删除/安装/网络请求)。 连续的只读探查命令(ls/cat/grep/语法检查)只需在一组的开头说明一次意图, 不必逐条重复——否则批量排查时解释文字会淹没实际结果。


规则 3:英文步骤附中文翻译

当你输出英文技术步骤、名词、流程时,在括号中附带中文翻译/注释,方便用户快速理解。

# ✅ 正确
Step 1: Extract the error-fix chain from the conversation.(从对话中提取错误-修复链)
Step 2: Classify each error by category — env / type / logic / external.(按类别分类)
Step 3: Write confirmed items to PgSQL and Obsidian.(写入数据库和笔记)

# ❌ 错误
Step 1: Extract the error-fix chain from the conversation.
Step 2: Classify each error by category — env / type / logic / external.
Step 3: Write confirmed items to PgSQL and Obsidian.

这适用于:

  • 技术步骤/流程说明
  • 工具/库名称的首次提及(如 "PostgreSQL(关系型数据库)")
  • 架构图中的节点和箭头标注

例外:纯代码块(``` 包裹的内容)不需要翻译代码本身;公认的技术缩写(API、JSON、SQL、HTTP)不需要翻译。


规则 4:思考过程使用中文

你的内部推理(thinking / reasoning)使用简体中文

ALL thinking/reasoning MUST be in Simplified Chinese. Code snippets, error messages, and file paths within thinking can remain in their original language — but your own reasoning text must be Chinese.

Read the full file on GitHub · 146 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. 11d ago First seen · 146 lines · 102 tokens per session scan A 8583226cc641

Subscribe to this mod's changes

conventions is a skill published in the GitHub repository yyyyolo7a79-sketch/claude-conventions-skill (3 stars, last pushed 1mo ago), licensed MIT. It adds 102 tokens to every session and 1,652 once invoked, about $0.0005 per session on Opus 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.