zero2Agent: Skill for Claude Code

.claude/skills/chinese-quotes-fix/SKILL.md

chinese-quotes-fix is a skill for Claude Code from ranxi2001/zero2Agent. It costs 32 tokens per session (1,537 once invoked), scanned A, original, MIT.

A Markdown checker and fixer for mismatched Chinese quotation marks, including straight quotes in Chinese prose.

In plain words
What is it for?
Use it to check, preview, and fix quotation marks in agent-generated Markdown files without changing protected syntax.
Why use it?
It prevents automated edits from leaving quotation marks incorrectly paired while protecting code, links, HTML, YAML, and diagrams.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

This is ranxi2001/zero2Agent's own configuration. It tells Claude Code how to work on zero2Agent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything zero2Agent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ranxi2001/zero2Agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ranxi2001/zero2Agent/main/.claude/skills/chinese-quotes-fix/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ranxi2001/zero2Agent

Made for: Claude Code.

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 chinese-quotes-fix

README.md
[![agentmods](https://agentmods.dev/badge/skills/ranxi2001/zero2agent/chinese-quotes-fix.svg)](https://agentmods.dev/skills/ranxi2001/zero2agent/chinese-quotes-fix)
Your own site
<a href="https://agentmods.dev/skills/ranxi2001/zero2agent/chinese-quotes-fix"><img src="https://agentmods.dev/badge/skills/ranxi2001/zero2agent/chinese-quotes-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,537 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00032 $0.01537
Opus 5 $0.00016 $0.00768
Sonnet 5 $0.00006 $0.00307
Haiku 4.5 $0.00003 $0.00154

Measured 6d ago against content hash 76293106d72f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

chinese-quotes-fix 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 6d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (check_quotes.py, fix_quotes.py, quote_utils.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/chinese-quotes-fix/SKILL.md · 135 lines

How it starts

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

中文引号修复技能

用于检查并修复 Markdown 文档里的中文引号问题(双引号 + 单引号),重点处理 ClaudeCode / Agent 生成文档中常见的这类错误:

  • 正文里混入英文直双引号 "
  • 正文里中文语境下的直单引号 '(如 '客户为先')未转为中文单引号 ‘’
  • 左右引号方向不配对
  • Mermaid、YAML、代码块、HTML 属性等语法区域被误改

核心目标不是“全局轮流替换”,而是只修正文 prose,并尽量准确判断每个直引号应该变成左引号还是右引号。

适用场景

  • ClaudeCode 输出的教程、博客、知识库文档
  • 含有 Mermaid 流程图、HTML 片段、Markdown 链接的 Markdown 文件
  • 中文正文为主,夹杂英文术语,例如 "做 Agent""微调""一问一答"

保护区规则

以下区域中的直引号默认不改动:

  • YAML front matter
  • Fenced code blocks,包括 ``` 和 ~~~
  • Inline code
  • Mermaid HTML 块,例如 <div class="mermaid">...</div>
  • Markdown 链接与引用式链接定义
  • HTML tag / attribute / comment
  • 常见非正文 HTML block,例如 detailstablesvgpre

这条规则是为了避免把语法中的合法直引号误改成中文弯引号,导致 Markdown、HTML 或 Mermaid 失效。

标准工作流

1. 先检查

python .claude/skills/chinese-quotes-fix/check_quotes.py "path/to/file.md"

批量检查:

python .claude/skills/chinese-quotes-fix/check_quotes.py "docs/**/*.md"

检查输出会区分:

  • 文件里一共有多少个直双引号 / 直单引号
  • 有多少个在正文里,属于可修复目标(单引号仅检测 CJK 语境)
  • 哪些行仍有正文直引号
  • 当前正文里的弯引号是否存在配对问题(双引号和单引号分别报告)
  • 只要存在正文直引号或配对问题,命令就返回非零退出码,便于 CI 和自动化校验阻止错误内容发布

2. 预览修复

python .claude/skills/chinese-quotes-fix/fix_quotes.py --dry-run "path/to/file.md"

3. 正式修复

python .claude/skills/chinese-quotes-fix/fix_quotes.py "path/to/file.md"

4. 修复配对问题(弯引号方向错误)

当 check 报告 pairing issues(如 ”Context Engineering” 应为 “Context Engineering”)时,使用 --fix-pairing

python .claude/skills/chinese-quotes-fix/fix_quotes.py --fix-pairing --dry-run "path/to/file.md"
python .claude/skills/chinese-quotes-fix/fix_quotes.py --fix-pairing "path/to/file.md"

此模式会分析上下文判断每个弯引号的正确方向,将误用为开引号的 修正为 ,反之亦然。

配对策略

双引号

脚本不会简单按“第 1 个左引号、第 2 个右引号”做全局替换,而是结合上下文判断:

  • 行首、冒号、左括号等之后的直引号,优先判为开引号
  • 标点、句末、右括号之前的直引号,优先判为闭引号
  • 如果一行里已经出现现成的 / ,会把它们纳入状态判断,尽量修复混用场景
  • 状态按行重置,避免上一段的未闭合引号污染下一段

单引号

单引号使用同样的上下文判断逻辑,但额外增加 CJK 语境检测

  • 只有当直单引号 ' 的前后邻近字符包含 CJK 文字或中文标点时,才判定为中文单引号并进行转换
  • 英文语境中的撇号(如 don'tit's)不会被误改
  • 转换目标:'(U+2018)或 (U+2019)

Read the full file on GitHub · 135 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 135 lines · 32 tokens per session scan A 76293106d72f

Subscribe to this mod's changes

chinese-quotes-fix is a skill published in the GitHub repository ranxi2001/zero2Agent (406 stars, last pushed today), licensed MIT. It adds 32 tokens to every session and 1,537 once invoked, about $0.0002 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-30.