Agent skill

Citation System

by kangarooking in kangarooking/system-prompt-skills

当系统提示需要设计引用格式、信息溯源机制、来源标注系统时调用。适用于文档问答、搜索增强生成(RAG)、代码引用、浏览器辅助等需要让用户追溯信息来源的场景。不适用于纯创作类输出(如故事、诗歌),不适用于无需溯源的常识问答,也不适用于注入防御(虽然两者都涉及内容可信度)。

MITAuto-check passedAI & LLM Engineering

Install Citation System

skills CLI
$ npx skills add kangarooking/system-prompt-skills --skill citation-system -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kangarooking/system-prompt-skills citation-system --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kangarooking/system-prompt-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/citation-system .claude/skills/citation-system && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
citation-system
GitHub stars
205
Token cost
~655 tokens
SKILL.md length
137 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

当系统提示需要设计引用格式、信息溯源机制、来源标注系统时调用。适用于文档问答、搜索增强生成(RAG)、代码引用、浏览器辅助等需要让用户追溯信息来源的场景。不适用于纯创作类输出(如故事、诗歌),不适用于无需溯源的常识问答,也不适用于注入防御(虽然两者都涉及内容可信度)。

  • Works in 6 steps: 内联标记格式:在生成文本中直接嵌入来源标记,用户无需滚动至文末即可定位引用源。 → 格式一致性:整个系统提示中严格使用一种引用格式,不混用多种标记语法。 → 引用保留规则:在改写、总结、翻译等二次处理中,原始引用标记必须完整保留,不得丢失或… → …
  • Tasks that involve Citation management
  • SKILL.md covers R — 原文 (Reading), I — 方法论骨架 (Interpretation), A1 — 案例分析 (Past Application) and A2 — 触发场景 (Future Trigger) ★, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Citation System is an agent skill from kangarooking/system-prompt-skills. 当系统提示需要设计引用格式、信息溯源机制、来源标注系统时调用。适用于文档问答、搜索增强生成(RAG)、代码引用、浏览器辅助等需要让用户追溯信息来源的场景。不适用于纯创作类输出(如故事、诗歌),不适用于无需溯源的常识问答,也不适用于注入防御(虽然两者都涉及内容可信度)。

Its SKILL.md is about 660 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Citation management and Retrieval-augmented generation. It works with OpenAI. The repository describes itself as: 从 165 个顶级 AI 产品系统提示词中蒸馏出的 15 个可执行 Agent skill. The licence is MIT.

When your agent uses it

  • Tasks that involve Citation management
  • Tasks that involve Retrieval-augmented generation

Example prompts

  • “/citation-system”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. 内联标记格式:在生成文本中直接嵌入来源标记,用户无需滚动至文末即可定位引用源。
  2. 格式一致性:整个系统提示中严格使用一种引用格式,不混用多种标记语法。
  3. 引用保留规则:在改写、总结、翻译等二次处理中,原始引用标记必须完整保留,不得丢失或篡改。
  4. 来源可审计性:每个事实性声明都必须有可追溯的引用,外部信息(非系统知识库)必须显式标注。
  5. 实体引用系统:除文档引用外,可扩展支持人物、地点、组织等实体的标记与链接。
  6. 日期消歧:对相对时间表达("昨天"、"上周")进行绝对日期解析,消除歧义。

What it can do on your machine

Read from SKILL.md and the folder at commit 252cd52. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Citation System loads about 655 tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 137 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~655

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from kangarooking/system-prompt-skills at commit 252cd52, republished under its MIT licence (© kangarooking). 137 words, ~655 tokens.

Download SKILL.mdSave it as .claude/skills/citation-system/SKILL.md (or your agent's skills folder).
name
citation-system
description
当系统提示需要设计引用格式、信息溯源机制、来源标注系统时调用。适用于文档问答、搜索增强生成(RAG)、代码引用、浏览器辅助等需要让用户追溯信息来源的场景。不适用于纯创作类输出(如故事、诗歌),不适用于无需溯源的常识问答,也不适用于注入防御(虽然两者都涉及内容可信度)。
tags
引用, 归属, 溯源, RAG, 文档问答
related_skills
injection-defense, mobile-adaptation

引用与归属系统设计

R — 原文 (Reading)

各厂商采用多样化的内联引用格式:Claude Web 使用 Markdown 锚点链接([text](<citation:comment:{id}>)),GPT-4o 文件搜索采用 【msg_idx:search_idx†source】,NotebookLM 实现逐句引用加段落索引 [i],Warp 使用 XML 结构 <citations><document>,Meta AI 实现实体标签 【entity_hint-...】。核心模式:内联标记、引用保留规则、来源可审计响应。

I — 方法论骨架 (Interpretation)

  1. 内联标记格式:在生成文本中直接嵌入来源标记,用户无需滚动至文末即可定位引用源。
  2. 格式一致性:整个系统提示中严格使用一种引用格式,不混用多种标记语法。
  3. 引用保留规则:在改写、总结、翻译等二次处理中,原始引用标记必须完整保留,不得丢失或篡改。
  4. 来源可审计性:每个事实性声明都必须有可追溯的引用,外部信息(非系统知识库)必须显式标注。
  5. 实体引用系统:除文档引用外,可扩展支持人物、地点、组织等实体的标记与链接。
  6. 日期消歧:对相对时间表达("昨天"、"上周")进行绝对日期解析,消除歧义。

A1 — 案例分析 (Past Application)

案例: GPT-4o 文件搜索的强制引用机制
  • 问题: 用户上传多份文档后提问,模型可能编造不存在于文档中的内容,或混淆内容来源。
  • 设计模式的使用: GPT-4o 要求所有基于文档的回答必须包含 【msg_idx:search_idx†source】 格式引用。引用不是可选装饰,而是强制性输出组成部分。未找到引用时不得声称信息来源于文档。
  • 结论: 将引用从"建议行为"升级为"强制约束",显著降低了文档问答中的幻觉率。
案例: Warp 的 XML 结构化引用
  • 问题: 终端命令辅助场景中,用户需要精确知道命令参数的文档来源,但传统脚注格式在终端中可读性差。
  • 设计模式的使用: Warp 采用 XML 结构 <citations><document> 元素,将引用与工具名隔离——引用指向文档本身而非工具调用过程,避免暴露内部实现。
  • 结论: 引用系统的设计应适配输出媒介特性,且引用目标应指向信息源而非系统内部过程。

A2 — 触发场景 (Future Trigger) ★

用户在什么情境下需要?
  1. 构建文档问答系统,需要让用户验证每个答案的来源
  2. 设计搜索增强生成(RAG)系统提示,需要强制引用检索结果
  3. 开发代码辅助工具,需要将建议关联到代码库中的具体位置
  4. 实现多源信息整合系统,需要区分不同来源的贡献
语言信号
  • "需要标注信息来源"
  • "用户应该能追溯每个结论的出处"
  • "如何防止模型编造引用"
  • "引用格式应该怎么设计"
  • "需要保留原始引用标记"
与相邻 skill 的区分
  • 与 injection-defense 区别:注入防御关注内容是否可信/可执行,引用系统关注内容来自哪里、如何标注
  • 与 mobile-adaptation 区别:移动适配关注引用在狭小屏幕上的展示优化,引用系统关注引用的格式与保留规则

E — 可执行步骤 (Execution)

  1. 步骤 1:定义引用标记语法 - 完成标准:选择一种内联标记格式(方括号标注如 【source†Lline】、Markdown 锚点、或 XML 元素),明确定义每个字段含义(消息索引、搜索索引、行号范围),并编写格式示例。
  2. 步骤 2:编写强制引用规则 - 完成标准:在系统提示中声明"所有基于外部来源的事实性声明必须附带引用",定义无引用时的回退行为(明确声明无法确认来源),禁止编造不存在的引用。
  3. 步骤 3:设计引用保留策略 - 完成标准:规定在改写、总结、翻译等二次处理场景中,原始引用标记的保留方式——直接保留原文标记、或重新映射到新上下文位置,确保引用链不中断。
  4. 步骤 4:实现外部信息标记 - 完成标准:定义"外部信息"(非系统知识库中的信息)的显式标记方式,如 NotebookLM 要求外部信息必须标注"此信息不在提供的来源中"。
  5. 步骤 5:添加引用完整性校验 - 完成标准:在系统提示中设置自检规则——输出前验证所有引用标记格式正确、所有事实性声明均有引用、引用中的索引和行号在有效范围内。

B — 边界 (Boundary) ★

不要在以下情况使用
  • 纯创作类输出(故事、诗歌、创意写作),不需要事实溯源
  • 常识性问答,信息属于公共知识无需标注来源
  • 实时对话场景中引用会严重打断交流节奏的轻量交互
  • 系统内部日志或调试信息,面向开发者而非终端用户
常见失败模式
  • 编造引用:模型生成格式正确但指向不存在位置的引用标记,需要格式校验与来源存在性双重约束
  • 引用堆积:为每个句子都添加引用导致输出碎片化、可读性下降,应仅对事实性声明引用
  • 引用丢失:在多轮对话的总结、改写中原始引用被清除,需要明确的保留规则
  • 格式混用:同一系统中出现多种引用格式(如脚注与内联标记并存),增加解析复杂度

© kangarooking, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in citation-system of kangarooking/system-prompt-skills.

Open the folder on GitHubat commit 252cd52

Compare with similar skills

Citation System next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Citation System compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Citation System this skillkangarooking/system-prompt-skills205—~655Automated safety check: PassMIT
Sciverseopendatalab/Sciverse-Agent-Tools119—~3kAutomated safety check: PassCustom licence
RAG Cite Sourceslyonzin/knowledge-rag290—~1.4kAutomated safety check: PassMIT
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k8 repos~2.3kAutomated safety check: PassMIT
RAG ArchitectJeffallan/claude-skills12k1 repos~2kAutomated safety check: PassMIT
Sciverse Academic Retrievalopendatalab/Sciverse-Agent-Tools119—~2.3kAutomated safety check: PassApache-2.0

Similar skills

  • Sciverse

    opendatalab/Sciverse-Agent-Tools

    A skill your agent uses when the user needs academic paper retrieval — searching scientific literature by author/year/journal, finding paper chunks for RAG-style citations, or expanding original…

    119 GitHub stars~3k tokensUpdated 18 days ago
    AI & LLM EngineeringAuto-check passed
  • RAG Cite Sources

    lyonzin/knowledge-rag

    Every technical claim drawn from the local corpus must ship with a source citation formatted as path:line or path:section.

    290 GitHub stars~1.4k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 8 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • RAG Architect

    Jeffallan/claude-skills

    Designs retrieval-augmented generation systems: document chunking, embeddings, vector store setup, hybrid search, reranking and retrieval evaluation, with checks at each step.

    12k GitHub starsUsed in 1 repo~2k tokens
    AI & LLM EngineeringAuto-check passed
  • Sciverse Academic Retrieval

    opendatalab/Sciverse-Agent-Tools

    Sciverse academic paper retrieval: structured metadata search, semantic chunk retrieval for RAG, and character-range content reading (offsets in Unicode code points).

    119 GitHub stars~2.3k tokensUpdated 18 days ago
    AI & LLM EngineeringAuto-check passed
  • Embedding Strategies

    wshobson/agents

    Helps choose and tune embedding models for semantic search and RAG: model comparison, chunking, preprocessing, normalization and caching.

    40k GitHub starsUsed in 11 repos~710 tokens
    AI & LLM EngineeringAuto-check passed

More from kangarooking/system-prompt-skills

All 15 skills in this repo
  • Persona Design

    kangarooking/system-prompt-skills

    当需要为 AI 产品定义核心身份、角色声明和能力边界时调用此 skill。典型场景包括:设计新 AI 产品的 system prompt 首段、为不同场景创建差异化角色(如教学助手 vs 编程代理)、重新定义 AI 与用户的关系框架。

    205 GitHub starsUsed in 1 repo~956 tokens
    Auto-check passed
  • Tool Specification

    kangarooking/system-prompt-skills

    当需要为 AI 定义工具接口、设计调用规范、实现工具发现与编排机制时调用此 skill。典型场景包括:设计 AI agent 的工具集、定义 JSON Schema/XML/TypeScript 格式的工具描述、实现工具权限控制与并行调度、设计子代理委托架构。

    205 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Memory System

    kangarooking/system-prompt-skills

    当需要为 AI 设计记忆存储、检索、应用和更新机制时调用此 skill。典型场景包括:设计持久化记忆架构(用户偏好、历史上下文、项目知识)、定义记忆的创建/读取/更新/删除生命周期、实现静默记忆应用(不在回复中透露记忆内容)、管理敏感记忆边界。

    205 GitHub stars~1.2k tokensUpdated 5 mo ago
    Auto-check passed
  • Personality System

    kangarooking/system-prompt-skills

    当需要在基础身份之上叠加可切换的人格风格层时调用此 skill。典型场景包括:为同一产品提供多种人格选项(如 GPT-5.1 的 friendly/professional/quirky 模式)、设计人格切换机制、防止人格泄露到用户内容中。

    205 GitHub stars~1k tokensUpdated 5 mo ago
    Auto-check passed
  • Conversation Flow

    kangarooking/system-prompt-skills

    当系统提示词需要定义 AI 如何分类用户意图、路由到不同处理流程、决定澄清策略和自主度级别时调用此 Skill。适用于多任务型 AI 助手、客服机器人、编程工具、研究助手等需要结构化对话管理的场景。不适用于:纯问答型系统(无任务执行)、单轮交互(无对话状态)、简单的 prompt 模板(无路由逻辑)。当需求仅涉及"输出什么格式"而非"如何决定输出什么"时,应该用…

    205 GitHub starsUsed in 1 repo~788 tokens
    Auto-check passed
  • Safety Guardrails

    kangarooking/system-prompt-skills

    当需要为 AI 系统设计多层安全防线、内容过滤策略和伦理边界时调用此 skill。典型场景包括:设计拒绝策略与升级机制、防御 prompt 注入攻击、实现领域特定安全规则(教育、医疗、金融等)、定义 AI 的价值观锚点。

    205 GitHub stars~1.2k tokensUpdated 5 mo ago
    Auto-check passed

Works with

Questions about Citation System

What does Citation System do?

当系统提示需要设计引用格式、信息溯源机制、来源标注系统时调用。适用于文档问答、搜索增强生成(RAG)、代码引用、浏览器辅助等需要让用户追溯信息来源的场景。不适用于纯创作类输出(如故事、诗歌),不适用于无需溯源的常识问答,也不适用于注入防御(虽然两者都涉及内容可信度)。. Citation System is an agent skill from kangarooking/system-prompt-skills.

When should I use Citation System?

Citation System fits situations like: tasks that involve Citation management; tasks that involve Retrieval-augmented generation.

How do I install Citation System in Claude Code?

Run `npx skills add kangarooking/system-prompt-skills --skill citation-system -a claude-code`. Or copy the skill folder (citation-system in kangarooking/system-prompt-skills) into .claude/skills/citation-system in your project. Claude Code loads it when a task matches its description.

How do I install Citation System in Codex?

Run `npx skills add kangarooking/system-prompt-skills --skill citation-system -a codex`. Or copy the skill folder (citation-system in kangarooking/system-prompt-skills) into .agents/skills/citation-system in your project. Codex loads it when a task matches its description.

Can I use Citation System in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kangarooking/system-prompt-skills --skill citation-system -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/citation-system, .gemini/skills/citation-system, .github/skills/citation-system and .opencode/skills/citation-system in your project.

What does Citation System need to run?

SKILL.md names no scripts, command-line tools or credentials: Citation System is instructions for the agent only.

Does Citation System access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Citation System safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Citation System use?

Citation System is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Citation System use?

About 655 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Citation System?

Skills that share tags, products or a category with Citation System: Sciverse (opendatalab/Sciverse-Agent-Tools, 119 stars), RAG Cite Sources (lyonzin/knowledge-rag, 290 stars), Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars) and RAG Architect (Jeffallan/claude-skills, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Citation System?

kangarooking (a GitHub user) maintains it in kangarooking/system-prompt-skills, which has 205 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on May 4, 2026.

Source: kangarooking/system-prompt-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.