CommunityCoding & Developmentgithub.com

Teaching-Works-Lab/exam-word-skill

A Codex skill for comparing and normalizing exam Word documents from Chinese universities.

What is exam-word-skill?

This skill is designed for AI agents like Codex to assist in processing exam Word documents (.docx) commonly used in Chinese higher education. It provides functionality to compare two versions of an exam paper, highlighting differences in structure, formatting, and content. Additionally, it can normalize documents to follow a standard template, ensuring consistency in headers, footers, font styles, and section numbering. The skill leverages Python libraries such as python-docx for document manipulation and difflib for text comparison. By automating these manual tasks, it saves educators and administrators significant time and reduces errors, making it ideal for academic institutions transitioning to digital workflows.

Works with~Claude Code✓Codex CLI~Cursor
npx skills add Teaching-Works-Lab/exam-word-skill

Installed? Explore more Coding & Development skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does exam-word-skill do?

A Codex skill for comparing and normalizing exam Word documents (.docx) used in Chinese university exam papers.

Overview

This skill enables AI agents to perform two main tasks:

  1. Document Comparison: Detect structural and textual differences between two exam Word files.
  2. Template Normalization: Reformat a given exam document to adhere to a defined standard template.

Features

  • Compares headings, paragraphs, tables, and other elements.
  • Highlights additions, deletions, and modifications in a structured report.
  • Applies standard formatting rules (e.g., font family, size, margins).
  • Supports batch processing for multiple files.

Usage

Prerequisites

  • Python 3.9+
  • Install dependencies: pip install python-docx

Comparison

python compare.py --original old_exam.docx --revised new_exam.docx --output report.md

Normalization

python normalize.py --input draft_exam.docx --template template.docx --output final_exam.docx

Platform Support

  • Codex: Fully supported via Python execution.
  • Claude Code: Compatible with minor adjustments.
  • Cursor: Use with custom command bindings.

How It Works

The skill parses .docx files using python-docx, extracts structural elements (sections, paragraphs, tables), and compares them based on XML structure or text content. For normalization, it overwrites style definitions with those from a template document, preserving only the original text.

License

MIT

Related Skills