Learn writing style from reference papers and revise your LaTeX draft with reviewer feedback
Learn writing style, language patterns, and structure from reference papers, then apply those patterns to revise your LaTeX manuscript. Supports direct editing of .tex files and integrates with LaTeX editor workflows.
This skill activates when:
.tex editingThis skill follows a three-phase workflow with LaTeX-specific enhancements:
Input: User provides reviewer comments and specifies priorities
Workflow:
Folder Structure:
{worktree}/
├── .omc/
│ └── papers/
│ ├── reviews/ # Reviewer comments
│ │ ├── reviewer-1.txt
│ │ ├── reviewer-2.txt
│ │ ├── reviewer-3.txt
│ │ └── meta-review.pdf
│ └── response/ # Generated response letter
│ └── response-to-reviewers.tex
Folder Structure:
{worktree}/
├── .omc/
│ └── papers/
│ ├── refs/ # Reference papers (PDF or text)
│ │ ├── ref-1.pdf
│ │ ├── ref-2.pdf
│ │ └── ref-3.pdf
│ └── profiles/ # Generated style profiles
│ └── style-profile.md
├── latex/
│ ├── main.tex # Main LaTeX file
│ ├── chapters/ # Chapter files
│ ├── sections/ # Section files
│ └── references.bib # Bibliography
└── revised/
└── draft-revised.tex # Output revised draft
User Workflow:
.omc/papers/refs/ folder in your projectAnalysis Process:
PDF Extraction - Use the Read tool to extract text from PDF papers
Read tool natively supports PDF files - use it directlypages parameter to read in chunks (e.g., pages: "1-10", "11-20").omc/papers/refs/ sequentially until all content is extractedWriting Pattern Analysis:
LaTeX-Specific Patterns:
\cite, \citet, \citep)\ref, \label)Create a structured style profile at .omc/papers/profiles/style-profile.md:
# Style Profile
## Vocabulary Patterns
- Academic phrases: "we propose", "our results demonstrate", ...
- Hedging: "suggests", "may indicate", "potentially"
- Certainty: "clearly", "demonstrates", "establishes"
## Sentence Patterns
- Average sentence length: 20-25 words
- Passive/Active ratio: 40/60
- Common structures: [Pattern examples]
## LaTeX Patterns
- Citation style: \citet{author} for narrative, \citep{author} for parenthetical
- Section structure: Introduction → Related Work → Method → Experiments → Conclusion
- Figure refs: "Figure~\ref{fig:name}" (capitalized)
- Equation refs: "Eq.~\eqref{eq:name}"
## Section Templates
### Abstract
- Sentence 1: Problem statement
- Sentence 2: Gap identification
- Sentence 3: Proposed approach
- Sentence 4: Key results
- Sentence 5: Implications
### Introduction
- Paragraph 1: Broad context
- Paragraph 2: Specific problem
- Paragraph 3: Limitations of prior work
- Paragraph 4: Our contributions (bulleted)
Direct .tex File Editing:
The skill can directly read and modify LaTeX files:
Preserve LaTeX Structure:
\label{} and \ref{} intact\cite{} commands$$, \[, \begin{equation})Apply Style Improvements:
Track Changes:
\deleted{old} and \added{new}.tex.diff file with changesTask(
subagent_type="oh-my-claudecode:writer",
model="sonnet",
name="reviewer-comment-analyzer",
prompt="REVIEWER COMMENT ANALYSIS TASK
Analyze reviewer comments and create a revision action plan.
Input:
- Reviewer comments from .omc/papers/reviews/
- User priorities (e.g., 'focus on Reviewer 2's major concerns')
Analysis Tasks:
1. Parse and categorize each comment:
- Major: Requires significant changes, new experiments, or major rewrites
- Minor: Clarifications, typos, additional references, wording changes
- Misunderstanding: Reviewer missed something, needs polite clarification
2. Map comments to paper sections (Introduction, Method, Experiments, etc.)
3. Estimate effort for each change (LOW/MEDIUM/HIGH)
4. Identify conflicting comments (reviewers disagree)
Output:
- Revision plan at .omc/papers/reviews/revision-plan.md
- Comment-to-section mapping table
- Priority-ordered action items
"
)
Task(
subagent_type="oh-my-claudecode:writer",
model="sonnet",
name="response-letter-writer",
prompt="RESPONSE LETTER GENERATION TASK
Generate a professional response letter to reviewers.
Input:
- Original reviewer comments
- List of changes made (from revision-plan.md)
- Revised manuscript sections
Output:
- Response letter at .omc/papers/response/response-to-reviewers.tex
- Format: For each comment, provide:
1. Reviewer's comment (quoted)
2. Our response (polite, detailed)
3. Changes made (with line numbers)
4. Pointer to revised text
Tone: Professional, grateful, non-defensive
"
)
Task(
subagent_type="oh-my-claudecode:writer",
model="sonnet",
name="latex-style-analyzer",
prompt="LATEX PAPER STYLE ANALYSIS TASK
Analyze reference papers and extract writing style patterns with LaTeX-specific focus.
Input: Reference papers from .omc/papers/refs/
Analysis Tasks:
1. Extract text content from PDF papers
2. Identify vocabulary patterns (academic phrases, hedging, certainty)
3. Analyze sentence structures (length, complexity, voice)
4. Map paragraph organization and transitions
5. Document LaTeX-specific patterns:
- Citation commands used
- Section/subsection structure
- Figure/table/equation referencing style
6. Extract abstract and introduction templates
Output: Style profile at .omc/papers/profiles/style-profile.md"
)
Task(
subagent_type="oh-my-claudecode:writer",
model="sonnet",
name="latex-paper-reviser",
prompt="LATEX PAPER REVISION TASK
Revise the LaTeX draft using the learned style profile.
Input:
- Draft: latex/main.tex (or specified .tex file)
- Style profile: .omc/papers/profiles/style-profile.md
Revision Rules:
1. PRESERVE all LaTeX commands (\cite, \ref, \label, math, figures, tables)
2. MODIFY only text content between commands
3. Apply vocabulary patterns from style profile
4. Improve sentence flow and academic tone
5. Match section structure patterns
Output:
- Revised .tex file with tracked changes
- Change summary document
# Create reviewer comments folder
mkdir -p .omc/papers/reviews
mkdir -p .omc/papers/response
User places reviewer comments:
.omc/papers/reviews/
├── reviewer-1.txt
├── reviewer-2.txt
├── reviewer-3.txt
└── meta-review.pdf (optional)
Specify priorities:
/paper-revision review --focus "Reviewer 2" --focus "Reviewer 3's major concerns"
Skill invocation:
/paper-revision analyze-reviews
Actions:
.omc/papers/reviews/revision-plan.md# User creates reference folder
mkdir -p .omc/papers/refs
mkdir -p .omc/papers/profiles
User places reference papers:
.omc/papers/refs/
├── acl-paper-1.pdf
├── acl-paper-2.pdf
└── acl-paper-3.pdf
Skill invocation:
/paper-revision analyze .omc/papers/refs/
Actions:
.omc/papers/refs/ for all PDF files.omc/papers/profiles/style-profile.mdUser provides the LaTeX file to revise:
/paper-revision revise latex/main.tex
Or specify a chapter/section:
/paper-revision revise latex/chapters/method.tex
When reviewer comments are available:
/paper-revision revise latex/main.tex --with-reviews
This will prioritize changes based on reviewer feedback.
Actions:
.tex filerevised/ folderWhen reviewer comments are provided:
/paper-revision generate-response
Actions:
.omc/papers/response/response-to-reviewers.texOutput delivered:
revised/main-revised.tex - Full revised LaTeX filerevised/changes.md - Summary of all changesrevised/main-diff.tex - Version with \added{} and \deleted{} markupUser can:
.tex to verify formattingRead to extract content from PDF and .tex files (Read tool natively supports PDF)pages parameter: Read(path, pages="1-10")Edit to make surgical changes to .tex contentWrite to save style profiles and revised draftsGlob to find all .tex files and PDFs in the projectTask with oh-my-claudecode:writer agent for analysis and revisionproject_memory_add_note to persist style profiles| Purpose | Location |
|---|---|
| Reference papers (input) | {worktree}/.omc/papers/refs/ |
| Style profiles | {worktree}/.omc/papers/profiles/style-profile.md |
| Reviewer comments | {worktree}/.omc/papers/reviews/ |
| Revision plan | {worktree}/.omc/papers/reviews/revision-plan.md |
| Response letter | {worktree}/.omc/papers/response/response-to-reviewers.tex |
| LaTeX source | {worktree}/latex/ or user-specified |
| Revised output | {worktree}/revised/ |
| Change tracking | {worktree}/revised/changes.md |
% All commands preserved exactly
\cite{author2023}
\ref{fig:architecture}
\label{sec:method}
\begin{equation}
E = mc^2
\end{equation}
\begin{figure}[t]
\centering
\includegraphics{architecture.pdf}
\caption{System architecture}
\label{fig:architecture}
\end{figure}
% Text content between commands gets improved
% BEFORE:
\section{Introduction}
In this paper we do thing. The method is good.
We get better results than before.
% AFTER (revised with academic tone):
\section{Introduction}
In this paper, we present a novel approach to X.
Our method demonstrates significant improvements over prior work.
Experimental results show that our approach achieves state-of-the-art performance.
The skill detects and matches the citation style from reference papers:
| Detected Pattern | Applied Revision |
|---|---|
\citep{} for parenthetical | Use \citep{} consistently |
\citet{} for narrative | Use \citet{} for "Author et al. showed" |
Numbered [1] | Maintain numbered style |
Author-year (Smith, 2023) | Maintain author-year style |
pages parameter (e.g., "1-15", "16-30")latex/ directory, clarify the folder structure.tex doesn't compile, investigate:
.tex > 50 pages, suggest chapter-by-chapter revision.bib files automatically - citation style should be preserved.omc/papers/refs/.omc/papers/profiles/style-profile.md.tex file identified\added{} / \deleted{} or separate diff fileOptional settings via ~/.claude/.omc-config.json:
{
"paper-revision": {
"refsFolder": ".omc/papers/refs/",
"profileFolder": ".omc/papers/profiles/",
"latexSourceFolder": "latex/",
"outputFolder": "revised/",
"minReferencePapers": 2,
"maxReferencePapers": 5,
"trackChanges": true,
"diffFormat": "latex-diff",
"preserveBib": true
}
}
# 1. Setup folders
mkdir -p .omc/papers/refs .omc/papers/profiles revised
# 2. Place 2-5 reference papers (PDF) in .omc/papers/refs/
# 3. Invoke skill
/paper-revision
# Or be specific:
/paper-revision analyze .omc/papers/refs/
/paper-revision revise latex/main.tex
# 4. Review output in revised/
revised/main-revised.texrevised/main-revised.texrevised/ folder:VimtexCompile to verifyTask: {{ARGUMENTS}}