ai4s-agent
Use when the user wants an end-to-end AI4S research pipeline — broad direction or specific topic in, full research package out (exploration + literature survey…
Use when the user wants a complete, publication-grade research paper on a specific topic — produces 200+ real citations, 4–8 publication-grade figures, and 7 sections of substantive prose compiled to PDF in one pass. No skeleton stage.
$ npx -y skills add ai4s-research/ai4s-skills --skill paper-writer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/paper-writerContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user wants a complete, publication-grade research paper on a specific topic — produces 200+ real citations, 4–8 publication-grade figures, and 7 sections of substantive prose compiled to PDF in one pass. No skeleton stage.
name: paper-writer description: Use when the user wants a complete, publication-grade research paper on a specific topic — produces 200+ real citations, 4–8 publication-grade figures, and 7 sections of substantive prose compiled to PDF in one pass. No skeleton stage.
End-to-end research paper builder. **Single stage, full quality from the start** — there is no skeleton phase to enrich later. The agent (Claude Code / Cursor / Aider / Codex / …) does the writing using its own tools (WebFetch, WebSearch, Write, Bash). This skill has no Python runtime; it is purely a procedure + reference playbooks + a LaTeX template.
The substantive work is decomposed into reference playbooks under `references/`:
| Reference | Topic | |---|---| | `references/00-incremental-execution.md` | how to actually do this without losing work: batch sizes, persistence, resume — **read first** | | `references/01-bibliography-expansion.md` | grow `bibliography.bib` to 200+ real entries via WebFetch/WebSearch | | `references/02-figures-publication-grade.md` | TikZ / matplotlib / seaborn / multi-panel figure recipes | | `references/03-section-playbook.md` | per-section structure, length, citation density | | `references/04-layout-discipline.md` | tables, figures, floats, cross-refs, author + disclosure footnote | | `references/05-quality-gate.md` | self-check before delivery (G1–G8 hard, S1–S4 soft) | | `references/06-experiment-provenance.md` | honest provenance for every number (measured / simulated / illustrative) |
**Read the relevant reference _before_ writing, not after.**
The full pass does not fit in a single turn. The bibliography is built across ~20+ small WebFetch/WebSearch batches; sections are drafted one per turn; figures are generated one at a time. **Read `references/00-incremental-execution.md` before starting** — it is the only execution mode that actually completes without losing work.
Confirm with the user:
Always tell the user that human review by a domain expert is recommended before any scientific publication or production use.
Create a timestamped working directory and copy the template. Runs never overwrite each other.
TOPIC="<topic>"
SLUG=$(python3 -c "import re,hashlib,sys; t=sys.argv[1]; n=re.sub(r'[\\s_]+','-',re.sub(r'[^\\w\\s-]','',t.lower().strip())).strip('-')[:40].rstrip('-'); h=hashlib.sha1(t.encode()).hexdigest()[:8]; print(f'{n}-{h}')" "$TOPIC")
TS=$(date +%Y-%m-%d_%H%M%S)
RUN=output/paper-writer/$SLUG/$TS/paper
mkdir -p "$RUN/sections" "$RUN/figures"
cp -r templates/paper/. "$RUN/"
ln -sfn "$TS" "output/paper-writer/$SLUG/latest"In commands below `$RUN` = `output/paper-writer/<slug>/latest/paper`.
The template provides only `main.tex` (title placeholder), an empty `sections/` skeleton, an empty `figures/`, and `compile.sh`. Everything substantive is produced in Step 3 below.
Open `references/00-incremental-execution.md` first. Then carry out the five tracks below across many turns, persisting state to `$RUN/` after every batch.
**Open:** `references/01-bibliography-expansion.md`.
First choose and record the temporal profile from that reference. AI4S and similarly fast-moving fields default to at least 60% of references from the current calendar year and previous two years; an explicitly recent window uses the stricter recency-led profile. Then plan 15–25 query angles. For each angle: WebSearch → pick candidates → WebFetch each candidate's abstract / arXiv API URL → extract canonical title/authors/year/venue/url → append a BibTeX entry to `$RUN/bibliography.bib`. **Every entry must originate from a URL fetched in this session.** Memory entries are forbidden.
**Hard stop:** do not draft prose until the bibliography has ≥ 200 entries, contains no `unknown` keys, and passes `check_bibliography_freshness.py` for the recorded profile.
**Open:** `references/02-figures-publication-grade.md`.
Decide what the paper needs based on its claims and evidence:
real method whose mechanism needs explanation.
support them.
Generate each figure into `$RUN/figures/`. Save the matplotlib / TikZ source alongside the PDF so each figure is reproducible. If the experiment-suite produced a `figures/manifest.json`, **reuse those figures by symlink or copy** — don't redraw what's already produced.
**Open:** `references/03-section-playbook.md`.
Draft each section per its playbook (le
Open-source agent skills for AI for Science: topic exploration, literature survey, experiments, paper writing, and integrity audit — driven by any coding agent.
Repo: ai4s-research/ai4s-skills
Use when the user wants an end-to-end AI4S research pipeline — broad direction or specific topic in, full research package out (exploration + literature survey…
Use when the user has a research question and needs a complete experiment package — design document, runnable code, results (measured or simulated with honest…
Use when the user wants a paper audited for integrity issues — image misuse, numerical anomalies, logical gaps — and needs a reviewable evidence report. Works…
Use when the user wants a comprehensive literature survey on a specific research topic. Outputs a complete PDF survey (6–20 pages, 60+ real citations, 100+…
Generate beautiful, high-resolution mindmaps from Markdown unordered lists. Outputs interactive HTML, HD PNG, and PDF with colorful branch themes.
Use when the user has a vague research direction and wants to explore feasible specific topics. Outputs a structured analysis with candidate topics,…