bioc-fulltext-fetch
给定 PMID / PMCID 取结构化全文(BioC XML/JSON)。封装 NLM BioC PubMed API(标题+摘要)和 BioC PMC OA API(开放获取全文),输出按章节切分的段落、表格上下文、RAG 友好 chunk。适合大批量入向量库。触发词:全文抽取 / BioC / RAG 入库…
Skill by EthanYoQ
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ethanyoq-bioc-fulltext-fetch-7dfddb
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/bioc-fulltext-fetch
What's inside
- Skill name
bioc-fulltext-fetch- Description
- 给定 PMID / PMCID 取结构化全文(BioC XML/JSON)。封装 NLM BioC PubMed API(标题+摘要)和 BioC PMC OA API(开放获取全文),输出按章节切分的段落、表格上下文、RAG 友好 chunk。适合大批量入向量库。触发词:全文抽取 / BioC / RAG 入库 / 文献全文 / PMC 开放获取 / structured fulltext / 段落抽取 / 表格抽取 / fulltext to vector store。
- License
- MIT
- Instructions
- 351 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# BioC Fulltext Fetch
封装 NLM BioC API,用于将 PubMed / PMC 文献转换为 RAG 友好的结构化全文 chunk。
## 1. 职责边界(单一职责)
**只做**:给定 PMID / PMCID,取结构化全文(BioC XML/JSON 格式),输出段落、章节、表格上下文、RAG chunk。
**不做**:
- 检索文献(交给 `pubmed-eutils` / `europepmc-search`)
- 实体标注(交给 `pubtator3`)
- 向量化(交给下游的 embedding pipeline / LangChain / LlamaIndex)
- ID 转换(可调用 `pubmed-eutils.elink_pubmed_to_pmc`,但本 skill 不实现 elink)
如果需要这些能力,请使用对应的 skill。
## 2. 何时使用
触发场景:
- "把这批 PMID 的全文取下来,准备入 ChromaDB"
- "我有 PMCID 列表,需要按章节切分做 RAG"
- "提取 Methods 章节段落"
- "找出表格周围的语义文本"
- "Build vector index from PMC open access papers"
不要使用本 skill 当:
- 用户只需要标题/摘要的纯文本 → 用 `pubmed-eutils.efetch`
- 用户需要做语义检索 → 用 `europepmc-search` 或 `pubmed-search`
- 用户需要实体标注(基因/疾病/化合物) → 用 PubTator3 类 skill
## 3. 两个 BioC 端点
| 端点 | 输入 | 覆盖 | 内容 |
|------|------|------|------|
| **BioC PubMed** | PMID | 全 PubMed (~37M) | 标题 + 摘要 + MeSH (结构化) |
| **BioC PMC OA** | PMCID | PMC 开放获取子集 (~10M) | 全文(章节、段落、表格、图注) |
端点示例:
```
# 摘要级
https://www.ncbi.nlm.nih.gov/research/bionlp/RESTful/pubmed.cgi/BioC_json/{PMID}/unicode
# 全文级
https://www.ncbi.nlm.nih.gov/research/bionlp/RESTful/pmcoa.cgi/BioC_json/{PMCID}/unicode
```
文档参考:
- BioC PubMed: https://www.ncbi.nlm.nih.gov/research/bionlp/APIs/BioC-PubMed/
- BioC PMC OA: https://www.ncbi.nlm.nih.gov/research/bionlp/APIs/BioC-PMC/
## 4. 推荐工作流
```
用户给 PMID list
│
▼
[可选] elink PMID → PMCID (调用 pubmed-eutils)
│
├── PMCID 存在 + 是 OA ──► fetch_fulltext_bioc(pmcid) ← 全文
│ │
│ ▼
│ extract_paragraphs / extract_tables_context
│ │
│ ▼
│ to_rag_chunks(chunk_size=512, overlap=50)
│
└── 不可用 / 非 OA ──────► fetch_abstract_bioc(pmid) ← 摘要兜底
│
▼
to_rag_chunks (摘要也按段切)
```
## 5. 核心能力(5 个函数)
### 5.1 `fetch_abstract_bioc(pmid: str) → BioCDocument`
取标题 + 摘要 + MeSH 的 BioC 结构化版本。
```python
doc = fetch_abstract_bioc("39523456")
# doc.passages → [{"infons": {"section_type": "TITLE"}, "text": "..."},
# {"infons": {"section_type": "ABSTRACT"}, "text": "..."}]
# doc.infons["mesh"] → ["Leukemia, Myeloid, Acute", "FLT3 Mutation", ...]
```
### 5.2 `fetch_fulltext_bioc(pmcid: str) → BioCDocument`
取 PMC OA 全文,按章节切分(`section_type` ∈ {TITLE, ABSTRACT, INTRO, METHODS, RESULTS, DISCUSS, CONCL, REF, FIG, TABLE, ...})。
```python
doc = fetch_fulltext_bioc("PMC10234567")
# 不可用时抛 NotOpenAccessError 或 NotFoundError
```
错误处理:
- `404` → 该 PMCID 不在 PMC OA 子集 → 抛 `NotOpenAccessError`,调用方应回退到 `fetch_abstract_bioc`
- `429` → 限流 → 退避重试(最多 3 次,指数退避)
- 网络错误 → 抛 `BioCFetchError`,记录日志
### 5.3 `extract_paragraphs(doc: BioCDocument) → list[Paragraph]`
按 BioC `passage` 提取段落数组,保留 section 标签 + 字符 offset。
```python
paragraphs = extract_paragraphs(doc)
# [
# {"section_label": "INTRO", "text": "Acute myeloid leukemia (AML) is...",
# "offset_start": 1234, "offset_end": 1820},
# {"section_label": "METHODS", "text": "Flow cytometry was performed...",
# "offset_start": 2890, "offset_end": 3401},
# ...
# ]
```
实现要点:
- 跳过 `section_type ∈ {REF, FIG_LABEL}` 的纯标签段
- 合并连续相同 section 的短 passage(< 50 字符)
- offset 来自 BioC `passage.offset` 字段,保持原文索引一致From EthanYoQ/Skill-hub, MIT.
More from EthanYoQ/Skill-hub
- 0.597score
contract-elicitor
EthanYoQ
Use FIRST when user requests any disease market sizing report (e.g.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
cite-bound-content-generator
EthanYoQ
Phase 4 Turn 1 of disease-market-sizing-orchestration.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
aact-bulk-trials
EthanYoQ
使用 AACT (Aggregate Analysis of ClinicalTrials.gov) PostgreSQL 数据仓库进行批量、历史、聚合性临床试验数据挖掘。Use this skill when the user requests bulk SQL analysis over the full…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
content-verification-layer
EthanYoQ
Phase 4 Turn 2 of disease-market-sizing-orchestration (A6' upgrade).
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
aliyun-swas-manage
EthanYoQ
Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
agent-reach
EthanYoQ
MUST USE when user wants to 调研/research/搜索/search/查/找/look up anything on the internet — e.g.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
baoyu-image-gen
EthanYoQ
AI image generation with OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes APIs.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
bioc-fulltext-fetch
EthanYoQ
给定 PMID/PMCID 取结构化全文(NLM BioC XML/JSON)。封装 BioC PubMed(标题+摘要)和 BioC PMC OA(开放获取全文)端点,输出按章节切分的段落、表格上下文、RAG 友好 chunk,适合大批量入向量库。Fetches structured fulltext from…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
agent-reach
EthanYoQ
MUST USE when user wants to 调研/research/搜索/search/查/找/look up anything on the internet — e.g.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
citation-anchor-resolver
EthanYoQ
Cite-or-Block 架构的基石原子 skill。把报告里的 citation 锚点 (例如 [guideline:CSCO-2024-NSCLC:§5.5.2] / [pmid:12345678:abstract]) 解析为源文件片段,并核对事实声明里的关键词是否在引用源原文里出现。 Foundation…
SkillBFreshness: B★ 11Claude Code +9 - 0.594score
drug-citation-verifier
EthanYoQ
Cite-or-Block 架构下的药名 cross-check 原子 skill。给定报告文本与 .cache/<slug>/sources/,扫描每个药品提及 → 找最近 citation 锚点 → 核对锚点指向的源里是否真的提到了此药(通用名 + 商品名)。无字典、无 fallback、源里没 =…
SkillBFreshness: B★ 11Claude Code +9 - 0.592score
adaptive-quality-gate
EthanYoQ
Use when work produces a deliverable, factual claim, dataset, code change, decision, publication, deployment, automation, or irreversible action whose failure…
SkillBFreshness: B★ 11Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 11
- Forks
- 4
- Open issues
- 0
- Last commit (this folder)
- Sep 19, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/EthanYoQ/Skill-hub
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from EthanYoQ
- 0.597score
baoyu-image-gen
EthanYoQ
AI image generation with OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes APIs.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
bioc-fulltext-fetch
EthanYoQ
给定 PMID/PMCID 取结构化全文(NLM BioC XML/JSON)。封装 BioC PubMed(标题+摘要)和 BioC PMC OA(开放获取全文)端点,输出按章节切分的段落、表格上下文、RAG 友好 chunk,适合大批量入向量库。Fetches structured fulltext from…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
aact-bulk-trials
EthanYoQ
使用 AACT (Aggregate Analysis of ClinicalTrials.gov) PostgreSQL 数据仓库进行批量、历史、聚合性临床试验数据挖掘。Use this skill when the user requests bulk SQL analysis over the full…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
agent-reach
EthanYoQ
MUST USE when user wants to 调研/research/搜索/search/查/找/look up anything on the internet — e.g.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
aliyun-swas-manage
EthanYoQ
Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
citation-anchor-resolver
EthanYoQ
Cite-or-Block 架构的基石原子 skill。把报告里的 citation 锚点 (例如 [guideline:CSCO-2024-NSCLC:§5.5.2] / [pmid:12345678:abstract]) 解析为源文件片段,并核对事实声明里的关键词是否在引用源原文里出现。 Foundation…
SkillBFreshness: B★ 11Claude Code +9
Cite this page
bioc-fulltext-fetch skill. Agent Mart. https://agentmart.dev/skills/ethanyoq-bioc-fulltext-fetch-7dfddb (last updated 2026-10-24)