AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Citation System

skill-kangarooking-system-prompt-skills-citation-system · by kangarooking

|

No reviews yet
0 installs
37 views
0.0% view→install

Install

$ agentstack add skill-kangarooking-system-prompt-skills-citation-system

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-kangarooking-system-prompt-skills-citation-system)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Citation System? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

引用与归属系统设计

R — 原文 (Reading)

> 各厂商采用多样化的内联引用格式:Claude Web 使用 Markdown 锚点链接([text]()),GPT-4o 文件搜索采用 【msg_idx:search_idx†source】,NotebookLM 实现逐句引用加段落索引 [i],Warp 使用 XML 结构 `,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 结构 `` 元素,将引用与工具名隔离——引用指向文档本身而非工具调用过程,避免暴露内部实现。
  • 结论: 引用系统的设计应适配输出媒介特性,且引用目标应指向信息源而非系统内部过程。

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) ★

不要在以下情况使用

  • 纯创作类输出(故事、诗歌、创意写作),不需要事实溯源
  • 常识性问答,信息属于公共知识无需标注来源
  • 实时对话场景中引用会严重打断交流节奏的轻量交互
  • 系统内部日志或调试信息,面向开发者而非终端用户

常见失败模式

  • 编造引用:模型生成格式正确但指向不存在位置的引用标记,需要格式校验与来源存在性双重约束
  • 引用堆积:为每个句子都添加引用导致输出碎片化、可读性下降,应仅对事实性声明引用
  • 引用丢失:在多轮对话的总结、改写中原始引用被清除,需要明确的保留规则
  • 格式混用:同一系统中出现多种引用格式(如脚注与内联标记并存),增加解析复杂度

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.