Process user-provided PDFs using isolated subagents, generate structured notes, synthesize findings, and draft the Introduction section. Third step of writer workflow. Requires scope.md.
Processes PDFs one-by-one using isolated subagents to generate structured notes, then synthesizes findings and drafts the Introduction section. Triggers when `scope.md` exists and you need to review papers in the `papers/` folder.
/plugin marketplace add sxg/science/plugin install writer@scienceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Processes user-provided PDFs one at a time using isolated subagents to prevent context overflow, then synthesizes findings and drafts the Introduction section.
┌────────────────────────────────────────────────────────────────────┐
│ ⛔ ORCHESTRATOR MUST NEVER READ PDF FILES DIRECTLY ⛔ │
│ │
│ The orchestrator (you, running this skill) may ONLY read: │
│ - scope.md │
│ - inventory.md │
│ - notes/ethics-summary.md │
│ - notes/papers/*.md (the condensed notes, NOT PDFs) │
│ - notes/bibliography.md │
│ - notes/literature-synthesis.md │
│ │
│ If you find yourself about to use the Read tool on a .pdf file, │
│ STOP. Spawn a subagent instead. │
├────────────────────────────────────────────────────────────────────┤
│ ⛔ EACH SUBAGENT PROCESSES EXACTLY ONE PAPER ⛔ │
│ │
│ - One Task tool call = One PDF │
│ - Never pass multiple PDFs to a single subagent │
│ - Never ask a subagent to "process the remaining papers" │
│ - Wait for each subagent to complete before spawning the next │
│ │
│ WRONG: Task("Process papers/a.pdf, papers/b.pdf, papers/c.pdf") │
│ RIGHT: Task("Process papers/a.pdf") → wait → Task("Process b.pdf")│
└────────────────────────────────────────────────────────────────────┘
Each paper is processed by an isolated subagent to prevent context overflow:
┌─────────────────────────────────────────────────────────────────┐
│ LITERATURE REVIEW WORKFLOW │
├─────────────────────────────────────────────────────────────────┤
│ │
│ [ORCHESTRATOR] │
│ │ │
│ ├──► Read scope.md (extract research context) │
│ │ │
│ ├──► List papers/*.pdf │
│ │ │
│ ├──► For each PDF, spawn isolated subagent: │
│ │ │ │
│ │ ├──► [Subagent] Read ONE PDF │
│ │ ├──► [Subagent] Generate notes/papers/*.md │
│ │ └──► [Subagent] Exit (context cleared) │
│ │ │
│ ├──► Read all notes/papers/*.md (small files) │
│ │ │
│ ├──► Generate bibliography + synthesis │
│ │ │
│ └──► Draft Introduction │
│ │
└─────────────────────────────────────────────────────────────────┘
Why subagents?
scope.md must exist (from scoping step)notes/ethics-summary.md may exist (provides study objectives and population context)papers/ folder with PDF files to processnotes/papers/, notes/papers-library/, drafts/[Step 1: Read scope.md for context]
│
▼
[Step 2: Inventory papers/ folder]
│
▼
[Step 3: Process each PDF via subagent] ─── One at a time
│ └── notes/papers/*.md
▼
[Step 4: Generate bibliography] ─── From all notes
│ └── notes/bibliography.md
▼
[Step 5: Synthesize literature] ─── Aggregate findings
│ └── notes/literature-synthesis.md
▼
[Step 6: Draft Introduction]
│
▼
[Output] ─── drafts/introduction.md
From scope.md, extract comprehensive context to pass to each subagent:
Create a detailed scope summary to pass to each subagent:
## Manuscript Context
You are helping write a scientific research manuscript. Your job is to read ONE paper and extract information most relevant to this manuscript.
### Our Research Question
[Full research question from scope.md]
### Our Hypothesis
[What we expect to find / are arguing]
### Our Key Findings
[Summary of main results - what we found]
### Our Methods
[Brief description of study design, population, techniques used]
### Target Journal
[Journal name] - [word limit] words - [citation style]
### What to Look For in This Paper
As you read, focus on extracting:
1. **Background claims** we can cite to establish the problem's importance
2. **Methodological precedents** that justify our approach
3. **Comparable results** we can compare our findings against
4. **Contradictory findings** we need to address in Discussion
5. **Gaps identified** that our study fills
6. **Quotable statements** that frame the field well
If notes/ethics-summary.md exists, also include:
List all PDFs in the papers/ folder:
ls papers/*.pdf
Create processing queue:
## Papers to Process
| # | Filename | Status |
|---|----------|--------|
| 1 | smith-2023.pdf | Pending |
| 2 | jones-2022.pdf | Pending |
| 3 | wilson-2021.pdf | Pending |
...
Copy PDFs to central library:
mkdir -p notes/papers-library
cp papers/*.pdf notes/papers-library/
CRITICAL: Process ONE paper at a time using the Task tool.
For each PDF in the queue:
Use the Task tool to spawn an isolated subagent.
IMPORTANT: Each Task call must specify exactly ONE PDF file. Do not batch.
Task(
subagent_type: "general-purpose",
prompt: """
⛔ YOU ARE PROCESSING EXACTLY ONE PAPER. DO NOT READ ANY OTHER PDFs. ⛔
## Your Role
You are a research assistant helping write a scientific manuscript. Your job is to:
1. Read ONE paper
2. Extract information most relevant to our manuscript
3. Write condensed notes highlighting what's useful for our paper
4. Exit immediately after
## Your ONE Paper
**PDF to read**: papers/{filename}.pdf
**Output file**: notes/papers/{filename}.md
## Manuscript Context (What We're Writing)
{scope_summary}
## Instructions
1. Read ONLY the PDF file specified above
2. Extract citation metadata (authors, title, journal, DOI, PMID)
3. Summarize the paper's main contribution
4. **Focus on relevance**: What from this paper helps our manuscript?
- Background claims we can cite?
- Methods similar to ours?
- Results we can compare against?
- Contradictions we need to address?
- Quotes that frame the problem well?
5. **Recommend inclusion**: Should this paper be cited in our manuscript?
6. Write condensed notes to the output file
7. Return a summary with your recommendation
8. EXIT - Do not process any other papers
## Note Template
# [First Author] et al., [Year]
**Processed**: [timestamp]
## Citation
- **Authors**: [full author list]
- **Title**: [title]
- **Journal**: [journal]
- **Year**: [year]
- **DOI**: [doi or "not found"]
- **PMID**: [pmid or "not found"]
## Paper Summary
[2-3 sentences on what this paper is about]
## Study Design
- **Type**: [RCT, cohort, retrospective, etc.]
- **Population**: [N, key characteristics]
- **Methods**: [key techniques used]
## Key Findings
| Finding | Statistic | Interpretation |
|---------|-----------|----------------|
| [finding] | [p-value, CI, effect size] | [what it means] |
## Relevance to Our Manuscript
**Relationship**: [Supports / Contradicts / Provides Context / Methodological Reference]
### For Introduction
- [Claims or context we can cite to frame our problem]
- [Gaps this paper identifies that we address]
### For Methods
- [Methodological precedents that justify our approach]
### For Discussion
- [Results to compare against ours]
- [Contradictions we need to explain]
## Key Quotes
> "[Quotable statement that frames the field or problem well]" (p. X)
> "[Another useful quote if available]" (p. X)
## Recommendation
**Include in draft?**: [Yes / No]
**Rationale**: [1-2 sentences - Is this paper directly relevant? Would citing it feel natural or forced?]
## Tags
#[topic1] #[topic2] #[methodology]
"""
)
Wait for the subagent to complete before processing the next paper.
Track the subagent's recommendation for each paper:
| # | Filename | Status | Recommendation |
|---|----------|--------|----------------|
| 1 | smith-2023.pdf | ✓ Complete | Include |
| 2 | jones-2022.pdf | ✓ Complete | Include |
| 3 | wilson-2021.pdf | ✓ Complete | Exclude - different population |
| 4 | brown-2020.pdf | Processing... | - |
If a subagent fails:
After ALL papers are processed, read the notes and compile bibliography.
Read each notes/papers/*.md and extract citations:
Create notes/bibliography.md:
# Master Bibliography
**Generated**: [timestamp]
**Total References**: [n]
## References
| # | Citation | DOI | PMID |
|---|----------|-----|------|
| 1 | Smith JA, et al. Title. Journal. 2023;1:1-10. | 10.xxx | 123456 |
| 2 | Jones BB, et al. Title. Journal. 2022;2:20-30. | 10.xxx | 234567 |
## Papers Needing Attention
| Paper | Issue |
|-------|-------|
| [filename] | [missing DOI / couldn't process / etc.] |
Read all notes/papers/*.md files and create synthesis.
Note: At this point you're only reading small markdown files, not full PDFs.
Create notes/literature-synthesis.md:
# Literature Synthesis
**Generated**: [timestamp]
**Research Question**: [from scope.md]
**Papers Reviewed**: [n]
---
## Paper Citation Tracker
Use the subagent recommendations from Step 3 to populate this table. Papers recommended for exclusion by the subagent should be marked "Not Applicable."
| # | Citation | Note File | Subagent Rec | Natural Fit | Status |
|---|----------|-----------|--------------|-------------|--------|
| 1 | Smith et al., 2023 | notes/papers/smith-2023.md | Include | Intro: establishes prevalence | Planned |
| 2 | Jones et al., 2022 | notes/papers/jones-2022.md | Include | Discussion: comparable methods | Planned |
| 3 | Wilson et al., 2021 | notes/papers/wilson-2021.md | Exclude | Different population | Not Applicable |
**Status Legend**:
- **Planned**: Subagent recommended inclusion and paper has a natural place
- **Not Applicable**: Subagent recommended exclusion or paper doesn't fit naturally
**Guidance**: Trust the subagent's assessment of relevance. The goal is a coherent manuscript, not maximum citations.
---
## Source Inventory
| # | Citation | Type | Relationship |
|---|----------|------|--------------|
| 1 | Smith et al., 2023 | Original Research | Supports |
| 2 | Jones et al., 2022 | Review | Context |
---
## Key Themes
### Theme 1: [Theme Name]
**Summary**: [2-3 sentences]
**Sources**: Smith 2023, Jones 2022
**Relevance**: [connection to our study]
### Theme 2: [Theme Name]
[repeat pattern]
---
## Supporting Findings
| Finding | Source | How It Supports Our Work |
|---------|--------|--------------------------|
| [finding] | Smith 2023 | [explanation] |
---
## Contradictory Findings
| Finding | Source | Possible Explanation |
|---------|--------|---------------------|
| [finding] | Jones 2022 | [why it differs] |
---
## Gaps in Literature
| Gap | Evidence | How We Address It |
|-----|----------|-------------------|
| [gap] | No studies on X | We examine X |
---
## Implications for Manuscript
### Introduction
- **Paragraph 1 (Problem)**: Cite [sources]
- **Paragraph 2 (Knowledge)**: Cite [sources]
- **Paragraph 3 (Gap)**: Cite [sources]
- **Paragraph 4 (This Study)**: Reference scope.md
### Discussion
- **Comparisons**: [sources for comparing results]
- **Interpretation**: [sources for mechanisms]
Using notes/literature-synthesis.md, draft the Introduction.
Paragraph 1: The Problem
Paragraph 2: Current Knowledge
Paragraph 3: The Gap
Paragraph 4: This Study
Create drafts/introduction.md:
# Introduction
[Paragraph 1 - Problem and significance]
[Paragraph 2 - Current knowledge]
[Paragraph 3 - Gap and limitations]
[Paragraph 4 - This study's purpose]
---
## References Used
1. [Citation] - notes/papers/smith-2023.md
2. [Citation] - notes/papers/jones-2022.md
...
Save to:
notes/papers-library/*.pdf - Central PDF storagenotes/papers/*.md - Condensed notes per papernotes/bibliography.md - Master reference listnotes/literature-synthesis.md - Aggregated synthesisdrafts/introduction.md - Introduction draftReturn summary:
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.