$npx -y skills add Aperivue/medsci-skills --skill author-strategyPubMed author profile analysis. Author name → PubMed fetch → study-type classification → visualization → strategy report → optional trajectory-archetype classification.
| 1 | # /author-strategy — PubMed Author Strategy Analysis |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Analyze a researcher's PubMed publication portfolio to reverse-engineer their research strategy. Produces a CSV dataset, 7 visualizations, and a strategy report. |
| 6 | |
| 7 | ## Prerequisites |
| 8 | |
| 9 | - Python 3.10+ with `biopython`, `pandas`, `matplotlib`, `seaborn`, and `pyyaml` (PyYAML is required by the archetype classifier and the rubric renderer) |
| 10 | - Scripts: `${CLAUDE_SKILL_DIR}/fetch_pubmed.py`, `${CLAUDE_SKILL_DIR}/analyze_patterns.py`, `${CLAUDE_SKILL_DIR}/pubmed_parse.py` (stdlib parser), `${CLAUDE_SKILL_DIR}/classify_archetypes.py`, `${CLAUDE_SKILL_DIR}/render_archetype_doc.py` |
| 11 | - Rubric: `${CLAUDE_SKILL_DIR}/references/trajectory_archetypes.yaml` (canonical) and `${CLAUDE_SKILL_DIR}/references/trajectory_archetypes.md` (generated) |
| 12 | |
| 13 | ## Workflow |
| 14 | |
| 15 | ### Step 1: Gather Input |
| 16 | |
| 17 | Ask the user for: |
| 18 | 1. **Author name** (PubMed format, e.g., "Kim DK" or "Lee KS") |
| 19 | 2. **Last name** for position classification (auto-detected if ambiguous) |
| 20 | 3. **Output directory** (default: `~/.local/cache/author-strategy/{AuthorName}/`) |
| 21 | |
| 22 | ### Step 2: Fetch PubMed Data |
| 23 | |
| 24 | ```bash |
| 25 | python "${CLAUDE_SKILL_DIR}/fetch_pubmed.py" "{Author Name}" \ |
| 26 | --last-name "{LastName}" \ |
| 27 | --output "{output_dir}/data/{name}_publications.csv" \ |
| 28 | --email "{user_email}" |
| 29 | ``` |
| 30 | |
| 31 | Review the console summary (total count, study type distribution, author position). |
| 32 | If count is 0, suggest alternative name formats (e.g., "Yon DK" vs "Yon D" vs "Yon Dong Keon"). |
| 33 | |
| 34 | ### Step 3: Generate Visualizations and Report |
| 35 | |
| 36 | ```bash |
| 37 | python "${CLAUDE_SKILL_DIR}/analyze_patterns.py" "{output_dir}/data/{name}_publications.csv" \ |
| 38 | --output-dir "{output_dir}/report/" \ |
| 39 | --author-name "{Author Name}" |
| 40 | ``` |
| 41 | |
| 42 | This produces: |
| 43 | - 7 PNG charts (01-07) |
| 44 | - `analysis_report.md` with strategy breakdown |
| 45 | |
| 46 | ### Step 4: Interpret and Present |
| 47 | |
| 48 | Read `analysis_report.md` and present to the user: |
| 49 | |
| 50 | 1. **Executive summary**: total publications, growth trajectory, high-tier rate |
| 51 | 2. **Primary strategy**: what study type dominates and why |
| 52 | 3. **Author position analysis**: first/last positional rate vs middle (positional heuristic only — not leadership or corresponding-author metadata, which are unavailable here) |
| 53 | 4. **Topic clusters**: research focus areas |
| 54 | 5. **ROI quadrant**: which strategies yield high-tier + leadership vs. volume only |
| 55 | 6. **Replication opportunities**: which patterns are replicable with Claude Code + public databases |
| 56 | |
| 57 | ### Step 5: Optional — MA Gap Identification |
| 58 | |
| 59 | If the user asks "what MA topics are feasible with this professor?": |
| 60 | - Cross-reference topic clusters with existing MA plans in memory |
| 61 | - Identify gaps where the professor has domain expertise but no MA published |
| 62 | - Output a prioritized list of MA proposals |
| 63 | |
| 64 | ## Optional: Trajectory-Archetype Classification |
| 65 | |
| 66 | A second, opt-in capability that classifies the author's trajectory into abstract |
| 67 | career archetypes (A1–A6 + a composite) as an **explainable, multi-label, |
| 68 | confidence-scored heuristic — not an objective verdict**. The rubric is the canonical |
| 69 | `references/trajectory_archetypes.yaml`. This path is **gated**: a surname alone does not |
| 70 | resolve an author, so the corpus must pass an explicit disambiguation review before it |
| 71 | can be classified. |
| 72 | |
| 73 | ### Step 6: Disambiguation Gate (required before classification) |
| 74 | |
| 75 | Pass disambiguators so the target author is uniquely attributed (a surname alone is never |
| 76 | sufficient): |
| 77 | |
| 78 | ```bash |
| 79 | python "${CLAUDE_SKILL_DIR}/fetch_pubmed.py" "{Author Name}" \ |
| 80 | --initials "{Initials}" --orcid "{ORCID}" \ |
| 81 | --affiliation "{Institution}" --year-from "{YYYY}" --year-to "{YYYY}" \ |
| 82 | --output "{output_dir}/data/{name}_publications.csv" --email "{user_email}" |
| 83 | ``` |
| 84 | |
| 85 | This writes the CSV, a `candidates.json` of affiliation/year candidate clusters, and a |
| 86 | `corpus_manifest.json` with `review_status: pending`. **Present the candidate clusters to |
| 87 | the user for review.** The user decides include/exclude. Only after the user has reviewed |
| 88 | the clusters do you finalize and approve the corpus (the `--approve` flag is a human gate |
| 89 | — never set it without explicit user review/approval): |
| 90 | |
| 91 | ```bash |
| 92 | python "${CLAUDE_SKILL_DIR}/fetch_pubmed.py" "{Author Name}" \ |
| 93 | --initials "{Initials}" --affiliation "{Institution}" \ |
| 94 | --include-pmids "{included.txt}" --exclude-pmids "{excluded.txt}" --approve \ |
| 95 | --output "{output_dir}/data/{name}_publications.csv" --email "{user_email}" |
| 96 | ``` |
| 97 | |
| 98 | The manifest is cryptographically bound to the CSV (`csv_sha256` + `pmid_set_hash`); the |
| 99 | classifier refuses to run on an unapproved or mismatched corpus. |
| 100 | |
| 101 | ### Step 7: Run the Classifier and Present |
| 102 | |
| 103 | ```bash |
| 104 | python " |