zh-quotes: Quote and Punctuation Guidelines for Chinese Text Mixed with Code

Foreword

When writing technical documents, generating configurations, or mixing Markdown, models often insert Chinese curly quotes into Python strings, JSON, or Typst syntax. On the surface, it appears to be “more Chinese typography,” but in reality, it leads to parsing failures and errors when copied into projects. Manually changing quotes is both slow and prone to missing nested levels.

Below, we introduce a community Skill on SkillHub called zh-quotes (coordinates @user_d1c8ae9c/zh-quotes). According to the SKILL.md convention, it enables the Agent to process quotes and symbols based on the current syntactic context before outputting, rather than uniformly applying Chinese typography habits.

What This Is

Positioned within the SKILL.md of the package as a “Contextual Typography Skill,” zh-quotes correctly parses punctuation, quotation marks, and symbol usage in multilingual and multi-syntax mixed scenarios.

  • Maintainer: Community publisher user_d1c8ae9c (SkillHub page labels the author as amomorning)
  • Version: 1.0.0
  • Category: content-creation
  • Source: community
  • Metadata: requires_api_key=false, no API Key required

What it solves is not “quoting famous sayings” but the consistency of quotes and punctuation when Chinese natural language coexists with programming languages, Typst, Markdown, LaTeX, JSON/YAML, Shell, Prompts, configuration files, etc. The goal is clearly written in SKILL.md: not typographic beautification, but syntactic correctness, parser compatibility, contextual consistency, and Chinese readability.

Core Functions

The following capabilities are all derived from the installed SKILL.md v1.0.0.

Auto-trigger conditions

When any of the following situations occurs in the output, the Skill requires the Agent to automatically enable it:

  • Mixed Chinese and code
  • Typst, Markdown fenced code blocks
  • JSON / YAML / TOML
  • Nested quotes, code generation, prompts with quoted examples
  • Multilingual text, Shell, regular expressions, HTML/XML, LaTeX/math formulas
  • Strings containing Chinese

It should be prioritized when the output contains both Chinese characters and ASCII syntactic symbols.

Core principles and priorities

Typography follows the current syntactic context, rather than simply following “human natural language” habits:

  1. Programming language syntax
  2. Markup language syntax
  3. Data serialization syntax
  4. Natural language typography

Code validity always takes precedence over Chinese typographic conventions.

Scenario-specific rules (summary)

Scenario Key Rules
Pure Chinese prose Use Chinese double quotes "", single quotes '', and Chinese punctuation
Inside code blocks Only use the language’s native quotes; do not switch to Chinese curly quotes
Chinese inside code strings Outer quotes follow the programming language; Chinese quotations inside strings use Chinese quotes
Typst Syntactic symbols and English quotes are used for Typst structures; Chinese quotes only appear in natural Chinese text
Markdown Keep code spans/fenced blocks as-is; outside fences, Chinese typography may be applied

Prohibited behaviors

The Skill explicitly prohibits the Agent from automatically:

  • Changing ASCII quotes to Chinese quotes in code
  • Beautifying syntactic characters or normalizing already valid syntax
  • Replacing symbols required by parsers

Pre-output validation

Before the final draft, the Agent should: identify the current syntactic context → check quote validity → check parser compatibility → check nested quotes. High-risk formats include Typst, JSON, YAML, Shell, regular expressions, Prompts, LaTeX, and Markdown fenced code blocks.

Installation and Activation

The installation process follows the official SkillHub documentation skillhub.md. The installation prompt given on the Skill page is: Please install @user_d1c8ae9c/zh-quotes according to that document.

1. Install the SkillHub CLI (if not already installed)

command -v skillhub && skillhub --version

If not installed, run the full installation (CLI + default Skill):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

If only the CLI is needed:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

2. Install zh-quotes into the current Agent’s skills directory

During installation, use --dir to point to the skills directory actually read by the current Agent; installing to ./skills/ by default may not be recognized.

The installation method shown by the CLI search results is:

skillhub install zh-quotes --namespace user_d1c8ae9c --dir <your skills directory>

Common path examples (from the official installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

In Cursor, it can be written as:

skillhub install zh-quotes --namespace user_d1c8ae9c --dir ~/.cursor/skills/

After successful installation, the skill package will be placed in a path like @user_d1c8ae9c/zh-quotes/ under that directory, containing SKILL.md for the Agent to read.

3. Let the Agent load it

You can also send the SkillHub page prompt directly to the AI:

Please install `@user_d1c8ae9c/zh-quotes` according to https://skillhub.cn/install/skillhub.md.

After the above steps, the Agent should follow the rules in SKILL.md when generating content with mixed Chinese and code.

Typical Usage

The Skill does not provide an independent script command; usage is reflected in the rule examples during generation and rewriting of output. The following comparisons come from the official SKILL.md and can be directly used to verify whether the Agent works according to the Skill.

Pure Chinese (prose outside fences):

“生成设计”是一种方法论。

Python string (syntactic quotes must be ASCII):

text = "生成设计"

Incorrect example (Chinese curly quotes cause syntax errors):

text = “生成设计”

Chinese quotations embedded in strings:

text = "用户点击“生成”按钮"
println!("系统提示:“生成完成”");

Typst:

#text("这是正文")
#quote[
他说:“生成完成”
]

When asking the Agent to perform tasks such as “write a Python example with Chinese button text” or “generate a Typst paragraph with Chinese dialogue,” the above layered rules should be automatically applied.

Applicable Scenarios and Precautions

Who it’s for

  • Developers who frequently have AI write Chinese-English mixed READMEs, tutorials, prompt templates, and configuration file snippets
  • Authors using Typst, LaTeX, and Markdown for technical writing, especially with nested Chinese and code
  • Teams that want to reduce quote problems that “look correct but cause errors when pasted into projects”

Limitations and precautions

  • The Skill name may easily be misunderstood as “Chinese quotes”; its actual capability is contextual quotes and punctuation, and SKILL.md is the standard.
  • Community source (community); behavior depends entirely on whether the Agent loads and follows SKILL.md, with no independent runtime validator.
  • SkillHub crawl data shows a score of 100000 and about 780 downloads (statistics update with the platform); after installation, if the Agent is not restarted or does not point to the correct --dir, it may appear as “installed but not working.”
  • The official API address https://api.skillhub.cn/user_d1c8ae9c/zh-quotes may return 405 for browser GET requests; browsing and installation are subject to the SkillHub site and skillhub CLI.

Conclusion

zh-quotes turns “how to use Chinese quotes” from an aesthetic issue into a syntactic layering issue: keep ASCII in code, use Chinese quotes in prose, and judge layer by layer when nesting. For content-creation workflows, it can reduce low-level punctuation errors before mixed-language documents enter the repository.

  • SkillHub page: https://www.skillhub.cn/skills/user_d1c8ae9c/zh-quotes
  • Coordinate reference: @user_d1c8ae9c/zh-quotes
  • Official API entry: https://api.skillhub.cn/user_d1c8ae9c/zh-quotes
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye