Document Merger and Section Checker (doc-merge-check) for Openclaw

A robust document automation tool to merge multiple Microsoft Word (.docx) files, unify formatting, and verify required content sections instantly.

x2534817519
v1.0.0
Jun 5, 2026
10
552
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install doc-merge-check

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 doc-merge-check 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 Document Merger and Section Checker (doc-merge-check)?

The doc-merge-check utility is a comprehensive document merge and quality assurance tool designed for environments that handle high volumes of reports, student homework, academic papers, or team contributions. It allows developers and AI agents using Openclaw Skills to seamlessly combine separate Word documents (.docx) in a pre-defined order, enforce unified layout configurations, and automatically audit each file to ensure critical sections or headers are present.

By leveraging Python's docx manipulation capabilities, this tool eliminates the tedious manual labor of copying, pasting, and checking formatting across multiple files. It translates inconsistent raw documents into standardized, professionally formatted publications while generating detailed reports on missing segments or compliance errors.

Document Merger and Section Checker (doc-merge-check) Use Cases

  • Consolidating Team Reports & Project Documents: Merging distinct contributions from multiple stakeholders into a unified business report with consistent margins and fonts.
  • Academic Homework and Assignment Collection: Aggregating student papers or lab reports while instantly checking if they've included crucial sections like Intro, Screenshot, and Sign-off.
  • Document Compliance Auditing: Programmatically scanning draft submissions to identify missing headers, tables of contents, or necessary legal clauses.
  • Dynamic Formatting Normalization: Re-aligning older document templates with a newly updated style guide (margins, Chinese/English font pairs, line spacing) in bulk.

How Document Merger and Section Checker (doc-merge-check) Works

  1. Initialization and Scan: The user supplies a target directory containing the docx files, along with optional parameters specifying the desired compilation order (e.g., list of contributor names).
  2. Section Integrity Check: The script scans each source file's text structure to confirm the existence of critical headers or designated sections.
  3. Dynamic Merge and Sorting: Documents are sequenced exactly according to the provided member list or alphabetically by filename, then compiled programmatically into a single continuous stream.
  4. Style and Layout Normalization: The merged output (or individual documents) undergoes global style normalization, updating paragraph fonts, sizes, line-heights, and page margins to match the specified schema.
  5. Report & Output Generation: A final combined .docx file is exported alongside a comprehensive missing-sections diagnostics payload.

Document Merger and Section Checker (doc-merge-check) Setup

Prerequisites

Ensure you have python-docx installed in your Python environment:

pip install python-docx

Directory Layout

Place merge_and_check.py inside your local directory under a path accessible to your AI coding agents, such as scripts/merge_and_check.py within your Openclaw Skills workflow.

Basic Script Integration

To execute a complete merge-and-check pipeline via Python:

from scripts.merge_and_check import process_homework

result = process_homework(
    input_folder="/path/to/homework_folder",
    output_file="merged_result.docx",
    required_sections=["Introduction", "Screenshots", "Signatures"],
    member_order=["Alice", "Bob", "Charlie"],
    font_config={
        "chinese_font": "宋体",
        "english_font": "Times New Roman",
        "body_size": 12,
        "line_spacing": 1.5
    }
)
print(result)

Document Merger and Section Checker (doc-merge-check) Data Schema & Taxonomy

The tool utilizes a structured Python dictionary schema to handle font configurations and output data. Below is the specification for the default font formatting parameters and returned reports:

Formatting Config Schema

Parameter Type Default Description
chinese_font string "宋体" Primary typeface used for Asian characters
english_font string "Times New Roman" Primary typeface used for Latin characters
body_size integer 12 Font size (in points) applied to standard paragraph bodies
title_size integer 15 Font size (in points) applied to titles and main headers
line_spacing float 1.5 Standard line-spacing scale applied globally
margin_top / bottom float 2.54 Vertical page margins in centimeters
margin_left / right float 3.17 Horizontal page margins in centimeters

Missing-Sections Report Schema

The check_sections function returns a dictionary payload mapping individual file names to an array of missing components:

{
  "homework_member1.docx": ["Screenshots"],
  "homework_member2.docx": []
}

Document Merger and Section Checker (doc-merge-check) Advanced Features

  • Custom Multi-font Mapping: Supports parallel configurations for both Asian (Chinese) and Latin (English) typography to preserve native font rendering rules.
  • Sequence-Based Merging: Order documents using lists of metadata tags or contributor names, gracefully falling back to lexical order when lists are incomplete.
  • One-Click Pipeline Orchestration: Execute content verification, sequence merging, formatting corrections, and export in a single functional pipeline (process_homework).
  • Comprehensive Missing-Section Diagnostics: Generates developer-friendly reports detailing precisely which sections are missing from specific input documents.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*