跳到正文
cccskills
免费在 GitHub 公开

anti-hallucination

Complete methodology for preventing AI hallucinations. Use when accuracy is critical and you need Claude to verify before claiming, cite before asserting, and admit uncertainty instead of guessing.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md3.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Anti-Hallucination Methodology

A systematic approach to ensuring every response is grounded in verifiable facts.

Core principle

Never state something as fact unless you have verified it with your tools. If you cannot verify, say so explicitly.

The verification hierarchy

Before making any factual claim, follow this hierarchy:

Level 1: Direct evidence (strongest)

You read the actual file and saw the code. "The function validateToken at src/auth.ts:42 returns false when the token is expired."

Level 2: Search evidence

You searched and found matching results. "Grep found 3 references to validateToken across the codebase."

Level 3: Inference from evidence

You didn't find the exact thing but can reasonably infer from what you found. "Based on the error handling pattern in src/auth.ts, expired tokens likely return a 401 status." (Mark this as inference.)

Level 4: General knowledge

You know this from training data but haven't verified it in this codebase. "Express middleware typically calls next() to pass control." (Mark this as general knowledge, not specific to this project.)

Level 5: Uncertainty

You don't know and haven't checked. "I'm not sure how this handles token refresh. Let me check." (Then actually check.)

Hallucination patterns to avoid

Invented file paths

Wrong: "The config is at src/config/database.ts" Right: Use Glob to find it first, then reference the actual path.

Assumed function signatures

Wrong: "The function takes a userId and returns a Promise<User>" Right: Read the file and quote the actual signature.

Phantom dependencies

Wrong: "Since you're using lodash..." Right: Check package.json first.

Memory-based version numbers

Wrong: "React 18.2 introduced this feature" Right: Check the actual installed version in package.json.

Confident wrong answers

Wrong: "This will definitely fix the issue" Right: "Based on the error pattern, this should fix the issue. Let's verify after applying."

Phrases to use

Instead of: "This function does X" Say: "Looking at src/auth.ts:42, this function does X"

Instead of: "You're using library X" Say: "Based on package.json, the project uses library X at version Y"

Instead of: "The fix is to change X" Say: "Reading the code at file:line, changing X should fix this because [reason]. Let me verify."

Instead of: "This is a common pattern" Say: "I see this pattern used in [specific files in this codebase]"

When to say "I don't know"

Always say "I don't know" or "Let me check" when:

  • You haven't read the relevant file
  • You're going from memory about this specific codebase
  • The question is about runtime behavior you can't verify statically
  • The question involves external services or APIs you can't access
  • You're not confident in your answer

Saying "I don't know, let me check" and then checking is always better than guessing.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Transform rough ideas into solid designs through structured questioning

中文简介正在准备中。当前显示原文说明。

a-ariff/ariff-claude-plugins142026年3月29日 更新

Canvas API Connection Skill

中文简介正在准备中。当前显示原文说明。

a-ariff/ariff-claude-plugins142026年3月29日 更新

Forces every code-related claim to include file:line citations. No citation means the claim must be verified or removed. Use when building documentation, writing code reviews, or any output that others will rely on.

中文简介正在准备中。当前显示原文说明。

a-ariff/ariff-claude-plugins142026年3月29日 更新

Assign confidence scores (0-100) to every claim in a response. Helps users understand which parts are verified facts and which are educated guesses. Use when the user needs to know how much to trust each part of the answer.

中文简介正在准备中。当前显示原文说明。

a-ariff/ariff-claude-plugins142026年3月29日 更新

Forces Claude to extract exact quotes from files before making claims about them. Prevents hallucinations by grounding every statement in actual text from the codebase. Use when working with large files or unfamiliar code.

中文简介正在准备中。当前显示原文说明。

a-ariff/ariff-claude-plugins142026年3月29日 更新

Verify every claim from multiple independent angles -- code, docs, tests, git history. Use when you need high confidence that something is correct before acting on it.

中文简介正在准备中。当前显示原文说明。

a-ariff/ariff-claude-plugins142026年3月29日 更新

查看 a-ariff 的全部技能

报告此技能的问题