zh-quotes

zh-quotes is a skill for Claude Code, Codex from MarecGents/marec-agent-skills. It costs 142 tokens per session (1,065 once invoked), scanned A, original, MIT.

A document-formatting tool for Word files (.docx). It replaces straight quotation marks with Chinese curly quotation marks while keeping the document’s existing formatting.

In plain words
What is it for?
Use it on body text, headers, footers, tables, footnotes, endnotes, and text boxes, either in place or as a new output file.
Why use it?
It fixes inconsistent quotation-mark style in Chinese documents without changing fonts, colors, bold text, or other layout details.

Skill for Claude CodeCodex

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

Good fit Use it on body text, headers, footers, tables, footnotes, endnotes, and text boxes, either in place or as a new output file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/marecgents/marec-agent-skills/zh-quotes
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 MarecGents/marec-agent-skills --skill zh-quotes
Clone the repo
git clone --depth 1 https://github.com/MarecGents/marec-agent-skills

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 zh-quotes

README.md
[![agentmods](https://agentmods.dev/badge/skills/marecgents/marec-agent-skills/zh-quotes/github.svg)](https://agentmods.dev/skills/marecgents/marec-agent-skills/zh-quotes)
Your own site
<a href="https://agentmods.dev/skills/marecgents/marec-agent-skills/zh-quotes"><img src="https://agentmods.dev/badge/skills/marecgents/marec-agent-skills/zh-quotes/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 zh-quotes

Your own site · 80×15
<a href="https://agentmods.dev/skills/marecgents/marec-agent-skills/zh-quotes"><img src="https://agentmods.dev/badge/skills/marecgents/marec-agent-skills/zh-quotes.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 142 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,065 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.00142 $0.01065
Opus 5 $0.00071 $0.00532
Sonnet 5 $0.00028 $0.00213
Haiku 4.5 $0.00014 $0.00106

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

Security

Grade A, and why

zh-quotes 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/replace_quotes.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.

skills/zh-quotes/SKILL.md · 80 lines

What it actually says

中文引号格式化(zh-quotes)

.docx 文件中的所有英文直引号(")替换为中文全角弯引号(左 \u201c、右 \u201d),成对交替替换,同时完整保留原文所有格式(字体、字号、加粗、斜体、颜色等)。

使用场景

  • 学术论文中英混排文档的中文引号规范化
  • 从英文模板创建的中文文档标点修复
  • 批量处理多个 docx 文件中的直引号问题
  • 引用中包含书名号、引号嵌套的中文排版

工作原理

docx 文件本质是 ZIP 压缩包,内部以 XML 存储文本内容和格式。脚本遍历文档的每一个 <w:r>(run)元素,在段落级别识别 " 字符并按段落内出现顺序成对交替替换:

  • 段落内第 1 个 " → 左引号 \u201c
  • 段落内第 2 个 " → 右引号 \u201d
  • 第 3 个 " → 左引号 \u201c
  • 第 4 个 " → 右引号 \u201d
  • …依次类推,每个段落独立计数

使用方法

python scripts/replace_quotes.py <输入文件.docx> [选项]

参数说明

参数 说明
<输入文件> 要处理的 .docx 文件路径(必需)
--output OUTPUT / -o 输出路径(默认覆盖原文件)
--no-backup 不创建备份(默认自动创建 .bak 备份)

示例

# 直接修改原文件(自动创建备份)
python scripts/replace_quotes.py 论文.docx

# 输出到新文件
python scripts/replace_quotes.py 论文.docx -o 论文_格式化.docx

# 批量处理当前目录下所有 docx
Get-ChildItem *.docx | ForEach-Object {
    python scripts/replace_quotes.py $_.Name --no-backup
}

处理范围

  • ✅ 文档正文段落
  • ✅ 页眉(header)和页脚(footer)
  • ✅ 表格内单元格文字
  • ✅ 脚注和尾注(python-docx 后端通过 related_parts XML 访问;lxml 后端遍历全部 w:p)
  • ✅ 文本框中的文字
  • ✅ 保留所有字体、字号、加粗、斜体、颜色等格式

注意事项

  1. 引号嵌套:如果同一段落内包含嵌套引号,此工具按平面配对处理,不会智能区分嵌套层级。如有嵌套引号需求,手动调整。
  2. 已存在的弯引号:如果文档中已存在中文弯引号(\u201c/\u201d),工具会跳过它们并保持其配对状态计数器同步,确保后续替换正确。
  3. 备份:默认创建 .bak 备份文件,使用 --no-backup 可禁用。
  4. 依赖:需要 python-docx(推荐)或 lxml。安装:pip install python-docx

与 docx 技能的关系

本技能是 docx 文编技能的子集,专门处理引号格式修复这一高频需求。如果你需要进行更复杂的 docx 操作(创建文档、插入图片、处理修订等),请使用 docx 技能。

Files

What ships with it

1 file 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. 11d ago First seen · 80 lines · 142 tokens per session scan A b151ff36539e

Subscribe to this mod's changes

zh-quotes is a skill published in the GitHub repository MarecGents/marec-agent-skills (3 stars, last pushed 13d ago), licensed MIT. It adds 142 tokens to every session and 1,065 once invoked, about $0.0007 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.