返回顶部
s

semanticscholar-skill语义学者搜索

Use when searching academic papers, looking up citations, finding authors, or getting paper recommendations using the Semantic Scholar API. Triggers on queries about research papers, academic search, citation analysis, or literature discovery.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.3.0
安全检测
已通过
100
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

semanticscholar-skill

Semantic Scholar 搜索工作流

通过语义学者API使用结构化的四阶段工作流搜索学术论文。

关键规则: 切勿多次连续调用Bash进行API请求。始终编写一个Python脚本运行所有搜索,然后一次性执行。所有速率限制由s2.py自动处理。

第一阶段:理解与规划

解析用户意图并选择搜索策略:

决策树

用户想要...策略函数
广泛主题探索相关性搜索searchrelevance()
精确技术术语、确切短语
使用布尔运算符的批量搜索 | searchbulk() 配合 buildboolquery() | | 特定段落或方法 | 片段搜索 | search_snippets() | | 已知论文(按标题) | 标题匹配 | match_title() | | 已知论文(按DOI/PMID/ArXiv) | 直接查找 | get_paper() | | 引用某已知论文的文献 | 引用遍历 | get_citations() | | 与某篇论文相关 | 单种子推荐 | find_similar() | | 与多篇论文相关 | 多种子推荐 | recommend() | | 查找研究人员 | 作者搜索 | search_authors() | | 研究人员简介 | 作者详情 | get_author() | | 研究人员的出版物 | 作者论文 | getauthorpapers() |

查询构建规则

  • - 歧义术语(例如,干细胞可能指间充质干细胞或干细胞样T细胞):使用buildboolquery()配合精确短语和排除项
- 示例:buildboolquery(phrases=[干细胞样T细胞], required=[CD4, TCF7], excluded=[间充质, 造血干细胞])
  • - 多上下文查询(例如,癌症和自身免疫中的主题X):规划独立搜索,使用deduplicate()去重
  • 广泛主题:使用带过滤器的search_relevance()(年份、会议地点、研究领域、最低引用次数)

规划过滤器

过滤器使用场景
year=2020-仅近期工作
publication_date=2024-01-01:2024-06-30
精确日期范围(YYYY-MM-DD) | | fieldsofstudy=Medicine | 限制领域 | | min_citations=10 | 仅成熟论文 | | pub_types=Review | 查找综述/元分析 | | pub_types=ClinicalTrial | 仅临床试验 | | open_access=True | 仅开放获取论文 |

检查点: 继续前确认:(1) 搜索策略匹配用户意图,(2) 过滤器适当,(3) 查询足够具体以避免不相关结果。

第二阶段:执行搜索

编写一个Python脚本。示例:

python
import sys, os
SKILL_DIR = next((p for p in [
os.path.expanduser(~/.claude/skills/semanticscholar-skill),
os.path.expanduser(~/.openclaw/skills/semanticscholar-skill),
] if os.path.isdir(p)), .)
sys.path.insert(0, SKILL_DIR)
from s2 import *

构建精确查询

q = buildboolquery( phrases=[干细胞样T细胞], required=[CD4, IBD], excluded=[间充质] ) papers = searchbulk(q, maxresults=30, year=2018-, fieldsofstudy=Medicine) papers = deduplicate(papers)

print(format_results(papers, IBD中的干细胞样CD4 T细胞))

执行命令:python3 /tmp/s2_search.py

规则:

  • - 从s2导入所有内容:from s2 import *
  • 将脚本写入/tmp/s2_search.py(或类似临时路径)
  • 一次Bash调用执行。切勿通过多次独立Bash调用链式进行多个API调用。
  • 速率限制、重试和退避在s2.py中自动处理

检查点: 验证脚本成功运行(无异常)并返回结果。如果结果为0,在呈现前放宽查询或放松过滤器。

工作示例

示例1:作者工作流 — 查找Yann LeCun关于自监督学习的论文

python
import sys, os
SKILL_DIR = next((p for p in [
os.path.expanduser(~/.claude/skills/semanticscholar-skill),
os.path.expanduser(~/.openclaw/skills/semanticscholar-skill),
] if os.path.isdir(p)), .)
sys.path.insert(0, SKILL_DIR)
from s2 import *

authors = searchauthors(Yann LeCun, maxresults=5)
print(format_authors(authors))

使用第一个匹配的ID获取其论文

author_id = authors[0][authorId] papers = getauthorpapers(authorid, maxresults=50)

本地按主题过滤

ssl_papers = [p for p in papers if self-supervised in (p.get(title) or ).lower()] print(formatresults(sslpapers, Yann LeCun - 自监督学习))

示例2:引用链 — 谁引用了Transformer论文,他们在此基础上构建了什么?

python
import sys, os
SKILL_DIR = next((p for p in [
os.path.expanduser(~/.claude/skills/semanticscholar-skill),
os.path.expanduser(~/.openclaw/skills/semanticscholar-skill),
] if os.path.isdir(p)), .)
sys.path.insert(0, SKILL_DIR)
from s2 import *

paper = get_paper(DOI:10.48550/arXiv.1706.03762)
print(f标题: {paper[title]}, 引用数: {paper[citationCount]})

获取引用此论文的高引用论文

citing = getcitations(paper[paperId], maxresults=50) citing_papers = [c[citingPaper] for c in citing if c.get(citingPaper)] citing_papers.sort(key=lambda p: p.get(citationCount, 0), reverse=True) print(formatresults(citingpapers, 引用《Attention Is All You Need》的高引用论文))

示例3:多种子推荐与BibTeX导出 — 查找类似这两篇但不关于NLP的论文

python
import sys, os
SKILL_DIR = next((p for p in [
os.path.expanduser(~/.claude/skills/semanticscholar-skill),
os.path.expanduser(~/.openclaw/skills/semanticscholar-skill),
] if os.path.isdir(p)), .)
sys.path.insert(0, SKILL_DIR)
from s2 import *

recs = recommend(
positive_ids=[DOI:10.1038/nature14539, ARXIV:2010.11929],
negative_ids=[ARXIV:1706.03762],
limit=20
)
print(format_results(recs, 类似深度学习与ViT的视觉论文,排除NLP))

导出前10个结果的BibTeX

bibdata = batchpapers([r[paperId] for r in recs[:10]], fields=title,citationStyles) print(exportbibtex(bibdata))

第三阶段:总结与呈现

  • - 使用format_results()获得一致的输出(摘要表+前10详情)
  • 如果用户语言为中文,用中文呈现摘要
  • 始终注明总结果数量和使用的搜索策略
  • 根据用户的具体问题突出最相关的论文

第四阶段:用户交互循环

呈现结果后,始终提供以下选项:

  1. 1. 翻译 — 将标题/摘要翻译成中文(或其他语言)
  2. 详情 — 特定论文编号的完整摘要
  3. 优化 — 使用不同术语/过滤器缩小或扩大搜索
  4. 相似 — 查找与特定结果相似的论文(findsimilar())
  5. 引用 — 谁引用了特定论文(getcitations())
  6. 导出 — 通过exportbibtex()、exportmarkdown()或export_json()保存结果
  7. 完成 — 结束搜索会话

循环直到用户表示完成。每次后续操作使用相同的单脚本模式。



API快速参考

辅助模块(s2.py)

python
import sys, os
SKILL_DIR = next((p for p in [
os.path.expanduser(~/.claude/skills/semanticscholar-skill),
os.path.expanduser(~/.openclaw/skills/semanticscholar-skill),
] if os.path.isdir(p)), .)
sys.path.insert(0, SKILL_DIR)
from s2 import *

论文搜索函数

|

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 semanticscholar-skill-1775711345 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 semanticscholar-skill-1775711345 技能

通过命令行安装

skillhub install semanticscholar-skill-1775711345

下载

⬇ 下载 semanticscholar-skill v0.3.0(免费)

文件大小: 17.62 KB | 发布时间: 2026-4-11 23:00

v0.3.0 最新 2026-4-11 23:00
- Major update: the SKILL.md now details a structured, 4-phase workflow for searching papers, citations, authors, and recommendations via the Semantic Scholar API.
- Added clear guidelines for query planning, including a decision tree, precise filter use, and best practices for ambiguous or multi-context academic queries.
- Standardized search execution: all API actions must be combined into a single Python script per request, ensuring rate limiting is handled automatically and Bash calls are minimized.
- Included multiple worked example scripts covering author search, citation traversal, multi-seed recommendations, and export options.
- Outlined best practices for summarizing and presenting results, including multi-language support.
- Introduced a user interaction loop with specific refine, export, and follow-up options to guide further research steps.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部