Chinese Punctuation Checker
A skill for detecting incorrect English punctuation marks in Chinese text.
Features
- Auto Detection: Detect English punctuation marks incorrectly used in Chinese text
- Precise Location: Report line number, column number, and context snippet for each error
- Report Generation: Output Markdown format inspection report
- Batch Fix: One-click replacement of all incorrect punctuation with correct Chinese punctuation
- Project-wide Scan: Support scanning entire project with automatic exclusion of code files
Supported Punctuation Marks
| English |
Chinese |
| , |
, |
| . |
。 |
| ? |
? |
| ! |
! |
| : |
: |
| ; |
; |
| " |
" or " |
| ' |
' or ' |
| ( ) |
( ) |
| [ ] |
【 】 |
| - |
— |
| ... |
…… |
Usage
1. Check a Single File
Users can provide a file path or file content, and the skill will automatically analyze and generate a report.
2. Check Entire Project
Use the following command to check the entire project:
Check English punctuation in the entire project
The skill will automatically:
- Scan text files in the project (including .js, .ts script files)
- Exclude code files (.py, .java, .go, .cpp, .c, .cs, .php, .rb, .swift, .kt, .css, etc.)
- Exclude build directories (node_modules, .git, dist, target, build, out, etc.)
3. Scan Scope
Default file types to check (text files):
.md - Markdown documents
.txt - Text files
.html, .htm - HTML files
.xml - XML files
.json - JSON files (only check string values)
.yml, .yaml - YAML config files
.properties - Properties files
.vue, .jsx, .tsx, .js, .ts - Framework template files and script files
Default excluded directories:
node_modules
.git
dist
target
build
out
.idea
.vscode
__pycache__
.next
.nuxt
Default excluded file types (code files):
.css, .scss, .less, .sass
.py
.java
.go
.cpp, .c, .h, .hpp
.cs
.php
.rb
.swift
.kt
.rs
.sql
4. Generate Report
After checking, generate a Markdown format report including:
- Original content of incorrect punctuation
- Location info (file path, line number, column number)
- Context snippet
- Suggested correct Chinese punctuation replacement
5. Batch Fix
Provide one-click fix functionality to automatically replace all detected incorrect punctuation with correct Chinese punctuation.
Output Format Example
# Chinese Punctuation Check Report
## Summary
- Files checked: 5 files
- Total errors found: 15
- Check time: 2026-01-01 10:00:00
---
## Error Details
### File: docs/README.md
| Line | Column | Wrong | Correct | Context |
|-----|-----|---------|---------|-------|
| 5 | 12 | , | , | "Hello, world" |
| 10 | 8 | . | 。 | "This is a sentence" |
### File: content/about.txt
| Line | Column | Wrong | Correct | Context |
|-----|-----|---------|---------|-------|
| 3 | 15 | ! | ! | "Welcome!" |
---
## Batch Fix
15 incorrect punctuation marks detected. Do you want to fix all? (yes/no)
Execution Flow
- Scan Project: Traverse project directory, filter text files
- Filter Exclusions: Exclude code files and specified directories
- Read Content: Read each qualified file
- Detect Errors: Use regex to identify English punctuation marks
- Record Location: Record file path, line number, column number for each error
- Generate Report: Output Markdown format inspection report
- Provide Fix: Offer batch fix option
Smart Detection Rules
To avoid false positives, the skill uses the following smart detection rules:
- Only check lines containing Chinese characters: Skip lines without Chinese characters
- Exclude URLs and file paths: Do not replace punctuation in URLs or file paths
- Exclude strings in code: Skip code strings even in allowed file extensions
- Exclude comments: Skip Markdown code blocks, HTML comments, etc.
1---2name: cn-punctuation-checker3description: Checks Chinese text for incorrect English punctuation marks. Invoke when user wants to find and fix wrong punctuation in Chinese copy.4---56# Chinese Punctuation Checker78A skill for detecting incorrect English punctuation marks in Chinese text.910## Features11121. **Auto Detection**: Detect English punctuation marks incorrectly used in Chinese text132. **Precise Location**: Report line number, column number, and context snippet for each error143. **Report Generation**: Output Markdown format inspection report154. **Batch Fix**: One-click replacement of all incorrect punctuation with correct Chinese punctuation165. **Project-wide Scan**: Support scanning entire project with automatic exclusion of code files1718## Supported Punctuation Marks1920| English | Chinese |21|---------|---------|22| , | , |23| . | 。 |24| ? | ? |25| ! | ! |26| : | : |27| ; | ; |28| " | " or " |29| ' | ' or ' |30| ( ) | ( ) |31| [ ] | 【 】 |32| - | — |33| ... | …… |3435## Usage3637### 1. Check a Single File3839Users can provide a file path or file content, and the skill will automatically analyze and generate a report.4041### 2. Check Entire Project4243Use the following command to check the entire project:44```45Check English punctuation in the entire project46```4748The skill will automatically:49- Scan text files in the project (including .js, .ts script files)50- Exclude code files (.py, .java, .go, .cpp, .c, .cs, .php, .rb, .swift, .kt, .css, etc.)51- Exclude build directories (node_modules, .git, dist, target, build, out, etc.)5253### 3. Scan Scope5455**Default file types to check (text files):**56- `.md` - Markdown documents57- `.txt` - Text files58- `.html`, `.htm` - HTML files59- `.xml` - XML files60- `.json` - JSON files (only check string values)61- `.yml`, `.yaml` - YAML config files62- `.properties` - Properties files63- `.vue`, `.jsx`, `.tsx`, `.js`, `.ts` - Framework template files and script files6465**Default excluded directories:**66- `node_modules`67- `.git`68- `dist`69- `target`70- `build`71- `out`72- `.idea`73- `.vscode`74- `__pycache__`75- `.next`76- `.nuxt`7778**Default excluded file types (code files):**79- `.css`, `.scss`, `.less`, `.sass`80- `.py`81- `.java`82- `.go`83- `.cpp`, `.c`, `.h`, `.hpp`84- `.cs`85- `.php`86- `.rb`87- `.swift`88- `.kt`89- `.rs`90- `.sql`9192### 4. Generate Report9394After checking, generate a Markdown format report including:95- Original content of incorrect punctuation96- Location info (file path, line number, column number)97- Context snippet98- Suggested correct Chinese punctuation replacement99100### 5. Batch Fix101102Provide one-click fix functionality to automatically replace all detected incorrect punctuation with correct Chinese punctuation.103104## Output Format Example105106```markdown107# Chinese Punctuation Check Report108109## Summary110- Files checked: 5 files111- Total errors found: 15112- Check time: 2026-01-01 10:00:00113114---115116## Error Details117118### File: docs/README.md119120| Line | Column | Wrong | Correct | Context |121|-----|-----|---------|---------|-------|122| 5 | 12 | , | , | "Hello, world" |123| 10 | 8 | . | 。 | "This is a sentence" |124125### File: content/about.txt126127| Line | Column | Wrong | Correct | Context |128|-----|-----|---------|---------|-------|129| 3 | 15 | ! | ! | "Welcome!" |130131---132133## Batch Fix13413515 incorrect punctuation marks detected. Do you want to fix all? (yes/no)136```137138## Execution Flow1391401. **Scan Project**: Traverse project directory, filter text files1412. **Filter Exclusions**: Exclude code files and specified directories1423. **Read Content**: Read each qualified file1434. **Detect Errors**: Use regex to identify English punctuation marks1445. **Record Location**: Record file path, line number, column number for each error1456. **Generate Report**: Output Markdown format inspection report1467. **Provide Fix**: Offer batch fix option147148## Smart Detection Rules149150To avoid false positives, the skill uses the following smart detection rules:1511521. **Only check lines containing Chinese characters**: Skip lines without Chinese characters1532. **Exclude URLs and file paths**: Do not replace punctuation in URLs or file paths1543. **Exclude strings in code**: Skip code strings even in allowed file extensions1554. **Exclude comments**: Skip Markdown code blocks, HTML comments, etc.