iFlytek Chinese Text Proofreader for Openclaw

A zero-dependency Python tool integrating iFlytek's Official Document Proofreading API to detect and correct 27 types of errors in Chinese text.

iflytek.skills
v1.0.1
Jun 18, 2026
0
518
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install iflytek-text-proofread

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install iflytek-text-proofread using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is iFlytek Chinese Text Proofreader?

The iFlytek Chinese Text Proofreader is a lightweight, zero-dependency Python tool that leverages the official iFlytek Document Proofreading API (公文校对) to clean, correct, and optimize Chinese text. Designed to handle up to 220,000 characters per request, this integration is ideal for verifying official government documents, corporate reports, and editorial drafts. It works entirely out of the box using Python's standard library, providing secure HMAC-SHA256 authenticated API transactions.

By leveraging this tool through Openclaw Skills, developers and content teams can automate spelling, syntax, geographical, and politically sensitive error checking. It processes text from raw CLI arguments, standard input, or physical text files, returning highly accurate error locations, descriptive categorization, and replacement recommendations.

iFlytek Chinese Text Proofreader Use Cases

  • Official Document Formatting: Review government-style official communications (公文) to check for missing words, redundant characters, or faulty word orders.
  • Fact-Checking & Terminology Validation: Automatically audit geographical locations, official organization titles, and industry-specific terminology to avoid administrative errors.
  • Editorial & Content Moderation: Scan blog posts, media articles, or educational material for sensitive terms, vulgar phrasing, and punctuation discrepancies before publication.
  • Automated Pipeline Integration: Run the proofreader in CI/CD pipelines, pre-commit hooks, or batch processing scripts using stdin pipes to scan documents automatically.

How iFlytek Chinese Text Proofreader Works

  1. Input Submission: The user passes raw Chinese text via command-line arguments, file paths, or standard input (piping).
  2. Authentication Signing: The Python script calculates an HMAC-SHA256 signed URL using your iFlytek credentials (APP ID, API Key, and API Secret).
  3. Base64 Payload Dispatch: The text is base64-encoded and sent over HTTPS securely via the Python standard library.
  4. API Analysis: iFlytek's engine evaluates the text across 27 distinct error rules including vocabulary, knowledge-base errors, and regulatory risks.
  5. Response Translation: The tool decodes the response, parses the precise index positions (position and length), and lists categorized correction recommendations for the user.

iFlytek Chinese Text Proofreader Setup

First, set up your credentials on the iFlytek Console and enable the Document Proofreading (公文校对) service. Then, configure your environment variables:

export IFLY_APP_ID="your_app_id"
export IFLY_API_KEY="your_api_key"
export IFLY_API_SECRET="your_api_secret"

No external pip installations are required. Run the tool directly using Python 3:

# Basic CLI usage
python3 scripts/text_proofread.py "我要校对这段文字"

# Read from a file
python3 scripts/text_proofread.py --file document.txt

# Pipe from clipboard or another tool
echo "我们要加强对篮球运动的推广" | python3 scripts/text_proofread.py -

iFlytek Chinese Text Proofreader Data Schema & Taxonomy

The tool processes text input and returns detailed, structured JSON representations of detected issues. Below is a taxonomy of the metadata schema returned in the error response:

Field Name Type Description
word String The detected incorrect word or character sequence.
type Integer The category ID corresponding to the specific rule violated (belongId).
position Integer The starting index position (0-based) of the error in the original text.
length Integer The character length of the error word.
suggestion String The suggested correction or system action (e.g., replace, delete).
ruleName String A descriptive rule identifier for the error.

Error Code Reference

  • 9: Typos/Spelling mistakes (e.g., 「篮球」 vs 「足球」)
  • 31 / 32: Extraneous or missing characters
  • 34 / 35: Word order mistakes or semantic redundancy
  • 20: Faulty sentence structures (句式杂糅)
  • 21: Incorrect punctuation
  • 123 / 19: Mistakes in geographical locations or formal institutional names
  • 111 / 118: Sensitive, inappropriate, or low-vulgarity terminology

iFlytek Chinese Text Proofreader Advanced Features

  • Standard Input Piping (-): Enables easy integration with clipboard utilities, IDE extensions, and automation workflows by handling piped input directly.
  • Raw Output Flag (--raw): Outputs the raw API JSON response, facilitating ingestion by down-stream NLP processing tools or diagnostic systems.
  • Zero External Dependencies: Operates entirely using the Python standard library, assuring fast startup times and a minimal security footprint.
  • Scalable Document Truncation: Seamlessly handles text blocks up to 220,000 characters per request, providing warning notifications upon auto-truncation.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*