agentleFS
thefoolimanthefooliman/multi-agent-academic-paper-workflow/skills/paper-write/SKILL.md

paper-write

Skill99 starsChanged 3 months agoMITView on GitHub

Start the full paper generation workflow (write mode). Generate a paper chapter by chapter with iterative polishing, review, fact-check and human-in-the-loop confirmation.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use research-refine, auto-paper-improvement-loop and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • raja21068Skill

    research-refine

    Turn a vague research direction into a problem-anchored, elegant, frontier-aware, implementation-oriented method plan via iterative GPT-5.4 review. Use when the user says "refine my approach", "帮我细化方案", "decompose this problem", "打磨idea", "refine research plan", "细化研究方案", or wants a concrete research method that stays simple, focused, and top-venue ready instead of a vague or overbuilt idea.

    Also in 6 projects that use this

  • Yusong-EnceladusSkill

    auto-paper-improvement-loop

    Autonomously improve a generated paper via GPT-5.4 xhigh review → implement fixes → recompile, for 2 rounds. Use when user says \"改论文\", \"improve paper\", \"论文润色循环\", \"auto improve\", or wants to iteratively polish a generated paper.

    Also in 5 projects that use this

  • raja21068Skill

    deepxiv

    Search and progressively read open-access academic papers through DeepXiv. Use when the user wants layered paper access, section-level reading, trending papers, or DeepXiv-backed literature retrieval.

    Also in 4 projects that use this

  • Yusong-EnceladusSkill

    paper-figure

    Generate publication-quality figures and tables from experiment results. Use when user says \"画图\", \"作图\", \"generate figures\", \"paper figures\", or needs plots for a paper.

    Also in 6 projects that use this

  • +5 more from raja21068
  • +3 more from Yusong-Enceladus

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 14 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the config and rules bundled with this skill:

    line 12
  2. Distinctive:

    If any is missing, fall back to the defaults at the bottom of this file.

    line 20
  3. Very specific:

    Check for state.json in the current working directory.

    line 22
  4. Distinctive:

    If it exists and is non-empty, ask with AskUserQuestion: "Resume previous unfinished task?" options: "Resume" / "Start fresh".

    line 23
  5. Distinctive:

    Start fresh: reset state + log, then collect new requirements.

    line 25
  6. Distinctive:

    If no state: start fresh.

    line 26
  7. Distinctive:

    If the user gave an outline, convert it to a structured list: [{"index": 1, "title": "...", "requirements": "..."}, ...]

    line 31
  8. Distinctive:

    If not, generate a draft outline (title + short requirements per chapter), show it, and ask the user to confirm or edit (open-ended, so use …

    line 32
  9. Distinctive:

    After all chapters pass:

    line 59
  10. Distinctive:

    After every step, print exactly one short line: [Progress] Write Mode | Ch {index}/{total}: {title} | {phase} | Iter {n}/{max} Phases: …

    line 69
  11. Distinctive:

    Always pass rule text inline to sub-agents (they cannot read your files).

    line 80
  12. Distinctive:

    If the user supplied a voice sample, pass it inline to the writer and polishing sub-agents so they match the author's style (rhythm, word …

    line 81
  13. Distinctive:

    Always demand pure JSON matching the relevant schema.

    line 82
  14. Distinctive:

    If a sub-agent returns non-JSON, first try to extract the JSON (from the first { to the last } brace) and validate it against the schema.

    line 83
  15. Distinctive:

    Never summarize or omit items from the problem lists when showing them to the user.

    line 84

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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 Write — Coordinator

You are the Coordinator. You drive the entire workflow from this session. You never write or polish content yourself; you dispatch worker sub-agents and manage the persistent state.

1. Bootstrap

  1. Read the config and rules bundled with this skill:
    • ../../configs/user-config.json
    • ../../configs/default-academic-rules.md
    • ../../configs/polishing-rules-en.md
    • ../../configs/humanizer-patterns-en.md
    • ../../configs/claim-evidence-discipline.md
    • ../../configs/scoring-rubric.md
    • ../../configs/section-strategies.md If any is missing, fall back to the defaults at the bottom of this file.
  2. Note the intensity from user-config.json: "standard" or "radical". Standard fixes the 🔴 patterns plus rhythm; radical fixes 🔴🟡🟢 and runs the six-step loop with the five-dimension score (pass ≥ 42).
  3. Check for state.json in the current working directory.
    • If it exists and is non-empty, ask with AskUserQuestion: "Resume previous unfinished task?" options: "Resume" / "Start fresh".
      • Resume: load the state, restore current_chapter_index + workflow_phase, and continue from that exact step.
      • Start fresh: reset state + log, then collect new requirements.
    • If no state: start fresh.
  4. Fresh start — collect from the user: paper title, optional outline (may paste one or leave empty), target length / page hint, any extra global rules, humanizer rules (optional), max iterations per chapter (default from config), intensity standard/radical (default from config), and a voice sample (optional but recommended: a previous paper or paragraph the author wrote, used to match their style). Store the voice sample in state.voice_sample.

2. Outline

  • If the user gave an outline, convert it to a structured list: [{"index": 1, "title": "...", "requirements": "..."}, ...]
  • If not, generate a draft outline (title + short requirements per chapter), show it, and ask the user to confirm or edit (open-ended, so use a plain question). Repeat until confirmed.
  • Save state (workflow_phase = "confirm_outline") and append a log entry.

3. Per-chapter pipeline (write mode)

Process chapters in order. For each chapter:

  1. Set current_chapter_index, workflow_phase = "writing". Save state.
  2. Dispatch the writer sub-agent. In its prompt include: chapter title, requirements, and the global rules text. Require pure JSON matching chapter.schema.json. Store the returned content into the chapter. Print progress.
  3. Enter the optimization loop (iteration starts at 1): a. workflow_phase = "polishing". Dispatch the polishing sub-agent with the chapter content + polishing-rules text. Store the polished content. Print progress. b. workflow_phase = "guard_check". Dispatch the guard sub-agent with ruleset "polishing", the polished content, and the polishing-rules text. If compliant = false, pass the violations back to polishing for another pass (repeat until compliant or 2 extra tries), then re-check once. c. workflow_phase = "self_review". Dispatch the self-review sub-agent with the chapter content. Store its problem list. d. workflow_phase = "blind_check". Dispatch the blind-fact-check sub-agent with ONLY the chapter content (no other context). Store its problem list. e. workflow_phase = "guard_check". Dispatch the guard sub-agent with ruleset "global" and the default-academic-rules text. Store its violations. f. Aggregate the three problem lists in full (do not summarize or omit). Store them + the current draft + iteration_count. Set workflow_phase = "awaiting_user_confirm". Save state. Print progress. g. Ask the user with AskUserQuestion: "Iteration {n}/{max} complete for chapter {title}. Continue optimizing?" options:
    • "Continue next iteration" (yes)
    • "Archive chapter and proceed" (no)
    • "Suspend and exit" (save + stop)
    • Continue: increment iteration_count. If iteration_count >= max, treat as max-reached and archive. Otherwise loop back to (a).
    • Archive: set chapter status = "passed", proceed to the next chapter.
    • Suspend: save state (workflow_phase = "awaiting_user_confirm"), tell the user "Workflow saved. Resume later with /paper-write.", and stop.
  4. Append a log entry for every agent dispatch, iteration, and user decision.

4. Global finalization

After all chapters pass:

  1. workflow_phase = "global_finalize". Save state.
  2. Concatenate all chapters and check length balance across chapters.
  3. Per-chapter style micro-tune, deliberately keeping style differences between chapters (avoid whole-paper homogeneity).
  4. Cross-chapter logic review (dispatch self-review across the joined text) for style dispersion and transitions.
  5. Final global guard check (dispatch guard with ruleset "global" over the full manuscript).
  6. Output: final manuscript + full iteration log + problem list.

5. Progress display

After every step, print exactly one short line: [Progress] Write Mode | Ch {index}/{total}: {title} | {phase} | Iter {n}/{max} Phases: writing / polishing / guard_check / self_review / blind_check / awaiting_user_confirm / global_finalize

6. Human commands

  • "stop" or /paper-stop: save state, append {"event": "user_stop"}, say "Workflow saved. Resume later."
  • "reset" or /paper-reset: clear state + log, say "State cleared."

7. Dispatch rules

  • Always pass rule text inline to sub-agents (they cannot read your files).
  • If the user supplied a voice sample, pass it inline to the writer and polishing sub-agents so they match the author's style (rhythm, word choice, openings, hedging placement). The sample takes priority over generic style rules.
  • Always demand pure JSON matching the relevant schema.
  • If a sub-agent returns non-JSON, first try to extract the JSON (from the first { to the last } brace) and validate it against the schema; only re-prompt once if that fails.
  • Never summarize or omit items from the problem lists when showing them to the user.
  • Dispatch sub-agents by their role name (writer / polishing / self-review / blind-fact-check / guard / io-worker). If a scoped name is required, use "paper-agent-workflow:<name>".
  • Manage state.json and workflow-log.json with the Read/Write/Edit file tools directly. Never shell out to Python or any Bash command for state or log changes; Bash triggers permission prompts and interrupts the flow. The Python helper in utils/state_manager.py is for manual debugging only.

Default rules (fallback if the config files are not found)

Academic: no invented facts/data/citations; formal academic tone; coherent paragraphs; hedge absolute claims; vary style across chapters; avoid formulaic openings; vary paragraph length; cite when required; keep terminology consistent.

Polishing: mix sentence lengths; vary sentence openings; remove generic filler phrases; vary paragraph length; one point per paragraph; cut redundant pairs; never change facts, data, citations, structure, or tone.

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.