scientific-skills/Academic Writing/adverse-event-narrative/SKILL.md
1. Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work. 2. Validate that the request matches the documented scope and stop early if the task would require unsupported as.
npx skillsauth add aipoch/medical-research-skills adverse-event-narrativeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
scripts/main.py.references/ for task-specific guidance.Python: 3.10+. Repository baseline for current packaged skills.Third-party packages: not explicitly version-pinned in this skill package. Add pinned versions if this skill needs stricter environment control.cd "20260318/scientific-skills/Academic Writing/adverse-event-narrative"
python -m py_compile scripts/main.py
python scripts/main.py --help
Example run plan:
CONFIG block or documented parameters if the script uses fixed settings.python scripts/main.py with the validated inputs.See ## Workflow above for related details.
scripts/main.py.references/ contains supporting rules, prompts, or checklists.Use this command to verify that the packaged script entry point can be parsed before deeper execution.
python -m py_compile scripts/main.py
Use these concrete commands for validation. They are intentionally self-contained and avoid placeholder paths.
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/main.py --help
python scripts/main.py --validate-only --help
Regulatory-grade narrative generation tool that transforms adverse event case data into CIOMS-compliant ICSR narratives suitable for submission to FDA, EMA, and other health authorities.
Key Capabilities:
Generate standardized sections per CIOMS guidelines:
from scripts.narrative_generator import NarrativeGenerator
generator = NarrativeGenerator()
# Generate complete narrative
narrative = generator.generate(
case_data=case_json,
format="cioms_i", # or "ich_e2b", "fda_medwatch"
include_meddra=True
)
narrative.save("ICSR_2024_001_narrative.txt")
Standard Sections:
Reconstruct timeline and assess temporal plausibility:
# Analyze temporal relationships
timeline = generator.analyze_timeline(
drug_start="2024-01-15",
drug_stop="2024-02-01",
ae_onset="2024-01-28",
dechallenge_date="2024-02-01",
rechallenge_date=None
)
# Output shows temporal assessment
# "AE onset 13 days after drug initiation, positive dechallenge within 24h"
Assessments Generated:
Structure causality assessment per WHO-UMC criteria:
# Generate causality section
causality = generator.assess_causality(
case_data=case,
criteria="who_umc", # or "naranjo", "cochrane"
include_rationale=True
)
# Output structured assessment with points for each criterion
WHO-UMC Categories:
Generate narratives for different regulatory contexts:
# FDA MedWatch Form 3500A
fda_narrative = generator.generate(
case_data=case,
format="fda_medwatch",
max_length=2000 # Character limit
)
# EMA E2B(R3) electronic format
ema_narrative = generator.generate(
case_data=case,
format="ich_e2b",
version="R3"
)
# CIOMS I paper format
cioms_narrative = generator.generate(
case_data=case,
format="cioms_i"
)
Pre-Generation:
Narrative Content:
Post-Generation:
Completeness Issues:
❌ Missing dechallenge information → Cannot assess causality
❌ Vague temporal information → "Recently started" vs. specific dates
❌ Incomplete concomitant medication list → Alternative causes missed
Medical Accuracy Issues:
❌ Incorrect MedDRA coding → Wrong medical concept
❌ Confusing correlation with causation → Temporal = causal
❌ Omitting alternative diagnoses → Biased toward drug causation
Regulatory Issues:
❌ Opinion in narrative body → "Clearly caused by drug"
❌ Patient identifiers → HIPAA/privacy violation
❌ Abbreviations not defined → Assumes reader knowledge
Available in references/ directory:
cioms_i_guidelines.pdf - CIOMS I international reporting standardsich_e2b_specifications.md - ICH E2B(R3) electronic format detailsmeddra_coding_guide.md - MedDRA terminology and coding principleswho_umc_causality.md - WHO causality assessment criteriafda_medwatch_guide.md - FDA Form 3500A instructionsgvp_module_vi.md - EU Good Pharmacovigilance Practicesnarrative_templates.md - Example narratives by case typeLocated in scripts/ directory:
main.py - CLI interface for narrative generationnarrative_generator.py - Core narrative composition enginetemporal_analyzer.py - Timeline reconstruction and analysiscausality_assessor.py - Causality evaluation supportmeddra_integrator.py - Medical terminology and codingvalidator.py - Completeness and quality checksformat_converter.py - Convert between CIOMS, E2B, MedWatch formatsbatch_processor.py - Multi-case narrative generation⚠️ CRITICAL: This tool generates draft narratives for efficiency. All adverse event narratives require review by qualified drug safety physicians before regulatory submission. Causality assessment must be performed by healthcare professionals with access to complete medical records.
Every final response should make these items explicit when they are relevant:
scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.This skill accepts requests that match the documented purpose of adverse-event-narrative 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:
adverse-event-narrativeonly handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.
Use the following fixed structure for non-trivial requests:
If the request is simple, you may compress the structure, but still keep assumptions and limits explicit when they affect correctness.
tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.