doc-consistency for Openclaw

An offline document QA skill that finds internal consistency errors in long DOCX, Markdown, and TXT files and produces a repeatable re-check command.

dongsheng123132
v1.1.0
Aug 10, 2026
0
305
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install doc-consistency

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-consistency 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 doc-consistency?

doc-consistency is an Openclaw Skills document QA utility for checking whether a long document is consistent with itself. It detects dangling cross-references, numbering gaps and duplicates, table-of-contents mismatches, missing recurring sections, terminology drift, duplicate headings, stale years, leftover placeholders, and paragraphs that may have been lost during a merge.

The skill runs fully offline with zero runtime dependencies beyond Node.js 18+, so documents remain on the local machine. It does not write content, polish prose, fact-check claims, provide legal or technical judgments, or make semantic decisions; instead, it performs deterministic, located checks and returns a findings summary, detailed issues, and a command that can be rerun for acceptance or CI validation.

doc-consistency Use Cases

  • Proofread a textbook, manuscript, thesis, manual, contract set, bid, or RFP response for internal consistency.
  • Audit figure, table, equation, appendix, and section cross-references before publication.
  • Detect numbering gaps, duplicate labels, unusual starting numbers, and repeated headings.
  • Compare a merged document with baseline chapters or source files to identify potentially lost paragraphs.
  • Verify that the table of contents agrees with the document body.
  • Enforce consistent terminology with a glossary such as AI Agent = AI agent, AI-Agent.
  • Find unresolved placeholders including TODO, TBD, XXX, 待填, and Lorem ipsum.
  • Catch suspicious stale years near project, date, or contract references.
  • Gate proposal or manuscript delivery when high-severity findings remain.
  • Use Openclaw Skills for a repeatable offline document consistency check instead of relying only on manual review.

How doc-consistency Works

  1. Accept one file or a directory containing supported .docx, .md, or .txt documents.
  2. Extract readable document text and identify headings, section structure, numbering patterns, references, terminology, dates, placeholders, and recurring section signals.
  3. Compare references against available figures, tables, equations, appendices, chapters, headings, and table-of-contents entries.
  4. Detect numbering duplicates, gaps, abnormal starts, duplicate same-level headings, missing standard sections, terminology spelling variants, placeholders, and possible stale years.
  5. When --baseline is supplied, compare the current document with the baseline paths and flag content that appears to have disappeared during merging.
  6. Group findings by severity and rule type, provide locations and evidence, and show a complete summary even when the displayed list is limited.
  7. Emit a re-check command so the same acceptance criteria can be rerun manually, in CI, or as part of a contract delivery workflow.
  8. Clearly report unsupported Word fields such as automatic numbering and automatic footnotes when they are not present in the text layer; an absent finding does not prove those fields are correct.

doc-consistency Setup

Install or access Node.js 18 or newer, then run the checker from the skill directory. The utility has zero third-party dependencies and does not require network access, uploads, or model calls.

node --version
node scripts/check.mjs <file-or-directory> [options]

Common commands:

# Check one DOCX file
node scripts/check.mjs final-manuscript.docx

# Check every supported document in a directory and show all findings
node scripts/check.mjs ./manuscript/ --all

# Compare a merged document with baseline source files
node scripts/check.mjs merged.docx --baseline ./chapters/

# Fail with exit code 1 when high-severity findings exist
node scripts/check.mjs proposal.docx --fail-on high

# Produce complete machine-readable JSON
node scripts/check.mjs manuscript.md --json

# Use a terminology glossary and English reporting
node scripts/check.mjs manuscript.md --glossary glossary.txt --lang en

Available options:

  • --all: Display all findings instead of the default first 20; the summary remains complete.
  • --limit <n>: Set the maximum number of findings shown in the list.
  • --json: Emit the complete, untruncated JSON result for automation.
  • --glossary <file>: Load one rule per line in the form Preferred = variant1, variant2.
  • --baseline <path...>: Compare against baseline files or directories for merge-loss detection.
  • --fail-on high|medium|low: Exit with code 1 at the selected severity threshold.
  • --lang zh|en: Select the report language.

doc-consistency Data Schema & Taxonomy

The checker is primarily a reporting tool: it reads source documents and emits findings rather than modifying the originals or creating replacement files.

Data element Description
Source inputs One file or directory containing .docx, .md, and .txt documents.
Location The document position associated with a finding, such as a heading, paragraph, or referenced item.
Rule type Cross-reference, numbering, TOC/body mismatch, missing section, terminology, placeholder, stale year, duplicate heading, or merge-loss detection.
Severity High, medium, or low, used for prioritization and --fail-on automation.
Evidence The text or structural signal that triggered the finding, such as a missing figure number or inconsistent term.
Summary Counts by severity and distribution by finding type; summaries remain complete even when list output is limited.
Re-check command A rerunnable command included in the report for verification, acceptance, CI, or contract workflows.
Glossary metadata Optional preferred terms and comma-separated variants, one mapping per line.
Baseline metadata Optional reference paths used to identify paragraphs present in baseline material but absent from the current document.

No network payload, model request, or document upload is required. By default, findings are emitted as command output; --json provides a complete machine-readable result for downstream processing.

doc-consistency Advanced Features

  • Fully offline execution with zero dependencies beyond Node.js 18+, supporting privacy-sensitive manuscripts, proposals, and contracts.
  • Machine-readable output through --json for scripts, dashboards, and downstream Openclaw Skills workflows.
  • Severity-aware quality gates with --fail-on high|medium|low, suitable for CI pipelines and delivery acceptance.
  • Baseline comparison for detecting paragraphs or sections lost during multi-author merges.
  • Custom terminology governance through a simple glossary file.
  • Directory-level scanning for chapter collections and multi-contributor document projects.
  • Bilingual reporting with --lang zh or --lang en.
  • Controlled output volume using --all and --limit while preserving complete aggregate counts.
  • Located findings and a reproducible re-check command, making review results auditable rather than dependent on a one-time manual pass.
  • Explicit boundary reporting for Word automatic numbering and footnote fields that are unavailable in the text layer, avoiding false assurances.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*