agentleFS
skyllwtskyllwt/AutoSci/.claude/skills/paper-draft/SKILL.md

paper-draft

Skill1.7k starsChanged 2 months agoMITView on GitHub

Draft a LaTeX paper from PAPER_PLAN — write each section from wiki sources + generate figures/tables + BibTeX verification + de-AI polish

2 other projects use a version of this, 1 of them edited.

Trending

Quiet since June.thin dataabout the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 4 mentionsJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the skyllwt/AutoSci repository that our weekly crawl found: only 5 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. About 0 are common, 16 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read PAPER_PLAN.md; extract venue, title, section list

    line 65
  2. Very specific:

    If paper/ directory already exists:

    line 66
  3. Distinctive:

    If no template: use generic article class.

    line 80
  4. Distinctive:

    Use TikZ or pgfplots to generate native LaTeX figures

    line 115
  5. Distinctive:

    If too complex: generate a matplotlib Python script → output PDF

    line 116
  6. Distinctive:

    Use booktabs style (toprule, midrule, bottomrule)

    line 133
  7. Distinctive:

    Read the relevant portions of all related wiki pages:

    line 149
  8. Distinctive:

    Write according to the paragraph plan for that section

    line 159
  9. Very specific:

    Use symbols defined in math_commands.tex

    line 162
  10. Distinctive:

    Remove filler sentences (sentences that add no information)

    line 172
  11. Distinctive:

    Ensure active voice predominates

    line 173
  12. Very specific:

    If --review is enabled, for each section:

    line 178
  13. Distinctive:

    After all sections are complete:

    line 220
  14. Very specific:

    all files referenced by \input{sections/X} exist

    line 250
  15. Distinctive:

    Each section draws from wiki: do not generate content from nothing.

    line 284
  16. Distinctive:

    Anonymous submission: do not write author names, institutions, or acknowledgements (per venue anonymity requirements)

    line 288
  17. Distinctive:

    Notation consistency: all sections use unified symbols from math_commands.tex

    line 290
  18. Distinctive:

    Back up existing paper/ before overwriting: do not overwrite directly.

    line 291
  19. Distinctive:

    Tables use booktabs: no vertical lines or full grid

    line 293
  20. Distinctive:

    All BibTeX fetches failed: use [UNCONFIRMED] placeholders.

    line 301
  21. Distinctive:

    Venue template not found: use generic article class.

    line 303

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/paper-draft

Draft a complete LaTeX paper from the PAPER_PLAN.md generated by /paper-plan. Write section by section: each section draws material from wiki ideas/methods/experiments/papers/concepts, generates LaTeX + figures + tables. BibTeX is fetched from DBLP/CrossRef (following citation-verification). Apply de-AI polish after completion (following academic-writing). Optional per-section Review LLM review. Output a compilable paper/ directory.

Inputs

  • plan: path to PAPER_PLAN.md (e.g. wiki/outputs/paper-plan-sparse-lora-2026-04-08.md)
  • --review (optional): enable per-section Review LLM review
  • --sections (optional): write only specified sections (e.g. --sections 3,4 writes only Method + Experiments); used for incremental writing

Outputs

  • paper/ directory (under the wiki project root):
    • paper/main.tex — master file (includes each section)
    • paper/sections/introduction.tex
    • paper/sections/related_work.tex
    • paper/sections/method.tex
    • paper/sections/experiments.tex
    • paper/sections/conclusion.tex
    • paper/sections/appendix.tex (if applicable)
    • paper/figures/ — generated figures (PDF/PNG)
    • paper/tables/ — standalone table files (optional)
    • paper/math_commands.tex — shared math symbol definitions
    • paper/references.bib — verified BibTeX entries
  • wiki/log.md — appended log entry

Wiki Interaction

Reads

  • wiki/outputs/paper-plan-*.md — PAPER_PLAN (section outline, evidence map, figure plan, citation plan)
  • wiki/ideas/*.md — Hypothesis, Novelty argument, Approach sketch, Motivation, Risks, Lessons learned
  • wiki/methods/*.md — Mechanism, Procedure, Assumptions, Tradeoff profile (supports Method writing)
  • wiki/experiments/*.md — Results, Analysis, key_result, metrics data
  • wiki/papers/*.md — Method, Results, Related (as citation content and baseline reference)
  • wiki/concepts/*.md — Definition, Intuition, Variants, Comparison (supports Method writing)
  • wiki/topics/*.md — Overview, Timeline, SOTA tracker, Open problems (supports Introduction context)
  • wiki/people/*.md — author names and institutions (citation formatting)
  • wiki/graph/edges.jsonl — relationship graph (build argumentative logic chain)
  • wiki/graph/open_questions.md — known limitations (write Limitations and Future Work)
  • .claude/skills/shared-references/academic-writing.md — writing standards
  • .claude/skills/shared-references/citation-verification.md — citation discipline

Writes

  • paper/ directory (all files)
  • wiki/log.md — appended operation log

Graph edges created

  • None (paper-plan already created derived_from edges)

Workflow

Precondition: confirm the working directory is the wiki project root (the directory containing wiki/, raw/, tools/).

Step 1: Initialize Paper Directory

  1. Read PAPER_PLAN.md; extract venue, title, section list
  2. If paper/ directory already exists:
    • Back up as paper.bak-{timestamp}/
    • Prompt user to confirm overwrite
  3. Create directory structure:
    paper/
    ├── main.tex
    ├── math_commands.tex
    ├── references.bib
    ├── sections/
    └── figures/
  4. Copy venue template from templates/ if it exists:
    • templates/{venue}.sty or templates/{venue}/
    • If no template: use generic article class; note in main.tex that the official template must be substituted
  5. Generate math_commands.tex:
    • Collect notation from wiki/methods/ (## Mechanism, ## Procedure) and wiki/concepts/ (## Definition, ## Intuition)
    • Unify symbol definitions (vectors, matrices, sets, common operators)
  6. Generate main.tex skeleton:
    \documentclass{article} % replace with venue template
    \input{math_commands}
    % packages
    \usepackage{booktabs,graphicx,amsmath,hyperref}
    
    \title{<title>}
    \author{} % leave empty for anonymous submission
    
    \begin{document}
    \maketitle
    \begin{abstract}
    % generated in Step 3
    \end{abstract}
    \input{sections/introduction}
    \input{sections/related_work}
    \input{sections/method}
    \input{sections/experiments}
    \input{sections/conclusion}
    \bibliography{references}
    \bibliographystyle{plain} % replace with venue-required style
    % \input{sections/appendix} % uncomment if needed
    \end{document}

Step 2: Generate Figures and Tables

For each entry in the Figure Plan from PAPER_PLAN:

  1. Diagram type (architecture diagrams, etc.):
    • Use TikZ or pgfplots to generate native LaTeX figures
    • If too complex: generate a matplotlib Python script → output PDF
    • Save to paper/figures/{figure-name}.pdf
  2. Plot type (experimental result charts):
    • Extract data from wiki/experiments/{slug}.md
    • Generate matplotlib script (following figure design standards in academic-writing):
      • Colorblind-safe palette
      • Font size >= 8pt
      • Error bars / confidence bands
      • Clear legend
    • Execute script to generate PDF:
      python3 paper/figures/plot_{name}.py
    • Save to paper/figures/{figure-name}.pdf
  3. Table type:
    • Use booktabs style (toprule, midrule, bottomrule)
    • Best result bold, second-best underline
    • Embed directly in section .tex file (small tables) or standalone paper/tables/{name}.tex (large tables)

Step 3: Write Sections

For each section (in the outline order from PAPER_PLAN); if --sections is specified, write only those sections:

3a. Collect Material

From the section definition in PAPER_PLAN, extract:

  • the ideas this section supports
  • the list of corresponding wiki pages
  • planned figures/tables
  • citation list

Read the relevant portions of all related wiki pages:

  • Introduction → wiki/ideas/{idea}.md (Hypothesis, Motivation, Novelty argument) + wiki/topics/{topic}.md#Overview
  • Related Work → wiki/papers/.md#Related + wiki/concepts/.md#Comparison
  • Method → wiki/methods/{method}.md (## Mechanism + ## Procedure) + wiki/concepts/{concept}.md (## Definition + ## Intuition)
  • Experiments → wiki/experiments/.md#Results + wiki/experiments/.md#Analysis
  • Conclusion → wiki/ideas/.md#Lessons_learned + wiki/concepts/.md#Open_problems + wiki/topics/*.md#Open_problems + wiki/graph/open_questions.md

3b. Write LaTeX

Following shared-references/academic-writing.md:

  • Write according to the paragraph plan for that section
  • Insert \cite{key} citations (keys mapped from citation plan)
  • Insert \ref{fig:name} / \ref{tab:name} references to figures/tables
  • Use symbols defined in math_commands.tex
  • Begin each paragraph with a topic sentence
  • Experiments section: idea-first structure ("Our hypothesis is X. To verify, we...")

3c. De-AI Polish

Apply de-AI polish to each written section (per academic-writing.md):

  1. Scan and replace AI-signature vocabulary (delve, leverage, utilize, comprehensive...)
  2. Remove excessive hedging
  3. Vary sentence openings (avoid consecutive identical sentence structures)
  4. Remove filler sentences (sentences that add no information)
  5. Ensure active voice predominates
  6. Check notation consistency

3d. Optional Review LLM Review (--review)

If --review is enabled, for each section:

mcp__llm-review__chat:
  system: "You are a senior ML researcher reviewing one section of a paper draft.
           Focus on: clarity, logical flow, idea-experiment alignment, notation consistency.
           Point out any remaining AI-sounding language patterns.
           Suggest specific rewrites for unclear passages."
  message: |
    ## Section: {section name}
    {LaTeX content}

    ## Ideas this section should support
    {ideas from the plan's idea list}

    ## Review this section for:
    1. Does it clearly support its target ideas?
    2. Is the writing clear and precise?
    3. Any AI-generated language patterns remaining?
    4. Is the notation consistent with other sections?
    5. Missing content that reviewers will expect?

Revise the section based on Review LLM feedback (inline edits; do not rewrite the entire section).

Step 4: Build Bibliography

Following shared-references/citation-verification.md:

  1. Collect all \cite{key} citations used across sections
  2. For each citation, retrieve BibTeX from the PAPER_PLAN's citation plan:
    • Verified: write directly to references.bib
    • [UNCONFIRMED]: write to the bottom of references.bib with a % [UNCONFIRMED] comment
  3. Exclude unused entries (do not use \nocite{*})
  4. Validate BibTeX format correctness (each entry has title, author, year)
  5. Output bibliography statistics:
    references.bib: {N} entries, {M} verified, {K} [UNCONFIRMED]

Step 5: Full-Paper Cross-Review

After all sections are complete:

mcp__llm-review__chat:
  system: "You are a senior ML researcher performing a final review of a complete paper draft.
           Focus on: cross-section coherence, idea-experiment thread (do the experiments back the central ideas?),
           narrative flow, notation consistency across sections, figure/table referencing.
           This is NOT a line-by-line review — focus on structural and argumentative issues."
  message: |
    ## Full Paper Draft
    {concatenated LaTeX of all sections}

    ## Evidence Map
    {from PAPER_PLAN}

    ## Review Focus
    1. Does the paper tell a coherent story from Introduction to Conclusion?
    2. Are all ideas from the plan adequately supported in the text?
    3. Is there notation inconsistency between sections?
    4. Are all figures/tables referenced and discussed?
    5. Any redundancy between sections?
    6. Overall readiness for submission (1-10)?

Make final adjustments based on Review LLM feedback.

Step 6: Finalize Output

  1. Confirm all files are written to the paper/ directory
  2. Verify basic integrity:
    • all files referenced by \input{sections/X} exist
    • all files referenced by \includegraphics{figures/X} exist
    • all \cite{key} keys have a corresponding entry in references.bib
    • all \ref{label} have a corresponding \label{label}
  3. Append log:
    python3 tools/research_wiki.py log wiki/ \
      "paper-draft | drafted {venue} paper '{title}' | {N} sections, {M} figures, {K} citations ({V} verified)"
  4. Print to terminal:
    # Paper Write Complete
    
    ## Files
    - paper/main.tex (master file)
    - paper/sections/ ({N} section files)
    - paper/figures/ ({M} figure files)
    - paper/references.bib ({K} entries, {V_count} [UNCONFIRMED])
    - paper/math_commands.tex
    
    ## Status
    - Sections written: {list}
    - De-AI polish: applied
    - Review LLM review: {yes/no, if yes: overall score}
    - [UNCONFIRMED] citations: {count} (resolve before /paper-compile)
    
    ## Next Steps
    - Run `/paper-compile paper/` to compile and verify
    - Resolve [UNCONFIRMED] citations manually
    - Run `/refine paper/main.tex --focus writing` for further polish

Constraints

  • Each section draws from wiki: do not generate content from nothing; every technical statement must trace back to a wiki page
  • BibTeX follows citation-verification.md: fetch from DBLP/CrossRef/S2; do not generate from LLM memory
  • De-AI polish is mandatory: each section must receive a polish pass after writing; cannot be skipped
  • Figures follow academic-writing.md: colorblind-safe, font size >= 8pt, vector format preferred
  • Anonymous submission: do not write author names, institutions, or acknowledgements (per venue anonymity requirements)
  • \nocite{*} is forbidden: only cite entries actually used
  • Notation consistency: all sections use unified symbols from math_commands.tex
  • Back up existing paper/ before overwriting: do not overwrite directly; back up first
  • Wikilink → \cite conversion: [[slug]] references in PAPER_PLAN are converted to \cite{key} in LaTeX
  • Tables use booktabs: no vertical lines or full grid

Error Handling

  • PAPER_PLAN not found: error; suggest running /paper-plan first
  • PAPER_PLAN format incomplete: list missing sections; suggest re-running /paper-plan
  • Wiki page not found (idea/experiment/method/paper referenced in plan does not exist): warn and skip that reference; annotate as missing
  • Figure generation failed (matplotlib error): output placeholder % TODO: generate figure {name}; continue with other sections
  • All BibTeX fetches failed: use [UNCONFIRMED] placeholders; report the count requiring manual handling in the terminal
  • Review LLM unavailable (--review mode): skip section review and cross-review; annotate as "unreviewed"
  • Venue template not found: use generic article class; note in main.tex
  • Section too long (exceeds plan page budget): warn; suggest moving to appendix or compressing

Dependencies

Tools(via Bash)

  • python3 tools/research_wiki.py log wiki/ "<message>" — append log
  • python3 tools/fetch_s2.py search "<title>" — BibTeX fallback (S2 search)
  • python3 — execute matplotlib figure scripts

MCP Servers

  • mcp__llm-review__chat — per-section review (optional, --review) + full-paper cross-review (Step 5)

Claude Code Native

  • Read — read wiki pages and PAPER_PLAN
  • Glob — find wiki pages
  • Write — write files to paper/ directory
  • Bash — execute figure scripts, create directories
  • WebFetch — DBLP / CrossRef BibTeX fetch

Shared References

  • .claude/skills/shared-references/academic-writing.md — writing standards + de-AI polish rules + figure design
  • .claude/skills/shared-references/citation-verification.md — BibTeX fetch workflow + [UNCONFIRMED] protocol

Called by

  • /research Stage 5 (paper writing stage)
  • Manual user invocation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.