Medical review writer architect

From aipoch/medical-research-skills · View interactive version

Medical review writer architect is an AI agent skill from the GitHub repository aipoch/medical-research-skills. A multi-stage workflow for writing long-form medical reviews; used when the user needs to build an outline based on PubMed literature, write chapter by chapter, perform supplementary searches, and format citations; input is the review topic and project directory, output is a c...

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

Medical Review Writer (Architect)

When to Use

When Not to Use

Required Inputs

| Field | Required | Format/Source | Example | If Missing |

|---|---|---|---|---|

| topic | Yes | Text | TP53 in lung cancer | Stop and ask user to provide |

| project_dir | Yes | Local directory | TP53/ | Confirm working directory first |

| language | No | Text | Chinese / English | Default to Chinese if not provided |

| target_scope | No | Text | narrative review / mini review | Execute as standard long review if not provided |

Output Contract

User Checkpoints

Core Workflow

Strictly follow the six-step process below. Core mechanism: After each script execution, the terminal prints a [State Machine] prompt — strictly read the current state and follow the "next step suggestion."

Stage 1: Outline Construction (Outline)

  1. Analyze the topic and plan 3-5 major chapters (Body Sections).
  2. Critical mandatory requirement: The outline must be detailed down to the sub-heading level (i.e., ### 1.1, ### 1.2, etc.). Each major chapter must have 2-4 pre-planned sub-headings with distinct logical divisions — writing only to the ## 1. Chapter Name level is never permitted.
  3. Create outline.md. Must include: Title, Introduction, Body Sections (including all sub-headings), Conclusion.
  4. Confirm the outline with the user before proceeding to the next step.

Detailed instructions: See references/workflow-details.md Stage 1

Stage 2: Data Retrieval and Library Construction

  1. Design search strategies for each chapter (must include Introduction)
  2. Execute searches: python scripts/pubmed_search.py "QUERY" --section "introduction|section_1|..."
  1. Check counts: Run python scripts/count_references.py
  1. Ensure each chapter has adequate literature support

Detailed instructions: See references/workflow-details.md Stage 2

Stage 3: Chapter-by-Chapter Writing

  1. Read chapter references: python scripts/read_references.py "SectionName"
  2. Create introduction.md (Introduction) and section_1.md, section_2.md, etc. for body sections
  3. Format and word count requirements (refer to assets/Review_Final.md):
  1. Literature citation marking: Every objective academic claim needs literature support, using [PMID: xxx] format.
  2. Write-as-you-search (Dynamic Retrieval): If you find insufficient evidence, immediately perform supplementary searches:
  1. Post-writing verification and supplementation:
  1. Document revision mechanism: If revisions are needed to the already-formatted final document, never directly modify the version with hyperlinks. First run python scripts/revert_citations.py Review_Final_Formatted.md -o draft.md to revert to [PMID: xxx] format. Pay attention to the state machine output regarding reference count — if it indicates insufficient references (e.g., < 30), also use pubmed_search.py with the --post-write parameter to supplement with new literature during revision, then re-run the formatting script.
  2. Format reference: The body section portions of assets/Review_Final.md

Detailed instructions:

Stage 4: Conclusion Writing

  1. Review all section_*.md files
  2. Create conclusion.md: Summarize core findings, echo the introduction, look ahead to the future (do not include citations)
  3. Format reference: The conclusion section of assets/Review_Final.md

Detailed instructions: See references/workflow-details.md Stage 4

Stage 5: Abstract and Finalization

  1. Create abstract.md:
  1. Merge and finalize: python scripts/merge_review.py abstract.md introduction.md section_1.md ... -o Review_Final.md (Note: do not include outline.md)
  2. Format verification: Compare Review_Final.md against assets/Review_Final.md

Detailed instructions: See references/workflow-details.md Stage 5

Stage 6: Citation Formatting

  1. Run: python scripts/format_citations.py Review_Final.md -o Review_Final_Formatted.md
  2. Verify: Check citation links and reference list

Detailed instructions: See references/citation-guide.md

Core Principles

Resource Files

Failure Handling

Input Validation

This skill accepts requests that match the documented purpose of medical-review-writer-architect and include enough context to complete the workflow safely.

Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:

medical-review-writer-architect only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.

Quick Validation

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.