Claude-skill-registry docrev
Document revision workflow tool (CLI: `rev`). Use when working with Word documents containing reviewer comments, importing track changes to markdown, replying to reviewer comments, building PDF/DOCX outputs, generating response letters, validating citations/DOIs, or any document revision task.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/docrev" ~/.claude/skills/majiayu000-claude-skill-registry-docrev && rm -rf "$T"
skills/data/docrev/SKILL.mddocrev - Document Revision Tool
rev is a CLI tool for document workflows with Word ↔ Markdown round-trips.
Works for any document that goes through Word-based review: scientific papers, contracts, reports, proposals, manuals.
Content and Layout, Separated
In Markdown, you focus on content. Write text, add citations with
[@key], insert equations with $...$, reference figures with @fig:label. No fiddling with fonts or styles.
Layout is controlled in
rev.yaml:
title: "My Document" output: docx: reference-doc: template.docx
Change the template, rebuild, and every document gets the new formatting.
Core Workflow
1. Create or import a project
rev new my-document # Start from scratch rev import manuscript.docx # Start from existing Word doc
2. Build and share
rev build docx # Generate Word document
Send to reviewers. They add comments and track changes in Word.
3. Import feedback
rev sync reviewed.docx # Updates markdown with annotations rev sync # Auto-detect most recent .docx
4. View and address comments
rev status # Project overview rev todo # List all pending comments rev next # Show next pending comment rev comments methods.md # List all comments with context
5. Reply to reviewer comments
Always use the non-interactive reply mode:
rev reply methods.md -n 1 -m "Added clarification about sampling methodology" rev reply results.md -n 3 -m "Updated figure to include 95% CI"
Replies appear as:
{>>Reviewer: Original<<} {>>User: Reply<<}
6. Resolve addressed comments
rev resolve methods.md -n 1 # Mark comment #1 as resolved
7. Rebuild with comment threads
rev build docx --dual # Produces clean + annotated versions
— clean, for submissionpaper.docx
— includes comment threads as Word commentspaper_comments.docx
8. Archive reviewer files
rev archive # Move reviewer files to archive/
9. Generate response letter
rev response # Generate point-by-point response letter
Annotation Syntax (CriticMarkup)
- Additions{++inserted text++}
- Deletions{--deleted text--}
- Substitutions{~~old~>new~~}
- Comments{>>Author: comment<<}
- Resolved comment{>>Author: comment [RESOLVED]<<}
Quick Commands
| Task | Command |
|---|---|
| Create project | |
| Create LaTeX project | |
| Import Word doc | |
| Sync Word feedback | |
| Sync PDF comments | |
| Extract PDF comments | |
| Extract with highlighted text | |
| Append PDF comments | |
| Project status | |
| Next pending | |
| List pending | |
| Filter by author | |
| Reply to all pending | |
| Accept all changes | |
| Build Word | |
| Build PDF | |
| Build clean + annotated Word | |
| Build clean + annotated PDF | |
| Show contributors | |
| Lookup ORCID | |
| Archive reviewer files | |
| Word count per section | |
| Project dashboard | |
| Search all sections | |
| Pre-submission check | |
| Validate citations | |
| Check grammar/style | |
| Check spelling | |
| Open PDF preview | |
| Auto-rebuild on changes | |
| Check for updates | |
DOI Management
rev doi check references.bib # Validate DOIs rev doi lookup references.bib # Find missing DOIs rev doi add 10.1234/example # Add citation from DOI
Validation
rev validate --journal nature # Check journal requirements rev validate --list # List 21 available journal profiles rev lint # Check broken refs, missing citations
Cross-References
Use in markdown files:
- Figure reference (becomes "Figure 1" in Word)@fig:label
- Table reference@tbl:label
- Equation reference@eq:label
- Anchor for figures{#fig:label}
Template Variables
Available in section files (processed during build):
- Current date (YYYY-MM-DD){{date}}
- Custom format{{date:MMMM D, YYYY}}
- Document title{{title}}
- First author{{author}}
- Total word count{{word_count}}
Project Structure
my-document/ ├── rev.yaml # Project config ├── introduction.md # Section files with annotations ├── methods.md ├── results.md ├── discussion.md ├── references.bib # Bibliography ├── figures/ # Images └── paper.docx # Built output
PDF Comment Workflow
For reviewers who annotate PDFs instead of Word documents:
1. Extract comments from PDF
rev pdf-comments annotated.pdf # Display all comments rev pdf-comments annotated.pdf --by-author # Group by reviewer rev pdf-comments annotated.pdf --json # Output as JSON
2. Import into markdown
rev sync annotated.pdf # Auto-import to sections rev pdf-comments annotated.pdf --append methods.md # Append to specific file
3. Build PDF with margin notes
rev build pdf --dual
Produces:
— clean version for submissionpaper.pdf
— comments rendered as LaTeX margin notespaper_comments.pdf
Supported PDF Annotations:
- Sticky notes, text boxes, highlights, underlines, strikethrough, squiggly
When Helping Users
- Setup: Ensure
is set for repliesrev config user "Name" - Sync phase: Run
to get feedback (works with both Word and PDF)rev sync - Review phase: Use
andrev todo
to navigate comments,rev next
to respondrev reply - Accept phase: Use
orrev accept -a
to handle track changesrev review - Build phase: Run
orrev build docx --dual
for annotated versionsrev build pdf --dual - Archive phase: Run
to move reviewer filesrev archive - Validation phase: Run
before submissionrev check - Response letter: Use
to generate point-by-point responsesrev response
Critical: Ask Questions When Unsure
When addressing reviewer comments or editing documents:
- Never guess methods or numbers - If a comment asks for clarification about methodology, sample sizes, statistical parameters, dates, or any quantitative information, ASK the user rather than inventing values
- Placeholders are acceptable - Use
or[???]
when information is missing rather than fabricating data[TODO: specify X] - Search online for references - When comments request citations, use web search to find appropriate references rather than guessing
- Clarify ambiguous requests - If a reviewer comment could be interpreted multiple ways, ask the user which interpretation they prefer
- Verify existing values - When editing numbers that already exist in the document, confirm changes with the user if there's any doubt
Example scenarios requiring user input:
- "Add a reference for this claim" → Search online OR ask user for specific citation
- "Clarify the sample size" → Ask user for the correct number
- "Specify the statistical test used" → Ask user which test was actually used
- "Add the date of data collection" → Ask user for the actual date
For complete command reference, see REFERENCE.md.