Content proofreading

From aipoch/medical-research-skills · View interactive version

Content proofreading is an AI agent skill from the GitHub repository aipoch/medical-research-skills. An academic proofreading skill for Chinese/English manuscripts, triggered when you need automated checks for spelling, grammar, terminology consistency, and formatting before submission.

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

When to Use

Agent Workflow

Follow these steps in order when the user provides text for proofreading:

Step 1: Identify Input Source

Step 2: Determine Language Scope

Step 3: Run English Checks (if applicable)

Step 4: Run Chinese Checks (if applicable)

Step 5: Run Terminology Check

Step 6: Generate Report

Step 7: Validate Output

Key Features

Dependencies

Example Usage

1) Install

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

pip install -r requirements.txt

2) Run (basic)

python scripts/init_run.py --input <paper_file_path> --output <output_path>

3) Run (advanced)

python scripts/init_run.py \
  --input paper.md \
  --output report.html \
  --lang en \
  --style apa \
  --terminology biology \
  --format html

4) CLI parameters

| Parameter | Description | Default |

|---|---|---|

| --input | Input file path | Required |

| --output | Output report path | Generates an HTML report by default |

| --lang | Language to check (en / zh / both) | both |

| --style | Reference style (apa / mla / gb) | apa |

| --terminology | Domain terminology set | biology |

| --format | Output format (html / markdown) | html |

| --no-pdf | Skip PDF generation during Word→PDF conversion | false |

5) Use as a Python module (end-to-end)

from scripts.english_checker import EnglishChecker
from scripts.chinese_checker import ChineseChecker
from scripts.terminology_manager import TerminologyManager
from scripts.annotation_generator import AnnotationGenerator

text = """
Messenger RNA (mRNA) is transcribed in the nucleus.
"""

en_checker = EnglishChecker()
zh_checker = ChineseChecker()
term_manager = TerminologyManager(domain="biology")

results = []
results.extend(en_checker.check(text))
results.extend(zh_checker.check(text))
results.extend(term_manager.check(text))

generator = AnnotationGenerator(output_format="html")
report = generator.generate(results)

with open("report.html", "w", encoding="utf-8") as f:
    f.write(report)

Implementation Details

Architecture / Core Modules

Terminology database format (JSON)

Organized by domain; each entry can include bilingual forms and abbreviation metadata:

{
  "biology": {
    "cell": {
      "en": "cell",
      "abbrev": null,
      "full_form": null
    },
    "mrna": {
      "en": "mRNA",
      "abbrev": "mRNA",
      "full_form": "messenger RNA"
    }
  }
}

Checking logic (typical):

Rule database format (JSON)

Rules are grouped by language and category:

{
  "english": {
    "spelling": [],
    "grammar": [],
    "style": []
  },
  "format": {
    "references": [],
    "numbers": [],
    "units": []
  }
}

How rules are applied (high level):

Extensibility

1. Create a rule file under assets/rules/.

2. Implement rules following the project’s rule template.

3. Register the rule set in the rule index.

4. Run tests to validate precision/recall and avoid false positives.

1. Create a terminology JSON under assets/terminology/.

2. Follow the domain structure shown above.

3. Register the new domain in the terminology index so it can be selected via --terminology.

When Not to Use

Required Inputs

| Field | Required | Format/Source | Example | If Missing |

|---|---|---|---|---|

| User task description | Yes | Text | Research question, writing goal, analysis objective | Stop and ask user to provide |

| Primary input material | Depends on task | Text, file path, ID, table, or literature | PMID, PDF, CSV, DOCX, keywords, etc. | Specify which material type is missing |

| Output preference | No | Text | Language, format, target journal, template | Use skill default format |

Output Contract

Failure Handling

User Checkpoints

Input Validation

This skill accepts requests that match the documented purpose of content-proofreading and include enough context to complete the workflow safely.

Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:

content-proofreading only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.

Quick Validation

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.