SuperAPI AI Directory

punct-polish

General & other

View repository

Updated 10-16 08:02

About this skill

Punctuation Polishing

When AI writes Chinese, punctuation is the most common problem: half-width commas, missing CJK-Latin spacing, straight quotation marks, dash overuse... solved all at once.


The Most Common Punctuation Mistakes AI Makes

Sorted by frequency:

  1. Half-width comma → should use,but wrote, — extremely high frequency
  2. Half-width period → should use。but wrote. — extremely high frequency
  3. Missing CJK-Latin spacing → 使用React构建 should be 使用 React 构建 — high frequency
  4. Straight quotation marks → "你好" should be 「你好」(non-code) — high frequency
  5. Half-width parentheses → 见下图(图1) should be 见下图(图1) — high frequency
  6. Dash overuse → ——即 should be ,即 or simply deleted — medium
  7. Nonstandard ellipsis → .... or 。。。 should be …… — medium
  8. Misuse of the enumeration comma → 苹果,香蕉 should be 苹果、香蕉 — medium
  9. Repeated exclamation marks → 太棒了!!! should be 太棒了! — medium
  10. Extra CJK-Latin spacing → 这 是 中 文 should be 这是中文 — low
  11. English punctuation mixed into Chinese → Hello, world(Chinese context) — low
  12. Chinese punctuation mixed into English → This is good。 — low

The first 5 items are fully auto-corrected; the last 7 are corrected after contextual judgment or flagged as suggestions for manual review.


Punctuation Rules for the Four Scenarios

Chinese Prose (WeChat Official Accounts/Blogs/Essays)

Full-width punctuation is mandatory: ,。?!:;()「」『』. Dashes are prohibited; use commas or periods instead. Use a six-dot ellipsis……. Use the enumeration comma to separate parallel Chinese short phrases. The entire text must contain no more than 3 exclamation marks, and consecutive use is prohibited.

Technical Documentation (API/Manuals/Runbooks)

Add spaces between Chinese and English/numbers:使用 React 构建、调用 API 接口. Punctuation inside code fences is completely left untouched. Punctuation in inline code is left untouched. URLs are left untouched. Numbers are left untouched:1,000、3.14、12:30. Heading levels#→##→###must not exceed three levels.

Mixed Chinese-English Text (Bilingual Publishing/Internationalization)

Add a space between Chinese blocks and English blocks. When Chinese parentheses contain embedded English, use full-width parentheses and half-width punctuation for the English inside. When English blocks contain embedded Chinese, use half-width punctuation for the English and full-width punctuation for the Chinese inside.

Terminology consistency: On first occurrence, keep the English plus a Chinese annotation; afterward use Chinese consistently. Industry-standard abbreviations (SFT/RL/MoE) are kept throughout.

English words with stable Chinese equivalents are directly replaced with Chinese: context→上下文, state→状态, cache→缓存, claim→断言, runtime→运行时, contract→契约.

Social Media (Xiaohongshu/Jike/Twitter)

Moderate flexibility: moderate emoji use is allowed (no more than 2 per paragraph), moderate exclamation mark use is allowed (to express emotion), and --- separators are allowed.

But there are still bottom lines: Chinese cannot use half-width punctuation, spaces are still required between Chinese and English, and there cannot be 3 or more consecutive exclamation marks.


English punctuation proofreading

Automatic correction of English punctuation:

  • Space after comma:a,b → a, b
  • Space after period:end.Start → end. Start
  • Quote direction: straight quotes"→ curly quotes" '(non-code)
  • Dash:---→— --→–
  • Ellipsis:...→…
  • Capitalization: first word of sentence
  • Merge consecutive spaces

English AI vocabulary replacement: delve→examine, leverage→use, utilize→use, robust→strong, streamline→simplify, harness→use, navigate→handle, unpack→explain, paradigm→system, synergy→combination, tapestry→mix, landscape→situation, game-changer→significant, moving forward→next.


Code/machine-readable content protection

Punctuation in the following areas is 100% untouched:

  • Code fences ``` and inline code
  • URLs, emails, file paths
  • Numbers: thousands separators1,000, decimals3.14, times12:30
  • HTML/XML tags <div>
  • Command-line arguments --flag
  • JSON key names "key": "value"

Execution flow

First identify the scenario, then mark protected areas, then scan and detect, and finally correct in layers.

  1. Scenario identification: contains code blocks/URLs/arguments→technical documentation; mixed Chinese and English >30%→bilingual; contains @/#/emoji→social media; default→Chinese prose
  2. Protection marking: mark code fences, inline code, URLs, emails, numbers, English abbreviations
  3. Detection scan: quickly scan half-width punctuation and Chinese-Western spaces→deeply scan dashes/ellipses/exclamation marks→contextually judge enumeration commas and quotation marks
  4. Layered correction: automatically correct 80% (half-width→full-width, space completion)→suggest corrections for 15% (enumeration commas, quote direction)→manual review for 5% (semantically ambiguous items)

Two output modes: dry-run only gives a report, execution mode outputs the corrected text + change list.


Collaboration with other skills

Call after de-AI-flavoring and deleting filler, and before packaging and publishing:

humanize-ai(去AI味)→ editor-revisor(删废话)→ punct-polish(标点打磨)→ packaging-workshop(包装发布)

Quantitative metrics

  • Half-width punctuation correction rate ≥99%
  • Chinese-Western space completion rate ≥95%
  • Code protection accuracy 100% (zero tolerance)
  • False positive rate ≤2%
  • Semantically ambiguous item marking rate ≥90%

Output format

【标点检测报告】

场景:{中文散文/技术文档/中英混排/社交媒体}
保护:{代码围栏N处 / URLN处 / 数字N处 / 行内代码N处}

【自动修正】(N处)
- 「原文」→ 「修正后」— 原因

【建议修正】(N处)
- 「原文」→ 「建议修正」— 需要判断:{原因}

【人工复核】(N处)
- 「原文」— 模糊原因:{需要人工判断的内容}

【统计】
- 自动修正:N处 | 建议修正:N处 | 人工复核:N处 | 保护未动:N处

Do not do this

  • Modify any punctuation inside code fences
  • Modify punctuation inside URLs/emails/paths
  • Modify punctuation inside numbers (thousands separators, decimals, times)
  • Use the punctuation flexibility of advertising copy in technical documentation
  • Force-disable all emoji in social media
  • Impose Chinese punctuation rules on pure English text

punct-polish v1.1.0 — twelve error types, four scenarios, zero code collateral damage