Given a scientific hypothesis (or research question), this skill orchestrates a complete research pipeline:
The final outputs are paper.tex and references.bib, both compile-ready
under pdflatex or xelatex with the natbib package.
Before any work begins, parse the user’s input to extract:
If the hypothesis is ambiguous or compound, decompose it into sub-questions and confirm with the user before proceeding.
Placeholder if hypothesis is underspecified: [HYPOTHESIS NEEDS CLARIFICATION]
Use web search and, where available, connected academic databases (e.g., via MCP connectors for Google Scholar, Semantic Scholar, arXiv, PubMed) to retrieve relevant papers. Execute the following searches:
Collect at minimum 10 relevant papers. For each paper, extract:
Classify every retrieved reference as:
After reviewing the literature, produce a structured gap analysis:
This gap analysis feeds directly into the Introduction and Related Work sections of the paper.
Never fabricate a citation. If a paper cannot be verified through
search, mark it [VERIFY] in the BibTeX file and note it in the author
review flags. Do not reconstruct bibliographic details from memory.
Break the hypothesis into testable sub-claims. For each sub-claim:
Produce a concise experimental plan covering:
Flag any experiment that requires resources not available in the current
environment with [RESOURCE NEEDED: ...].
Write clean, self-contained Python code that implements the experimental plan. The code must:
numpy, scipy, pandas, matplotlib, scikit-learn,
torch or tensorflow for deep learning tasks.pathlib.The prototype must produce at minimum:
results/results_summary.json — key numeric results.results/figures/ — one figure per major finding.results/tables/ — LaTeX-formatted tables of results (using
tabular or booktabs format).If the code cannot run due to missing data or compute, do not silently generate fake results. Instead:
[RUN THIS TO GENERATE RESULTS] comment.[DATA NEEDED] placeholders in the results sections of the paper.Before writing the Results section, verify:
Where applicable, check:
Confirm that the code, with the fixed random seed, produces the same results on re-run. If stochastic variance is high, report the mean and standard deviation over multiple runs.
If any result does not pass a sanity check:
[VERIFY RESULT: ...] in the paper draft.Produce exactly two files:
paper.tex — the main LaTeX manuscript.references.bib — all BibTeX entries.Both files must be compile-ready. The command pdflatex paper.tex followed
by bibtex paper followed by two more pdflatex paper.tex runs must
complete without fatal errors.
Use the following default preamble unless the user specifies a journal class:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{amsmath, amssymb}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage[round]{natbib}
\bibliographystyle{plainnat}
If the user specifies a journal (e.g., NeurIPS, ICML, Nature, PLOS ONE), switch to that class and adjust citation style accordingly. Common overrides:
| Venue | Class | Citation style |
|---|---|---|
| NeurIPS | neurips_2024 |
\citep{} |
| ICML | icml2024 |
\citep{} |
| Nature family | article + unsrtnat |
numbered |
| PLOS ONE | article + plos2015 |
numbered |
| IEEE | IEEEtran |
\cite{} |
[AUTHOR NAME] if not provided.\citet{} or \citep{}.\ref{}. Do not interpret here; only report.[ACKNOWLEDGEMENTS] placeholder if not provided.\caption{} and a \label{}.booktabs (\toprule, \midrule, \bottomrule)..pdf or .png in a figures/ subdirectory.\graphicspath in the preamble.firstauthorYEARkeyword (e.g.,
vaswani2017attention, lecun1989backprop).@article, @inproceedings,
@book, @misc, @preprint.% [VERIFY] Missing: <fields>.{[UNKNOWN]}.| Type | Required fields |
|---|---|
@article |
author, title, journal, year, volume, pages, doi |
@inproceedings |
author, title, booktitle, year, pages |
@book |
author or editor, title, publisher, year |
@misc |
author, title, year, howpublished or url, note |
Before finalising:
\cite{} key in paper.tex must have a matching entry in
references.bib.references.bib must be cited at least once in paper.tex.Run the following sequence and confirm no fatal errors:
pdflatex paper.tex
bibtex paper
pdflatex paper.tex
pdflatex paper.tex
\ref{} or \cite{} with no matching label or key).\end{} for any opened environment.[VERIFY]).Overfull \hbox warnings in tables (use \small or adjust column widths).If the bash environment is unavailable, perform a manual syntax check:
\begin{...} has a matching \end{...}.{ has a matching }.\cite{} keys exist in the .bib file.\ref{} labels exist in the .tex file.Flag any unresolved potential compile errors in the author review section.
Append a clearly marked section at the end of paper.tex as a LaTeX comment
block (not typeset in the PDF):
%% ============================================================
%% FLAGS FOR AUTHOR REVIEW — REMOVE BEFORE SUBMISSION
%% ============================================================
This block must list:
[CITATION NEEDED] with its location and the claim requiring support.[VERIFY] BibTeX entry with known and missing fields.[DATA NEEDED] placeholder with the result that was not generated.[CLARIFY: ...] note with the ambiguity.[RESOURCE NEEDED] item from Stage 3.This rule applies to every stage of the pipeline without exception.
| Placeholder | Use case |
|---|---|
[HYPOTHESIS NEEDS CLARIFICATION] |
Input hypothesis is ambiguous |
[AUTHOR NAME] |
Author name not provided |
[YEAR] |
Publication year unknown |
[JOURNAL NAME] |
Journal or venue unknown |
[VOLUME/PAGES] |
Bibliographic detail missing |
[DOI] |
DOI not retrieved |
[CITATION NEEDED] |
Claim needs a reference not found |
[DATA NEEDED] |
Result requires code execution |
[RESOURCE NEEDED: ...] |
Experiment requires unavailable resource |
[VERIFY RESULT: ...] |
Numeric result failed a sanity check |
[CLARIFY: ...] |
Ambiguous passage for author to resolve |
[ACKNOWLEDGEMENTS] |
Acknowledgements not provided |
[UNKNOWN] |
BibTeX field cannot be determined |
Before closing the pipeline, verify every item:
Manuscript
paper.tex is present and compile-ready.Code
results/.results/figures/.References
references.bib is present.\cite{} key in paper.tex exists in references.bib.references.bib entry is cited in paper.tex.% [VERIFY].Compilation
pdflatex + bibtex sequence completes without fatal errors, or
all potential errors are listed in the author review flags.Author review
paper.tex.When a user provides a hypothesis, begin with:
If the user says “just go”, proceed with best-guess assumptions and flag them in the author review section.