# Wikicrow Article Generator

> Generate Wikipedia-style scientific articles section-by-section by orchestrating PaperQA2 over a topic-specific corpus. Reproduces the WikiCrow recipe used by FutureHouse to write the gene articles at wikicrow.ai. Use when the user wants a structured, fully-cited long-form article on a scientific topic (gene, protein, disease, drug, mechanism) rather than a single Q&A answer.

- Skill: `qhjqhj00/wikicrow-article-generator` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds add qhjqhj00/wikicrow-article-generator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/wikicrow-article-generator/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/wikicrow-article-generator

---


# WikiCrow — Long-Form Scientific Article Generator

WikiCrow is the methodology FutureHouse used to populate <https://wikicrow.ai> — Wikipedia-style articles for the human protein-coding genome, written by orchestrating PaperQA2 across a structured prompt sequence. The actual code is just PaperQA2 + a section template loop, which this skill packages.

Use this when a user asks for a long, sectioned, fully-cited write-up on a scientific topic — gene / protein / disease / drug / mechanism / method — not a single Q&A answer.

## Prerequisites

- `pip install "paper-qa>=5"` (Python 3.11+)
- `OPENAI_API_KEY` (or any LiteLLM-compatible LLM)
- Optional: `CROSSREF_API_KEY` + `SEMANTIC_SCHOLAR_API_KEY` (faster metadata fetching for large corpora)
- A folder of seed PDFs on the topic, OR allow paper-qa's agent to search Semantic Scholar / arXiv for you

## Recipe — gene article (mirrors wikicrow.ai)

```python
import asyncio
from pathlib import Path
from paperqa import Settings, Docs, ask

GENE = "FOXP3"

# 1. Build a paper-qa Docs corpus by either:
#    (a) dropping PDFs into ./papers_FOXP3/ and pointing paper-qa at it, or
#    (b) letting the agent search Semantic Scholar:
settings = Settings(
    paper_directory=f"./papers_{GENE}",
    temperature=0.2,
    llm="gpt-4o",                      # or "claude-opus-4-5"
    summary_llm="gpt-4o-mini",
)

# 2. Section template (the wikicrow.ai gene-article template)
SECTIONS = [
    ("Function",            f"Write a 'Function' section for the gene {GENE}. "
                            f"Cover canonical biological role, expression pattern, and key downstream pathways."),
    ("Structure",           f"Write a 'Structure' section for {GENE}: protein domains, "
                            f"3D structure (cite PDB if known), post-translational modifications."),
    ("Clinical significance", f"Write a 'Clinical significance' section for {GENE}: "
                            f"associated diseases, key mutations, mechanism of pathology, therapeutic implications."),
    ("Interactions",        f"Write an 'Interactions' section for {GENE}: known protein-protein "
                            f"interactions, signalling partners, transcriptional targets."),
    ("Research history",    f"Write a 'Research history' section for {GENE}: discovery, "
                            f"key milestone papers in chronological order."),
]

# 3. Run each section in parallel
async def main():
    answers = await asyncio.gather(*[
        asyncio.to_thread(ask, prompt, settings=settings)
        for _, prompt in SECTIONS
    ])
    article = [f"# {GENE}\n"]
    for (title, _), ans in zip(SECTIONS, answers):
        article.append(f"## {title}\n\n{ans.formatted_answer}\n")
    Path(f"{GENE}.md").write_text("\n".join(article))
    print(f"Wrote {GENE}.md ({sum(len(a.formatted_answer) for a in answers)} chars)")

asyncio.run(main())
```

The `formatted_answer` includes inline citations + a per-section reference list. The final `.md` is publication-ready as a Wikipedia draft.

## Demo-friendly first call

```python
from paperqa import Settings, ask

# No local corpus — let the agent fetch from Semantic Scholar
ans = ask(
    "Write a 200-word 'Function' section for the gene FOXP3, with citations.",
    settings=Settings(temperature=0.2),
)
print(ans.formatted_answer)
```

## Recipes for non-gene articles

The same template approach works for:

- **Drugs** — sections: *Indications, Mechanism, Pharmacokinetics, Adverse effects, Comparators, Resistance*
- **Diseases** — *Epidemiology, Pathophysiology, Clinical presentation, Diagnosis, Treatment, Prognosis*
- **Methods** — *Principle, Workflow, Variants, Strengths and limitations, Notable applications*
- **Compounds** — *Synthesis, Properties, Reactions, Applications, Safety*

Just swap the `SECTIONS` list. Keep each prompt narrow and explicit — paper-qa's grounded answers are best when the question scope is bounded.

## Curating the corpus

For best results, build a topic-focused corpus before running:

```bash
mkdir papers_FOXP3 && cd papers_FOXP3
# Fetch top 50 most-cited papers on FOXP3 — either drag in PDFs manually,
# use the Semantic Scholar API, or open paper-qa's agent loop with
# "search the literature for FOXP3 review papers and summarize"
```

A 30–80 paper corpus on one gene typically gives Wikipedia-quality output. With <10 papers, expect thin sections; with >200, indexing time grows.

## Cost / latency

- Per article (5 sections, gpt-4o on a 50-paper corpus): ~5–15 min, $1–4 in LLM costs
- No FutureHouse credits — fully self-hosted

## Caveats

- **Verify citations before publishing.** Even with PaperQA2's grounding, occasional miscitations slip through with smaller LLMs — always spot-check.
- The wikicrow.ai gene-article template is one of many; treat the section list as a starting prompt, not gospel.
- For genes / topics with very thin literature (<5 papers), expect placeholder-quality output.

