export-clean

export-clean is a command for Claude Code from lowtidebuild/contract-review. It costs 0 tokens per session (306 once invoked), scanned A, original, Apache-2.0.

A document-cleaning command that removes comments marked [INTERNAL] from a redlined DOCX file. A redline is a document showing tracked edits; DOCX is the standard Microsoft Word file format.

In plain words
What is it for?
Use it to clean a redlined Word document, scan the result for remaining internal markers, and save a delivery copy beside the source file.
Why use it?
It helps prevent private review notes from being sent to the other party while preserving tracked changes and comments marked [EXTERNAL].

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/lowtidebuild/contract-review/export-clean
Clone the repo
git clone --depth 1 https://github.com/lowtidebuild/contract-review

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for export-clean

README.md
[![agentmods](https://agentmods.dev/badge/commands/lowtidebuild/contract-review/export-clean.svg)](https://agentmods.dev/commands/lowtidebuild/contract-review/export-clean)
Your own site
<a href="https://agentmods.dev/commands/lowtidebuild/contract-review/export-clean"><img src="https://agentmods.dev/badge/commands/lowtidebuild/contract-review/export-clean.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 306 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00306
Opus 5 $0.00000 $0.00153
Sonnet 5 $0.00000 $0.00061
Haiku 4.5 $0.00000 $0.00031

Measured 4d ago against content hash 0a425d701234, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

export-clean scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/export-clean.md · 24 lines

What it actually says

Export External-Clean DOCX

Strip all [INTERNAL]-prefixed comments from a redlined DOCX to produce a version safe for counterparty delivery.

$ARGUMENTS


Process

  1. Locate the file: Source .claude/scripts/workspace-paths.sh. If no file is specified, scan $CRA_OUTPUT_DIR first and then any distinct legacy path in $CRA_OUTPUT_DIRS for redlined DOCX files. Ask the user which one to process if multiple files exist. If only one exists, use it.

  2. Strip internal comments:

    • Unpack the DOCX into raw XML
    • Remove all comment entries whose text starts with [INTERNAL]
    • Remove corresponding markers from document.xml, headers, footers, and related threaded-comment metadata parts
    • Preserve all tracked changes and [EXTERNAL] comments
  3. Repack + scan: Reassemble the DOCX and run scan-docx-for-internal-markers.py using .claude/policies/external-clean-policy.yaml.

  4. Verify: If the scanner reports any violation, delete/do not deliver the external-clean DOCX and report the part name plus snippet. Otherwise save as {original_name}_clean.docx beside the selected source file and report the number of internal comments stripped.

This is a safety-critical operation — the output file must contain zero internal strategy, fallback positions, or negotiation leverage information.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 24 lines · 0 tokens per session scan A 0a425d701234

Subscribe to this mod's changes

export-clean is a command published in the GitHub repository lowtidebuild/contract-review (40 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 306 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.