Agent Skills
› openai/plugins
› tpmi-phewas-skill
tpmi-phewas-skill
GitHub通过 rsID、GRCh37 或 GRCh38 查询单个变异的 TPMI PheWAS 关联结果。自动解析至 GRCh38,返回简洁摘要,支持分页获取完整数据及原始输出保存。
Trigger Scenarios
用户询问特定基因变异的 PheWAS 关联表型
需要查看单变异的全基因组/疾病关联统计
Install
npx skills add openai/plugins --skill tpmi-phewas-skill -g -y
SKILL.md
Frontmatter
{
"name": "tpmi-phewas-skill",
"description": "Fetch compact TPMI PheWAS summaries for single variants by accepting rsID, GRCh37, or GRCh38 input and resolving to the required GRCh38 query. Use when a user wants concise TPMI association results for one variant"
}
Operating rules
- Use
scripts/tpmi_phewas.pyfor all TPMI PheWAS lookups. - Accept exactly one of
rsid,grch37,grch38, orvariant; resolve to the canonical GRCh38chr:pos-ref-altquery before calling TPMI. - The script accepts
max_results; start withmax_results=10and only increase it if the first slice is insufficient. - Re-run the lookup in long conversations instead of relying on older tool output.
- Treat displayed
...in tool previews as UI truncation, not literal request content. - If the user needs the full association payload, set
save_raw=trueand reportraw_output_pathinstead of pasting large arrays into chat.
Execution behavior
- Return concise markdown summaries from the script JSON by default.
- Return the JSON verbatim only if the user explicitly asks for machine-readable output.
- Surface the canonical queried variant, total association count, and whether the results were truncated.
- Increase
max_resultsgradually instead of asking for large association dumps in one call.
Input
- Read one JSON object from stdin, or a single JSON string containing the variant.
- Required input: exactly one of
rsid,grch37,grch38, orvariant - Optional fields:
max_results,save_raw,raw_output_path,timeout_sec - Common patterns:
{"grch38":"6:160540105-T-C","max_results":10}{"grch37":"6:162447146-T-C","max_results":10}{"rsid":"rs9273363","max_results":10}{"variant":"6:160540105:T:C","max_results":25,"save_raw":true}
Output
- Success returns
ok,source,input,query_variant,max_results_applied,association_count,association_count_total,truncated,associations,variant,variant_url,raw_output_path, andwarnings. - Use
raw_output_pathwhensave_raw=true. - Failure returns
ok=falsewitherror.codeanderror.message.
Execution
echo '{"grch38":"6:160540105-T-C","max_results":10}' | python scripts/tpmi_phewas.py
References
- No additional runtime references are required; keep the import package limited to this file and
scripts/tpmi_phewas.py.
Version History
- 11c74d6 Current 2026-07-19 09:39


