writer
npx skills add https://github.com/sxg/science --skill writer
Agent 安装分布
Skill 文档
Scientific Manuscript Writer
Orchestrates the creation of scientific manuscript drafts through a structured, note-generating workflow.
Core Principle: No Silent Assumptions
This skill NEVER makes assumptions about user data without explicit confirmation.
When encountering ambiguity in data, code, or figures:
- STOP and ask the user for clarification
- DOCUMENT all clarifications received
- VERIFY interpretations before drafting
It is better to ask too many questions than to misinterpret the user’s research. Every clarification is logged in the relevant notes files for transparency.
Specialist Agents
This skill employs specialist agents for domain expertise:
| Agent | Role | Invoked During |
|---|---|---|
| Statistical Reviewer | Statistical accuracy review | Methods, Results |
| Academic Reviewer | Publication readiness review | Before Assembly |
Statistical Reviewer Agent
The statistical reviewer (agents/statistical-reviewer.md) ensures:
- Appropriate statistical test selection
- Assumption checking and validation
- Correct statistical reporting format
- Effect sizes with confidence intervals
- Multiple comparison handling
No statistical claims are published without statistical reviewer sign-off.
Academic Reviewer Agent
The academic reviewer (agents/academic-reviewer.md) acts as a skeptical peer reviewer:
- Verifies every claim is supported by its cited reference
- Validates the hypothesis is scientifically meaningful and testable
- Confirms methods actually test the stated hypothesis
- Independently interprets results before reading Discussion
- Identifies discrepancies between evidence and author conclusions
- Flags overstatements and unsupported claims
- Routes issues to other agents or user for resolution
No manuscript proceeds to final assembly without academic reviewer approval.
Expected Project Structure
User must organize their project folder as follows:
project/
âââ papers/ # PDF files of relevant literature
â âââ smith-2023.pdf
â âââ jones-2022.pdf
â âââ ...
âââ data/ # Raw data outputs (CSV, Excel)
â âââ results.csv
â âââ demographics.csv
â âââ ...
âââ figures/ # Generated figures (PNG, JPG, SVG)
â âââ figure1.png
â âââ figure2.png
â âââ ...
âââ ethics/ # OPTIONAL - Ethics/governance documents (.pdf, .docx, .md)
â âââ protocol.pdf # Approved protocol (IRB, IACUC, ethics committee, etc.)
â âââ amendments/ # Optional protocol amendments
âââ config.md # Project configuration (see template below)
Ethics Documents (Optional)
If provided, ethics/governance documents enable:
- Auto-populated ethics statement in final manuscript
- Scope comparison checkpoint during scoping (catches discrepancies early)
- Cross-reference validation in Methods and Results (ensures consistency)
Supports: IRB protocols, IACUC approvals, ethics committee decisions, data governance agreements.
Supported formats: PDF, Word (.docx), Markdown (.md)
config.md Template
# Project Configuration
## GitHub Repository
url: https://github.com/username/repo-name
branch: main
access: private # or public
## Constraints
word_limit: 3500
target_journal: [Target Journal]
citation_style: AMA
## Additional Notes
[Any other context for the manuscript]
Output Structure
The skill generates intermediate notes and drafts:
project/
âââ notes/
â âââ papers/ # Condensed notes per PDF (via subagent)
â â âââ smith-2023.md
â â âââ jones-2022.md
â âââ papers-library/ # ALL PDFs stored centrally
â â âââ smith-2023.pdf
â â âââ jones-2022.pdf
â âââ bibliography.md # Master bibliography with citations/links
â âââ literature-synthesis.md # Aggregated themes and findings
â âââ code-analysis.md # GitHub repo analysis
â âââ data-analysis.md # Data/figures interpretation
â âââ ethics-summary.md # Ethics document extraction (if ethics/ provided)
â âââ ethics-scope-comparison.md # Ethics vs actual scope (if ethics/ provided)
â âââ statistical-review.md # Statistical reviewer sign-off report
â âââ reviewer-feedback.md # Academic reviewer feedback
âââ drafts/
â âââ introduction.md
â âââ methods.md
â âââ results.md
â âââ discussion.md
â âââ abstract.md
âââ inventory.md # What's available in project
âââ scope.md # Research question, findings, constraints
âââ manuscript.md # Final assembled draft
Workflow
[1. Context Ingestion] âââ skills/context-ingestion/SKILL.md
â - Scan project folder structure
â - Validate required folders exist
â - Clone/analyze GitHub repository
â - Extract ethics content â notes/ethics-summary.md (if ethics/ exists)
â - Generate inventory.md
â
â¼
[2. Scoping] âââ skills/scoping/SKILL.md
â - Ask: research question
â - Ask: key findings (cross-check with inventory)
â - Ask: constraints (word limit, journal)
â - â
ETHICS SCOPE COMPARISON â Confirm discrepancies with user (if ethics docs exist)
â - Generate scope.md, notes/ethics-scope-comparison.md
â
â¼
[3. Literature Review] âââ skills/literature-review/SKILL.md
â - â
SUBAGENT PER PAPER â Prevents context overflow
â - Process each PDF via isolated subagent â notes/papers/*.md
â - Synthesize from condensed notes â notes/literature-synthesis.md
â - Draft Introduction â drafts/introduction.md
â
â¼
[4. Code Analysis] âââ skills/code-analyzer/SKILL.md
â - Analyze GitHub repository
â - Extract methodology â notes/code-analysis.md
â - â
STATISTICAL REVIEW â Validate methods
â - Draft Methods â drafts/methods.md
â
â¼
[5. Results Interpretation] âââ skills/results-interpreter/SKILL.md
â - Analyze CSV data files
â - Interpret figures
â - Generate â notes/data-analysis.md
â - â
STATISTICAL REVIEW â Validate statistics
â - Draft Results â drafts/results.md
â
â¼
[6. Synthesis] âââ skills/synthesis/SKILL.md
â - Read all notes/*.md
â - Read drafts/introduction.md, methods.md, results.md
â - Draft Discussion â drafts/discussion.md
â - Draft Abstract â drafts/abstract.md
â
â¼
[7. Academic Review] âââ agents/academic-reviewer.md
â - Verify claims against citations
â - Validate hypothesis and methods alignment
â - â
INDEPENDENTLY interpret results
â - Compare to Discussion conclusions
â - Generate â notes/reviewer-feedback.md
â - Route issues to agents or user
â
â¼
[8. Assembly] âââ skills/assembler/SKILL.md
- Confirm reviewer approval
- Combine all drafts
- Populate ethics statement from ethics docs (if available)
- Apply formatting constraints
- Generate â manuscript.md
Entry Points
The workflow supports multiple entry points:
| Command | Starts At | Use When |
|---|---|---|
/writer:draft |
Step 1 | Full workflow from scratch |
/writer:literature |
Step 3 | Scope exists, need lit review |
/writer:methods |
Step 4 | Need to analyze code only |
/writer:results |
Step 5 | Need to interpret data only |
/writer:synthesize |
Step 6 | All drafts exist, need Discussion |
/writer:assemble |
Step 7 | All sections drafted, need final doc |
Executing the Workflow
Step 1: Context Ingestion
Read skills/context-ingestion/SKILL.md and follow it to:
- Validate project folder structure
- Parse config.md for GitHub URL and constraints
- Clone or fetch GitHub repository
- Inventory all available materials
- Output:
inventory.md
Step 2: Scoping
Read skills/scoping/SKILL.md and follow it to:
- Review inventory.md
- Ask user for research question
- Ask user for key findings (validate against data)
- Confirm constraints from config.md
- Output:
scope.md
Step 3: Literature Review
Read skills/literature-review/SKILL.md and follow it to:
- Process user-provided PDFs in
papers/via isolated subagents ânotes/papers/*.md - Save PDFs to central library â
notes/papers-library/*.pdf - Generate bibliography with citations â
notes/bibliography.md - Synthesize findings â
notes/literature-synthesis.md - Draft Introduction â
drafts/introduction.md
Step 4: Code Analysis
Read skills/code-analyzer/SKILL.md and follow it to:
- Analyze cloned GitHub repository
- Extract methodology, statistical approaches, tools
- Output:
notes/code-analysis.md,drafts/methods.md
Step 5: Results Interpretation
Read skills/results-interpreter/SKILL.md and follow it to:
- Analyze CSV files in
data/ - Interpret figures in
figures/ - Output:
notes/data-analysis.md,drafts/results.md
Step 6: Synthesis
Read skills/synthesis/SKILL.md and follow it to:
- Read all accumulated notes
- Integrate findings with literature context
- Output:
drafts/discussion.md,drafts/abstract.md
Step 7: Assembly
Read skills/assembler/SKILL.md and follow it to:
- Combine all draft sections
- Apply word limit and formatting
- Generate reference list
- Output:
manuscript.md
References
references/section-guidelines.md– Writing conventions per sectionreferences/citation-format.md– Citation formatting stylesreferences/source-note-template.md– Template for paper notes