Citation Assistant logo

Citation Assistant

Community
ZhangNy301
citation-assistant

Use when the user needs academic citations, BibTeX, venue/author quality checks, or help filling [CITE] placeholders. Triggers include 文献引用、找引用、citation、bib、参考文献、替换不规范引用、查询作者 H-index、判断期刊/会议质量。

Overview

PublisherZhangNy301
Repositorycitation-assistant
Skill namecitation-assistant
Stars
237
Forks
22
Bundled files
22
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 22 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ZhangNy301 on GitHub. Read the source before you install it.

Installation

Install the Citation Assistant AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ZhangNy301/citation-assistant/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ZhangNy301/citation-assistant.git \
  .claude/skills/citation-assistant
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Citation Assistant in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Citation Assistant on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Citation Assistant is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Citation Assistant 学术文献引用助手

⚠️ 核心原则

  1. 必须通过 scripts/ 目录中的脚本执行,禁止手动编写 curl 命令
  2. 禁止使用 Tavily、WebSearch 等非学术搜索工具进行文献检索
  3. 语义优先:理解引用意图,避免仅用关键词检索
  4. 不自动修改文稿:所有推荐需用户确认后再应用

运行路径(Codex / Claude Code / Cursor)

以本次加载的 SKILL.md 所在目录为 Skill 根目录,不要使用论文项目的当前工作目录来定位脚本,也不要假设客户端会注入 CLAUDE_SKILL_ROOT 等环境变量。

下面示例中的 CITATION_ASSISTANT_ROOT 是自行设置的 shell 变量:将其设为本次加载的 Skill 的绝对路径(包含 SKILL.md、scripts/ 和 data/)。每次新的 shell 调用都需重新设置它,或直接使用脚本的完整绝对路径;路径始终加双引号。

bash
# 将此路径替换为本次加载的 SKILL.md 所在目录
CITATION_ASSISTANT_ROOT="/absolute/path/to/citation-assistant"
bash "${CITATION_ASSISTANT_ROOT}/scripts/venue_info.sh" "Nature Medicine"

脚本从自身位置读取同一安装目录内的 .env 和 data/,可以在任意论文目录运行。在 Codex 中可通过 $citation-assistant 显式调用,也可用自然语言请求引用检索、BibTeX 或期刊质量查询。

📦 可用脚本

依赖:Bash、curl、jq、支持 -json 的 sqlite3。搜索、作者查询和 DOI 转换需要网络;CCF / IF 查询只读本地数据库。

下表中的相对路径以 Skill 根目录为基准;从论文目录调用时使用上述绝对路径。

脚本用途用法
search_papers.sh默认文献检索:S2 搜索持续 429 后自动转 CrossRef,结果带来源bash scripts/search_papers.sh "query" [limit]
s2_search.sh少量高相关结果检索(含 arXiv 判断)bash scripts/s2_search.sh "query" [limit]
s2_bulk_search.sh批量拉取候选结果并按本地 limit 输出(含 arXiv 判断)bash scripts/s2_bulk_search.sh "query" "year_range" limit
author_info.sh作者信息查询(H-index)bash scripts/author_info.sh "author_id"
venue_info.sh期刊综合查询bash scripts/venue_info.sh "venue_name"
ccf_lookup.shCCF 分级查询bash scripts/ccf_lookup.sh "venue_name"
if_lookup.sh影响因子查询bash scripts/if_lookup.sh "journal_name"
doi2bibtex.shDOI 转 BibTeXbash scripts/doi2bibtex.sh "doi"
crossref_search.shCrossRef 搜索(fallback)bash scripts/crossref_search.sh "query" [limit]

🆕 增强功能

arXiv 文章智能判断

搜索结果会自动标记 arXiv 文章的引用状态:

状态条件推荐建议
recommendedarXiv + 引用 ≥ 100✅ 高影响力 arXiv,可引用
cautionarXiv + 引用 < 100⚠️ 低引用 arXiv,谨慎引用
normal正式发表✅ 正式发表

配置引用阈值(默认 100):

bash
export ARXIV_CITATION_THRESHOLD=100

作者信息查询

搜索结果包含前 3 位作者的 ID,可用于查询 H-index:

bash
# 查询作者 H-index、总引用量、论文数
bash "${CITATION_ASSISTANT_ROOT}/scripts/author_info.sh" "18119920"

返回示例:

json
{
  "name": "Daquan Zhou",
  "hIndex": 25,
  "citations": 8500,
  "papers": 42
}

🔄 工作流程

Step 1: 解析需求

识别用户需求类型:

  • [CITE] 占位符:提取上下文,构造语义查询
  • 替换不规范引用:分析原文引用的语义意图
  • 期刊查询:直接查询 CCF/IF 数据库
  • 作者质量评估:查询第一/通讯作者的 H-index

Step 2: 语义化查询构造

引用目的查询策略示例
事实背书"chest radiography most widely used imaging test globally statistics"
方法引用"attention mechanism transformer neural machine translation"
背景介绍"deep learning medical image analysis survey review"

Step 3: 执行搜索

  • 日常文献检索优先使用 search_papers.sh:S2 相关性搜索,持续 429 时自动转 CrossRef;若用户明确只接受 S2 数据,则使用 s2_search.sh
  • 需要减少请求次数、批量拉取候选结果并再做筛选时,使用 s2_bulk_search.sh
bash
# 默认检索入口(自动处理 S2 持续限流)
bash "${CITATION_ASSISTANT_ROOT}/scripts/search_papers.sh" "YOUR_QUERY" 10

# 批量候选结果(bulk endpoint),再由脚本按 limit 输出前 N 条
bash "${CITATION_ASSISTANT_ROOT}/scripts/s2_bulk_search.sh" "YOUR_QUERY" "2020-" 20

直接使用原始 S2 脚本且返回 429 错误时,可显式使用 CrossRef fallback(search_papers.sh 已自动处理):

bash
bash "${CITATION_ASSISTANT_ROOT}/scripts/crossref_search.sh" "YOUR_QUERY" 20

自动降级限定期刊论文、会议论文与预印本类记录;检查 CrossRef 的 work_type,预印本不能当作已正式发表。

检查 source / search_method:CrossRef 结果属于独立来源的文献匹配,不应描述为 S2 的相关性排名。其作者 ID、arXiv 判断等不可用字段为 null / unknown,不要调用 author_info.sh 查询空 ID,也不要补造 H-index。引用量必须标注数据来源,不直接混用不同来源的计数。降级后的结果同样需要核实是否支持原文观点。

Step 4: 评估文献质量

bash
# 查询期刊质量
bash "${CITATION_ASSISTANT_ROOT}/scripts/venue_info.sh" "Nature Medicine"

# 查询作者 H-index
bash "${CITATION_ASSISTANT_ROOT}/scripts/author_info.sh" "AUTHOR_ID"

Step 5: 生成 BibTeX

bash
bash "${CITATION_ASSISTANT_ROOT}/scripts/doi2bibtex.sh" "10.1038/s41591-020-0792-9"

Step 6: 生成中文推荐报告

输出格式示例:

markdown
## 引用推荐报告

### [CITE] 位置 1

**原文上下文**:
> In chest radiography---arguably the most widely used imaging test globally [CITE]---

**推荐文献**:

#### 推荐 1: Wu2020 - CheXpert: A large chest radiograph dataset...

**质量指标**:
| 维度 | 值 | 说明 |
|------|-----|------|
| CCF 分级 | N/A | 非CS领域期刊 |
| JCR 分区 | Q1 | 顶级医学影像期刊 |
| 影响因子 | 29.1 | 极高影响力 |
| 引用量 | 3500+ | 高被引文献 |
| arXiv 状态 | normal | 正式发表 |

**推荐理由**:顶级期刊发表,直接支持原文论点。

**BibTeX**:
```bibtex
@article{Wu2020, ... }

建议用法:将 [CITE] 替换为 ~\cite{Wu2020}


---

## ⚙️ 配置

### Semantic Scholar API Key(强烈推荐)

```bash
# 在 Skill 目录创建 .env 文件
echo 'S2_API_KEY="your_key_here"' > "${CITATION_ASSISTANT_ROOT}/.env"

# 获取 API Key: https://www.semanticscholar.org/product/api/api-key
模式速率限制推荐场景
有 API Key1 次/秒日常使用(推荐)
无 API Key共享限额极易触发 429

arXiv 引用阈值(可选)

bash
# 默认 100,可在 .env 中配置
echo 'ARXIV_CITATION_THRESHOLD=100' >> "${CITATION_ASSISTANT_ROOT}/.env"

🚨 错误处理

429 Rate Limit

  1. S2 脚本已自动进行有界重试(默认最多 2 次),优先遵守 Retry-After;不要连续重复调用或把 429 当作无效密钥
  2. 仍失败时等待更长时间,并说明当前接口受限;带 Key 或切换 bulk 接口也不保证解除限流
  3. 论文检索可使用 crossref_search.sh fallback;作者 H-index 无此替代,无法获取时明确标记未知

401 / 403

脚本不重试认证或权限错误。检查 Skill 目录的 .env / S2_API_KEY 及接口权限,不输出密钥。

无搜索结果

  1. 简化关键词
  2. 使用英文查询
  3. 尝试 CrossRef fallback

📊 质量评估维度

维度权重计算
CCF 分级基础分A=100, B=70, C=40
JCR 分区基础分Q1=80, Q2=60, Q3=40, Q4=20
中科院分区基础分1区=90, 2区=70, 3区=50, 4区=30
影响因子30%IF × 5 (上限50)
引用量20%log₁₀(citations+1) × 10 (上限50)
年份10%(year-2015) × 2 (上限30)
作者 H-index10%第一作者 H-index × 2 (上限30)

arXiv 处理:

  • 引用 ≥ 100:正常评分
  • 引用 < 100:降低优先级 (-20 分)
  • 有正式发表版本优先

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Citation Assistant AI skill do?

Use when the user needs academic citations, BibTeX, venue/author quality checks, or help filling [CITE] placeholders. Triggers include 文献引用、找引用、citation、bib、参考文献、替换不规范引用、查询作者 H-index、判断期刊/会议质量。

Why use Citation Assistant on TypingMind?

Because you install it once and use it with any model. Citation Assistant is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Citation Assistant in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ZhangNy301/citation-assistant/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Citation Assistant?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Citation Assistant?

As many as you like. As long as a model supports skills, you can use Citation Assistant with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Citation Assistant AI skill free?

It is published on GitHub by ZhangNy301. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇