[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FDFTZ6GPRY23FZA74HRV34":3,"skill-same:01M7FDFTZ6GPRY23FZA74HRV34":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7FDFTZ6GPRY23FZA74HRV34","paper-writing",null,"Workflow 3: Full paper writing pipeline. Orchestrates paper-plan → paper-figure → paper-write → paper-compile → auto-paper-improvement-loop to go from a narrative report to a polished, submission-ready PDF. Use when user says \\\"写论文全流程\\\", \\\"write paper pipeline\\\", \\\"从报告到PDF\\\", \\\"paper writing\\\", or wants the complete paper generation workflow.","CZX-LBJ\u002Fdeepseek-science","CZX-LBJ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F204594689?v=4","01M7FC59WQ9PFXT04MKGJDCFFT","czx","01M7FC59XB2GW0BKWN9JTDBQS7",1,"MIT","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fskills-codex-gemini-review\u002Fpaper-writing\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: \"paper-writing\"\ndescription: \"Workflow 3: Full paper writing pipeline. Orchestrates paper-plan \\u2192 paper-figure \\u2192 paper-write \\u2192 paper-compile \\u2192 auto-paper-improvement-loop to go from a narrative report to a polished, submission-ready PDF. Use when user says \\\\\\\"\\u5199\\u8bba\\u6587\\u5168\\u6d41\\u7a0b\\\\\\\", \\\\\\\"write paper pipeline\\\\\\\", \\\\\\\"\\u4ece\\u62a5\\u544a\\u5230PDF\\\\\\\", \\\\\\\"paper writing\\\\\\\", or wants the complete paper generation workflow.\"\n---\n\n> Override for Codex users who want **Gemini**, not a second Codex agent, to act as the reviewer. Install this package **after** `skills\u002Fskills-codex\u002F*`.\n\n# Workflow 3: Paper Writing Pipeline\n\n> **Gemini overlay assurance:** `review_independence: cross-family` and `acceptance_status: accepted`.\n\nOrchestrate a complete paper writing workflow for: **$ARGUMENTS**\n\n## Overview\n\nThis skill chains five sub-skills into a single automated pipeline:\n\n```\n\u002Fpaper-plan → \u002Fpaper-figure → \u002Fpaper-write → \u002Fpaper-compile → \u002Fauto-paper-improvement-loop\n  (outline)     (plots)        (LaTeX)        (build PDF)       (review & polish ×2)\n```\n\nEach phase builds on the previous one's output. The final deliverable is a polished, reviewed `paper\u002F` directory with LaTeX source and compiled PDF.\n\n## Constants\n\n- **VENUE = `ICLR`** — Target venue. Options: `ICLR`, `NeurIPS`, `ICML`. Affects style file, page limit, citation format.\n- **MAX_IMPROVEMENT_ROUNDS = 2** — Number of review→fix→recompile rounds in the improvement loop.\n- **REVIEWER_MODEL = `gemini-review`** — Gemini reviewer invoked through the local `gemini-review` MCP bridge for plan review, figure review, writing review, and the improvement loop.\n- **AUTO_PROCEED = true** — Auto-continue between phases. Set `false` to pause and wait for user approval after each phase.\n- **HUMAN_CHECKPOINT = false** — When `true`, the improvement loop (Phase 5) pauses after each round's review to let you see the score and provide custom modification instructions. When `false` (default), the loop runs fully autonomously. Passed through to `\u002Fauto-paper-improvement-loop`.\n\n> Override inline: `\u002Fpaper-writing \"NARRATIVE_REPORT.md\" — venue: NeurIPS, human checkpoint: true`\n\n## Inputs\n\nThis pipeline accepts one of:\n\n1. **`NARRATIVE_REPORT.md`** (best) — structured research narrative with claims, experiments, results, figures\n2. **Research direction + experiment results** — the skill will help draft the narrative first\n3. **Existing `PAPER_PLAN.md`** — skip Phase 1, start from Phase 2\n\nThe more detailed the input (especially figure descriptions and quantitative results), the better the output.\n\n## Pipeline\n\n### Phase 1: Paper Plan\n\nInvoke `\u002Fpaper-plan` to create the structural outline:\n\n```\n\u002Fpaper-plan \"$ARGUMENTS\"\n```\n\n**What this does:**\n- Parse NARRATIVE_REPORT.md for claims, evidence, and figure descriptions\n- Build a **Claims-Evidence Matrix** — every claim maps to evidence, every experiment supports a claim\n- Design section structure (5-8 sections depending on paper type)\n- Plan figure\u002Ftable placement with data sources\n- Scaffold citation structure\n- Gemini reviews the plan for completeness via the `\u002Fpaper-plan` overlay\n\n**Output:** `PAPER_PLAN.md` with section plan, figure plan, citation scaffolding.\n\n**Checkpoint:** Present the plan summary to the user.\n\n```\n📐 Paper plan complete:\n- Title: [proposed title]\n- Sections: [N] ([list])\n- Figures: [N] auto-generated + [M] manual\n- Target: [VENUE], [PAGE_LIMIT] pages\n\nShall I proceed with figure generation?\n```\n\n- **User approves** (or AUTO_PROCEED=true) → proceed to Phase 2.\n- **User requests changes** → adjust plan and re-present.\n\n### Phase 2: Figure Generation\n\nInvoke `\u002Fpaper-figure` to generate data-driven plots and tables:\n\n```\n\u002Fpaper-figure \"PAPER_PLAN.md\"\n```\n\n**What this does:**\n- Read figure plan from PAPER_PLAN.md\n- Generate matplotlib\u002Fseaborn plots from JSON\u002FCSV data\n- Generate LaTeX comparison tables\n- Create `figures\u002Flatex_includes.tex` for easy insertion\n- Gemini reviews figure quality and captions via the `\u002Fpaper-figure` overlay\n\n**Output:** `figures\u002F` directory with PDFs, generation scripts, and LaTeX snippets.\n\n#### Phase 2b: AI Illustration Generation (when `illustration: true`)\n\n**Skip this step entirely if `illustration` is not set or is `false`.**\n\nIf the paper plan includes architecture diagrams, pipeline figures, or method illustrations, invoke `\u002Fpaper-illustration`:\n\n```\n\u002Fpaper-illustration \"[method description from PAPER_PLAN.md or NARRATIVE_REPORT.md]\"\n```\n\n**What this does:**\n- Codex plans the layout → Gemini optimizes → Nano Banana Pro renders → Codex reviews (score ≥ 9)\n- Output: `figures\u002Fai_generated\u002F*.png` — publication-quality method diagrams\n- Requires `GEMINI_API_KEY` environment variable\n\n> **Without `illustration: true`:** Architecture diagrams must still be created manually (draw.io, Figma, TikZ) and placed in `figures\u002F` before proceeding — same as before.\n\n**Checkpoint:** List generated vs manual figures.\n\n```\n📊 Figures complete:\n- Data plots (auto): [list]\n- AI illustrations (auto): [list, if illustration: true]\n- Manual (need your input): [list]\n- LaTeX snippets: figures\u002Flatex_includes.tex\n\n[If manual figures needed]: Please add them to figures\u002F before I proceed.\n[If all auto]: Shall I proceed with LaTeX writing?\n```\n\n> **Writing invariant (every drafting and revision step):** calibrate each\n> claim to its evidence and state it directly; generic caveats live in the\n> Limitations section only; writing instructions are never manuscript content\n> (\"do not mention X\" means omit X, not \"we do not address X\"); tone edits\n> never change what the paper knows; the paper is a launch, not a progress\n> report — organize around the strongest advantage, give every experiment an\n> argumentative duty, keep unfavorable numbers in the tables and explain them\n> as tradeoffs only where the evidence supports that, never narrating\n> defeats. `\u002Fpaper-write` carries the full CONFIDENT PROSE, HONEST LIMITS\n> contract.\n\n### Phase 3: LaTeX Writing\n\nInvoke `\u002Fpaper-write` to generate section-by-section LaTeX:\n\n```\n\u002Fpaper-write \"PAPER_PLAN.md\"\n```\n\n**What this does:**\n- Write each section following the plan, with proper LaTeX formatting\n- Insert figure\u002Ftable references from `figures\u002Flatex_includes.tex`\n- Build `references.bib` from citation scaffolding\n- Clean stale files from previous section structures\n- Automated bib cleaning (remove uncited entries)\n- De-AI polish (remove \"delve\", \"pivotal\", \"landscape\"...)\n- Gemini reviews each section for quality via the `\u002Fpaper-write` overlay\n\n**Output:** `paper\u002F` directory with `main.tex`, `sections\u002F*.tex`, `references.bib`, `math_commands.tex`.\n\n**Checkpoint:** Report section completion.\n\n```\n✍️ LaTeX writing complete:\n- Sections: [N] written ([list])\n- Citations: [N] unique keys in references.bib\n- Stale files cleaned: [list, if any]\n\nShall I proceed with compilation?\n```\n\n### Phase 4: Compilation\n\nInvoke `\u002Fpaper-compile` to build the PDF:\n\n```\n\u002Fpaper-compile \"paper\u002F\"\n```\n\n**What this does:**\n- `latexmk -pdf` with automatic multi-pass compilation\n- Auto-fix common errors (missing packages, undefined refs, BibTeX syntax)\n- Up to 3 compilation attempts\n- Post-compilation checks: undefined refs, page count, font embedding\n- Precise page verification via `pdftotext`\n- Stale file detection\n\n**Output:** `paper\u002Fmain.pdf`\n\n**Checkpoint:** Report compilation results.\n\n```\n🔨 Compilation complete:\n- Status: SUCCESS\n- Pages: [X] (main body) + [Y] (references) + [Z] (appendix)\n- Within page limit: YES\u002FNO\n- Undefined references: 0\n- Undefined citations: 0\n\nShall I proceed with the improvement loop?\n```\n\n### Phase 5: Auto Improvement Loop\n\nInvoke `\u002Fauto-paper-improvement-loop` to polish the paper:\n\n```\n\u002Fauto-paper-improvement-loop \"paper\u002F\"\n```\n\n**What this does (2 rounds):**\n\n**Round 1:** Gemini reviews the full paper → identifies CRITICAL\u002FMAJOR\u002FMINOR issues → Codex implements fixes → recompile → save `main_round1.pdf`\n\n**Round 2:** Gemini re-reviews the recompiled draft cold (fresh review — no fix summaries, no conversation carry-over) → identifies remaining issues → Codex implements fixes → recompile → save `main_round2.pdf`\n\n**Typical improvements (calibration cuts both ways):**\n- Fix assumption-model mismatches\n- Narrow genuine overclaims to the supported scope — and state supported claims\n  directly, removing redundant hedges\n- Consolidate scattered generic caveats into Limitations\n- Add missing interpretations and notation\n- Make Limitations more specific (only when a material limit is missing — never pad)\n- Add theory-aligned experiments if needed\n\n**Output:** Three PDFs for comparison + `PAPER_IMPROVEMENT_LOG.md`.\n\n**Format check** (included in improvement loop Step 8): After final recompilation, auto-detect and fix overfull hboxes (content exceeding margins), verify page count vs venue limit, and ensure compact formatting. Any overfull > 10pt is fixed before generating the final PDF.\n\n### Phase 5.9: Integrity Forensics (opt-in — Codex executor rules apply)\n\nSame contract as the base Codex pack (`skills-codex\u002Fpaper-writing` Phase 5.9,\nwhich this overlay does not change): the executor here is Codex, so only\nupstream's **deterministic-only slice** of `\u002Fintegrity-forensics` is runnable\n(numeric core + rules-only reporter — it can flag, it can never say\nCLEAN), OFF unless the CURRENT `$ARGUMENTS` contains `— self_forensics:\ntrue`. If opted in: run the launcher on `paper\u002F` (absolute path), then before\nthe Final Report require `python3 \"$GATE_HELPER\" fresh --paper-dir paper\u002F\n--anti-ar-commit \"$ANTI_AR_COMMIT\"` exit 0 — an opted-in run without a fresh gate is **incomplete, not\nskippable**; gate `BLOCK` refuses the Final Report.\n\n### Phase 6: Final Report\n\n```markdown\n# Paper Writing Pipeline Report\n\n**Input**: [NARRATIVE_REPORT.md or topic]\n**Venue**: [ICLR\u002FNeurIPS\u002FICML]\n**Forensics**: [NO_NEW_BLOCKER | WARN: \u003Cn> open obligations (listed below) | BLOCK | n\u002Fa (opt-in, not requested)]\n**Date**: [today]\n\n## Pipeline Summary\n\n| Phase | Status | Output |\n|-------|--------|--------|\n| 1. Paper Plan | ✅ | PAPER_PLAN.md |\n| 2. Figures | ✅ | figures\u002F ([N] auto + [M] manual) |\n| 3. LaTeX Writing | ✅ | paper\u002Fsections\u002F*.tex ([N] sections, [M] citations) |\n| 4. Compilation | ✅ | paper\u002Fmain.pdf ([X] pages) |\n| 5. Improvement | ✅ | [score0]\u002F10 → [score2]\u002F10 |\n\n## Improvement Scores\n| Round | Score | Key Changes |\n|-------|-------|-------------|\n| Round 0 | X\u002F10 | Baseline |\n| Round 1 | Y\u002F10 | [summary] |\n| Round 2 | Z\u002F10 | [summary] |\n\n## Deliverables\n- paper\u002Fmain.pdf — Final polished paper\n- paper\u002Fmain_round0_original.pdf — Before improvement\n- paper\u002Fmain_round1.pdf — After round 1\n- paper\u002Fmain_round2.pdf — After round 2\n- paper\u002FPAPER_IMPROVEMENT_LOG.md — Full review log\n\n## Remaining Issues (if any)\n- [items from final review that weren't addressed]\n\n## Next Steps\n- [ ] Visual inspection of PDF\n- [ ] Add any missing manual figures\n- [ ] Submit to [venue] via OpenReview \u002F CMT \u002F HotCRP\n```\n\n## Output Protocols\n\n> Follow these shared protocols for all output files:\n> - **[Output Versioning Protocol](..\u002F..\u002Fshared-references\u002Foutput-versioning.md)** — write timestamped file first, then copy to fixed name\n> - **[Output Manifest Protocol](..\u002F..\u002Fshared-references\u002Foutput-manifest.md)** — log every output to MANIFEST.md\n> - **[Output Language Protocol](..\u002F..\u002Fshared-references\u002Foutput-language.md)** — respect the project's language setting\n> - Note: paper content is always written in English regardless of project language setting.\n\n## Key Rules\n\n- **Large file handling**: If the Write tool fails due to file size, immediately retry using Bash (`cat \u003C\u003C 'EOF' > file`) to write in chunks. Do NOT ask the user for permission — just do it silently.\n\n- **Don't skip phases.** Each phase builds on the previous one — skipping leads to errors.\n- **Checkpoint between phases** when AUTO_PROCEED=false. Present results and wait for approval.\n- **Manual figures first.** If the paper needs architecture diagrams or qualitative results, the user must provide them before Phase 3.\n- **Compilation must succeed** before entering the improvement loop. Fix all errors first.\n- **Preserve all PDFs.** The user needs round0\u002Fround1\u002Fround2 for comparison.\n- **Document everything.** The pipeline report should be self-contained.\n- **Respect page limits.** If the paper exceeds the venue limit, suggest specific cuts before the improvement loop.\n\n## Composing with Other Workflows\n\n```\n\u002Fidea-discovery \"direction\"         ← Workflow 1: find ideas\nimplement                           ← write code\n\u002Frun-experiment                     ← deploy experiments\n\u002Fauto-review-loop \"paper topic\"     ← Workflow 2: iterate research\n\u002Fpaper-writing \"NARRATIVE_REPORT.md\"  ← Workflow 3: you are here\n                                         submit! 🎉\n\nOr use \u002Fresearch-pipeline for the Workflow 1+2 end-to-end flow,\nthen \u002Fpaper-writing for the final writing step.\n```\n\n## Typical Timeline\n\n| Phase | Duration | Can sleep? |\n|-------|----------|------------|\n| 1. Paper Plan | 5-10 min | No |\n| 2. Figures | 5-15 min | No |\n| 3. LaTeX Writing | 15-30 min | Yes ✅ |\n| 4. Compilation | 2-5 min | No |\n| 5. Improvement | 15-30 min | Yes ✅ |\n\n**Total: ~45-90 min** for a full paper from narrative report to polished PDF.\n","> Override for Codex users who want **Gemini**, not a second Codex agent, to act as the reviewer. Install this package **after** `skills\u002Fskills-codex\u002F*`.\n\n# Workflow 3: Paper Writing Pipeline\n\n> **Gemini overlay assurance:** `review_independence: cross-family` and `acceptance_status: accepted`.\n\nOrchestrate a complete paper writing workflow for: **$ARGUMENTS**\n\n## Overview\n\nThis skill chains five sub-skills into a single automated pipeline:\n\n```\n\u002Fpaper-plan → \u002Fpaper-figure → \u002Fpaper-write → \u002Fpaper-compile → \u002Fauto-paper-improvement-loop\n  (outline)     (plots)        (LaTeX)        (build PDF)       (review & polish ×2)\n```\n\nEach phase builds on the previous one's output. The final deliverable is a polished, reviewed `paper\u002F` directory with LaTeX source and compiled PDF.\n\n## Constants\n\n- **VENUE = `ICLR`** — Target venue. Options: `ICLR`, `NeurIPS`, `ICML`. Affects style file, page limit, citation format.\n- **MAX_IMPROVEMENT_ROUNDS = 2** — Number of review→fix→recompile rounds in the improvement loop.\n- **REVIEWER_MODEL = `gemini-review`** — Gemini reviewer invoked through the local `gemini-review` MCP bridge for plan review, figure review, writing review, and the improvement loop.\n- **AUTO_PROCEED = true** — Auto-continue between phases. Set `false` to pause and wait for user approval after each phase.\n- **HUMAN_CHECKPOINT = false** — When `true`, the improvement loop (Phase 5) pauses after each round's review to let you see the score and provide custom modification instructions. When `false` (default), the loop runs fully autonomously. Passed through to `\u002Fauto-paper-improvement-loop`.\n\n> Override inline: `\u002Fpaper-writing \"NARRATIVE_REPORT.md\" — venue: NeurIPS, human checkpoint: true`\n\n## Inputs\n\nThis pipeline accepts one of:\n\n1. **`NARRATIVE_REPORT.md`** (best) — structured research narrative with claims, experiments, results, figures\n2. **Research direction + experiment results** — the skill will help draft the narrative first\n3. **Existing `PAPER_PLAN.md`** — skip Phase 1, start from Phase 2\n\nThe more detailed the input (especially figure descriptions and quantitative results), the better the output.\n\n## Pipeline\n\n### Phase 1: Paper Plan\n\nInvoke `\u002Fpaper-plan` to create the structural outline:\n\n```\n\u002Fpaper-plan \"$ARGUMENTS\"\n```\n\n**What this does:**\n- Parse NARRATIVE_REPORT.md for claims, evidence, and figure descriptions\n- Build a **Claims-Evidence Matrix** — every claim maps to evidence, every experiment supports a claim\n- Design section structure (5-8 sections depending on paper type)\n- Plan figure\u002Ftable placement with data sources\n- Scaffold citation structure\n- Gemini reviews the plan for completeness via the `\u002Fpaper-plan` overlay\n\n**Output:** `PAPER_PLAN.md` with section plan, figure plan, citation scaffolding.\n\n**Checkpoint:** Present the plan summary to the user.\n\n```\n📐 Paper plan complete:\n- Title: [proposed title]\n- Sections: [N] ([list])\n- Figures: [N] auto-generated + [M] manual\n- Target: [VENUE], [PAGE_LIMIT] pages\n\nShall I proceed with figure generation?\n```\n\n- **User approves** (or AUTO_PROCEED=true) → proceed to Phase 2.\n- **User requests changes** → adjust plan and re-present.\n\n### Phase 2: Figure Generation\n\nInvoke `\u002Fpaper-figure` to generate data-driven plots and tables:\n\n```\n\u002Fpaper-figure \"PAPER_PLAN.md\"\n```\n\n**What this does:**\n- Read figure plan from PAPER_PLAN.md\n- Generate matplotlib\u002Fseaborn plots from JSON\u002FCSV data\n- Generate LaTeX comparison tables\n- Create `figures\u002Flatex_includes.tex` for easy insertion\n- Gemini reviews figure quality and captions via the `\u002Fpaper-figure` overlay\n\n**Output:** `figures\u002F` directory with PDFs, generation scripts, and LaTeX snippets.\n\n#### Phase 2b: AI Illustration Generation (when `illustration: true`)\n\n**Skip this step entirely if `illustration` is not set or is `false`.**\n\nIf the paper plan includes architecture diagrams, pipeline figures, or method illustrations, invoke `\u002Fpaper-illustration`:\n\n```\n\u002Fpaper-illustration \"[method description from PAPER_PLAN.md or NARRATIVE_REPORT.md]\"\n```\n\n**What this does:**\n- Codex plans the layout → Gemini optimizes → Nano Banana Pro renders → Codex reviews (score ≥ 9)\n- Output: `figures\u002Fai_generated\u002F*.png` — publication-quality method diagrams\n- Requires `GEMINI_API_KEY` environment variable\n\n> **Without `illustration: true`:** Architecture diagrams must still be created manually (draw.io, Figma, TikZ) and placed in `figures\u002F` before proceeding — same as before.\n\n**Checkpoint:** List generated vs manual figures.\n\n```\n📊 Figures complete:\n- Data plots (auto): [list]\n- AI illustrations (auto): [list, if illustration: true]\n- Manual (need your input): [list]\n- LaTeX snippets: figures\u002Flatex_includes.tex\n\n[If manual figures needed]: Please add them to figures\u002F before I proceed.\n[If all auto]: Shall I proceed with LaTeX writing?\n```\n\n> **Writing invariant (every drafting and revision step):** calibrate each\n> claim to its evidence and state it directly; generic caveats live in the\n> Limitations section only; writing instructions are never manuscript content\n> (\"do not mention X\" means omit X, not \"we do not address X\"); tone edits\n> never change what the paper knows; the paper is a launch, not a progress\n> report — organize around the strongest advantage, give every experiment an\n> argumentative duty, keep unfavorable numbers in the tables and explain them\n> as tradeoffs only where the evidence supports that, never narrating\n> defeats. `\u002Fpaper-write` carries the full CONFIDENT PROSE, HONEST LIMITS\n> contract.\n\n### Phase 3: LaTeX Writing\n\nInvoke `\u002Fpaper-write` to generate section-by-section LaTeX:\n\n```\n\u002Fpaper-write \"PAPER_PLAN.md\"\n```\n\n**What this does:**\n- Write each section following the plan, with proper LaTeX formatting\n- Insert figure\u002Ftable references from `figures\u002Flatex_includes.tex`\n- Build `references.bib` from citation scaffolding\n- Clean stale files from previous section structures\n- Automated bib cleaning (remove uncited entries)\n- De-AI polish (remove \"delve\", \"pivotal\", \"landscape\"...)\n- Gemini reviews each section for quality via the `\u002Fpaper-write` overlay\n\n**Output:** `paper\u002F` directory with `main.tex`, `sections\u002F*.tex`, `references.bib`, `math_commands.tex`.\n\n**Checkpoint:** Report section completion.\n\n```\n✍️ LaTeX writing complete:\n- Sections: [N] written ([list])\n- Citations: [N] unique keys in references.bib\n- Stale files cleaned: [list, if any]\n\nShall I proceed with compilation?\n```\n\n### Phase 4: Compilation\n\nInvoke `\u002Fpaper-compile` to build the PDF:\n\n```\n\u002Fpaper-compile \"paper\u002F\"\n```\n\n**What this does:**\n- `latexmk -pdf` with automatic multi-pass compilation\n- Auto-fix common errors (missing packages, undefined refs, BibTeX syntax)\n- Up to 3 compilation attempts\n- Post-compilation checks: undefined refs, page count, font embedding\n- Precise page verification via `pdftotext`\n- Stale file detection\n\n**Output:** `paper\u002Fmain.pdf`\n\n**Checkpoint:** Report compilation results.\n\n```\n🔨 Compilation complete:\n- Status: SUCCESS\n- Pages: [X] (main body) + [Y] (references) + [Z] (appendix)\n- Within page limit: YES\u002FNO\n- Undefined references: 0\n- Undefined citations: 0\n\nShall I proceed with the improvement loop?\n```\n\n### Phase 5: Auto Improvement Loop\n\nInvoke `\u002Fauto-paper-improvement-loop` to polish the paper:\n\n```\n\u002Fauto-paper-improvement-loop \"paper\u002F\"\n```\n\n**What this does (2 rounds):**\n\n**Round 1:** Gemini reviews the full paper → identifies CRITICAL\u002FMAJOR\u002FMINOR issues → Codex implements fixes → recompile → save `main_round1.pdf`\n\n**Round 2:** Gemini re-reviews the recompiled draft cold (fresh review — no fix summaries, no conversation carry-over) → identifies remaining issues → Codex implements fixes → recompile → save `main_round2.pdf`\n\n**Typical improvements (calibration cuts both ways):**\n- Fix assumption-model mismatches\n- Narrow genuine overclaims to the supported scope — and state supported claims\n  directly, removing redundant hedges\n- Consolidate scattered generic caveats into Limitations\n- Add missing interpretations and notation\n- Make Limitations more specific (only when a material limit is missing — never pad)\n- Add theory-aligned experiments if needed\n\n**Output:** Three PDFs for comparison + `PAPER_IMPROVEMENT_LOG.md`.\n\n**Format check** (included in improvement loop Step 8): After final recompilation, auto-detect and fix overfull hboxes (content exceeding margins), verify page count vs venue limit, and ensure compact formatting. Any overfull > 10pt is fixed before generating the final PDF.\n\n### Phase 5.9: Integrity Forensics (opt-in — Codex executor rules apply)\n\nSame contract as the base Codex pack (`skills-codex\u002Fpaper-writing` Phase 5.9,\nwhich this overlay does not change): the executor here is Codex, so only\nupstream's **deterministic-only slice** of `\u002Fintegrity-forensics` is runnable\n(numeric core + rules-only reporter — it can flag, it can never say\nCLEAN), OFF unless the CURRENT `$ARGUMENTS` contains `— self_forensics:\ntrue`. If opted in: run the launcher on `paper\u002F` (absolute path), then before\nthe Final Report require `python3 \"$GATE_HELPER\" fresh --paper-dir paper\u002F\n--anti-ar-commit \"$ANTI_AR_COMMIT\"` exit 0 — an opted-in run without a fresh gate is **incomplete, not\nskippable**; gate `BLOCK` refuses the Final Report.\n\n### Phase 6: Final Report\n\n```markdown\n# Paper Writing Pipeline Report\n\n**Input**: [NARRATIVE_REPORT.md or topic]\n**Venue**: [ICLR\u002FNeurIPS\u002FICML]\n**Forensics**: [NO_NEW_BLOCKER | WARN: \u003Cn> open obligations (listed below) | BLOCK | n\u002Fa (opt-in, not requested)]\n**Date**: [today]\n\n## Pipeline Summary\n\n| Phase | Status | Output |\n|-------|--------|--------|\n| 1. Paper Plan | ✅ | PAPER_PLAN.md |\n| 2. Figures | ✅ | figures\u002F ([N] auto + [M] manual) |\n| 3. LaTeX Writing | ✅ | paper\u002Fsections\u002F*.tex ([N] sections, [M] citations) |\n| 4. Compilation | ✅ | paper\u002Fmain.pdf ([X] pages) |\n| 5. Improvement | ✅ | [score0]\u002F10 → [score2]\u002F10 |\n\n## Improvement Scores\n| Round | Score | Key Changes |\n|-------|-------|-------------|\n| Round 0 | X\u002F10 | Baseline |\n| Round 1 | Y\u002F10 | [summary] |\n| Round 2 | Z\u002F10 | [summary] |\n\n## Deliverables\n- paper\u002Fmain.pdf — Final polished paper\n- paper\u002Fmain_round0_original.pdf — Before improvement\n- paper\u002Fmain_round1.pdf — After round 1\n- paper\u002Fmain_round2.pdf — After round 2\n- paper\u002FPAPER_IMPROVEMENT_LOG.md — Full review log\n\n## Remaining Issues (if any)\n- [items from final review that weren't addressed]\n\n## Next Steps\n- [ ] Visual inspection of PDF\n- [ ] Add any missing manual figures\n- [ ] Submit to [venue] via OpenReview \u002F CMT \u002F HotCRP\n```\n\n## Output Protocols\n\n> Follow these shared protocols for all output files:\n> - **[Output Versioning Protocol](..\u002F..\u002Fshared-references\u002Foutput-versioning.md)** — write timestamped file first, then copy to fixed name\n> - **[Output Manifest Protocol](..\u002F..\u002Fshared-references\u002Foutput-manifest.md)** — log every output to MANIFEST.md\n> - **[Output Language Protocol](..\u002F..\u002Fshared-references\u002Foutput-language.md)** — respect the project's language setting\n> - Note: paper content is always written in English regardless of project language setting.\n\n## Key Rules\n\n- **Large file handling**: If the Write tool fails due to file size, immediately retry using Bash (`cat \u003C\u003C 'EOF' > file`) to write in chunks. Do NOT ask the user for permission — just do it silently.\n\n- **Don't skip phases.** Each phase builds on the previous one — skipping leads to errors.\n- **Checkpoint between phases** when AUTO_PROCEED=false. Present results and wait for approval.\n- **Manual figures first.** If the paper needs architecture diagrams or qualitative results, the user must provide them before Phase 3.\n- **Compilation must succeed** before entering the improvement loop. Fix all errors first.\n- **Preserve all PDFs.** The user needs round0\u002Fround1\u002Fround2 for comparison.\n- **Document everything.** The pipeline report should be self-contained.\n- **Respect page limits.** If the paper exceeds the venue limit, suggest specific cuts before the improvement loop.\n\n## Composing with Other Workflows\n\n```\n\u002Fidea-discovery \"direction\"         ← Workflow 1: find ideas\nimplement                           ← write code\n\u002Frun-experiment                     ← deploy experiments\n\u002Fauto-review-loop \"paper topic\"     ← Workflow 2: iterate research\n\u002Fpaper-writing \"NARRATIVE_REPORT.md\"  ← Workflow 3: you are here\n                                         submit! 🎉\n\nOr use \u002Fresearch-pipeline for the Workflow 1+2 end-to-end flow,\nthen \u002Fpaper-writing for the final writing step.\n```\n\n## Typical Timeline\n\n| Phase | Duration | Can sleep? |\n|-------|----------|------------|\n| 1. Paper Plan | 5-10 min | No |\n| 2. Figures | 5-15 min | No |\n| 3. LaTeX Writing | 15-30 min | Yes ✅ |\n| 4. Compilation | 2-5 min | No |\n| 5. Improvement | 15-30 min | Yes ✅ |\n\n**Total: ~45-90 min** for a full paper from narrative report to polished PDF.\n",{"name":5,"description":7},"main","18193d71ea3441d7c033dbf195b8a7c75ac96f75","packages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fskills-codex-gemini-review\u002Fpaper-writing",0,"https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science","https:\u002F\u002Fgithub.com\u002FCZX-LBJ","一个没事喜欢随便写点代码的小菜鸡\r\n","2026-10-22 09:48:04",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add CZX-LBJ\u002Fdeepseek-science --skill paper-writing",{"tool":38,"command":39},"bunx","bunx skills add CZX-LBJ\u002Fdeepseek-science --skill paper-writing",{"tool":41,"command":42},"pnpm","pnpm dlx skills add CZX-LBJ\u002Fdeepseek-science --skill paper-writing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fskills-codex-gemini-review\u002Fpaper-writing\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7FEEKSNMRMKW6JEK93PFDFY","bio-free-energy-calculations","Performs alchemical free-energy calculations including relative binding free energy (RBFE \u002F FEP+) and absolute binding free energy (ABFE) via OpenFE, FEP+, GROMACS, AMBER pmemd, and OpenMM with explicit lambda scheduling, soft-core potentials, MBAR\u002FBAR analysis, cycle-closure validation, and protocol-appropriate enhanced sampling. Compares ML alternatives (Boltz-2 affinity, DeepDock). Use when ranking analogs by binding affinity beyond docking accuracy, performing prospective lead optimization, or validating SAR predictions.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Fbioskills\u002Fchemoinformatics\u002Ffree-energy-calculations\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7FEE5CTE5QK55CEMXNNVWY9","bio-conformer-generation","Generates 3D conformer ensembles using RDKit ETKDGv3 with knowledge-enhanced distance geometry, MMFF94\u002FUFF force-field optimization, CREST + GFN2-xTB semi-empirical refinement, and macrocycle-aware torsion preferences. Provides explicit decision rules for single vs ensemble conformer use, RMSD pruning, energy windows, conformer count, and force-field choice. Use when preparing 3D ligands for docking, generating descriptor input for 3D QSAR, or sampling macrocycle\u002Fpeptide conformational ensembles.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Fbioskills\u002Fchemoinformatics\u002Fconformer-generation\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7FEDNGFEMFWD1MSEDR5H7CY","bio-admet-prediction","Predicts ADMET properties using ADMETlab 3.0 (119 platform features, including 77 prediction models with modeled-endpoint uncertainty), ADMET-AI, DeepChem MolNet, and chemprop D-MPNN with explicit handling of OECD QSAR principles, applicability domain assessment, calibration, hERG\u002FCYP\u002FAMES endpoints, and PAINS \u002F Lipinski \u002F Ro5 \u002F Veber \u002F BBB druglikeness filters. Use when filtering compounds for drug-likeness, prioritizing leads by predicted safety, or building an in-house ADMET QSAR model.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Fbioskills\u002Fchemoinformatics\u002Fadmet-prediction\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7FED69GFB54FRF7AV5066DN","writing-systems-papers","Paragraph-level structural blueprint for 10-12 page systems papers targeting OSDI, SOSP, ASPLOS, NSDI, and EuroSys. Provides page allocation, paragraph templates, and writing patterns. Use when user says \"写系统论文\", \"systems paper structure\", \"OSDI paper\", \"SOSP paper\", or wants fine-grained structural guidance for a systems conference submission.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fwriting-systems-papers\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7FECVVDWZ0X0VEDTCE4B4DZ","wiki-enrich","Fill in the per-paper TODO sections of research-wiki\u002Fpapers\u002F\u003Cslug>.md pages that literature-ingest skills leave as bare scaffolds. Use when user says 'enrich wiki', 'fill paper TODOs', 'wiki body 補完', '把 paper 摘要寫進 wiki', 'research-wiki 自動填', or after a batch ingest that left papers\u002F as TODO scaffolds.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fwiki-enrich\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7FECD4BCJ2MTSBDDSE3ZAJ5","web-debug-search","Search GitHub, Stack Exchange, Chinese technical communities, official documentation, and general developer web sources for software errors, compatibility problems, API usage questions, and real-world workarounds. Use for debugging and discovery only; results are not paper-citation evidence.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fweb-debug-search\u002FSKILL.md",[],[]]