Zh quotes skill
A Claude Code skill that fixes Chinese quotation marks breaking code syntax. Context-aware typography: ASCII quotes in code, Chinese quotes in prose.From the repository description
npx -y skills add amomorning/zh-quotes-skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.1 KB, 679 tokens by cl100k_base, as published. Nobody here has run it
Contextual Typography Skill
Purpose
Resolve punctuation, quotation mark, and symbol usage correctly in multilingual and mixed-syntax contexts.
This skill is especially important when Chinese natural language is mixed with:
- programming languages
- Typst
- Markdown
- LaTeX
- JSON/YAML
- shell commands
- prompts
- configuration files
The goal is NOT typography beautification.
The goal is:
- syntax correctness
- parser compatibility
- language-context consistency
- readable Chinese typography
Activation Conditions
Automatically activate this skill when ANY of the following appear:
- Chinese mixed with code
- Typst content
- Markdown fenced code blocks
- JSON/YAML/TOML
- nested quotation marks
- code generation
- prompts containing quotation examples
- multilingual text
- shell commands
- regex
- HTML/XML
- LaTeX/math
- strings containing Chinese text
Especially activate when output contains BOTH:
- Chinese characters
- ASCII syntax symbols
Core Principle
Typography follows CURRENT SYNTAX CONTEXT, not human language.
Priority order:
- programming language syntax
- markup language syntax
- data serialization syntax
- natural language typography
Code validity always overrides Chinese typography conventions.
Context Rules
Pure Chinese prose
Use:
- Chinese double quotes: “”
- Chinese single quotes: ‘’
- Chinese punctuation
Example:
“生成设计”是一种方法论。
Nested:
“所谓‘规则’,本质上是约束。”
Code Context
Inside code:
- ALWAYS use language-native syntax quotes
- NEVER replace syntax quotes with Chinese quotes
Correct:
text = "生成设计"
Wrong:
text = “生成设计”
Chinese Inside Code Strings
Outer quotes follow programming language syntax.
Inner quotations inside Chinese text use Chinese quotes.
Correct:
text = "用户点击“生成”按钮"
Correct:
println!("系统提示:“生成完成”");
Typst Context
Typst syntax overrides Chinese typography.
Use:
- ASCII syntax symbols
- English quotes for Typst syntax
- Chinese quotes only INSIDE natural Chinese text
Correct:
#text("这是正文")
Correct:
#quote[
他说:“生成完成”
]
Wrong:
#text(“这是正文”)
Markdown Context
Outside code:
- Chinese typography allowed
Inside code spans/blocks:
- preserve exact syntax
Nested Context Resolution
Always identify the CURRENT nesting level.
Example hierarchy:
Markdown → Python → Chinese string → Chinese quotation
Each layer follows its own syntax rules.
Forbidden Behaviors
Never automatically:
- convert ASCII quotes to Chinese quotes in code
- beautify syntax characters
- normalize valid syntax
- replace parser-required symbols
Output Validation
Before final output:
- detect current syntax context
- verify quote legality
- verify parser compatibility
- verify nested quotation correctness
High-risk formats:
- Typst
- JSON
- YAML
- shell
- regex
- prompts
- LaTeX
- Markdown fenced blocks
What ships with it: 9 files
10.7 KB alongside SKILL.md
evals/
- adversarial.md385 B
- easy.md280 B
- hard.md271 B
- medium.md283 B
- checklist.md377 B
- examples.md5.3 KB
- .gitignore8 B
- LICENSE1.0 KB
- README.md2.7 KB