After finishing a coding task, write a structured summary of what you changed and have ClaimDiff check it against the real git diff, so the user can click each claimed feature to see its code and is warned where the summary and the code disagree. Use it whenever you have edited files and are about to report the result. 改完代码、准备向用户汇报时使用。
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of claimdiff?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/zhiyuanvision-lang-claimdiff)
---
name: claimdiff
description: After finishing a coding task, write a structured summary of what you changed and have ClaimDiff check it against the real git diff, so the user can click each claimed feature to see its code and is warned where the summary and the code disagree. Use it whenever you have edited files and are about to report the result. 改完代码、准备向用户汇报时使用。
---
# ClaimDiff
ClaimDiff checks what you say you did against what the diff shows. The user reads your summary as a clickable guide: each feature opens the hunks that back it. A feature with no code behind it, or code that no feature mentions, is shown as a warning.
Do these four steps when the task is finished.
## 1. Write the summary to `.claimdiff/summary.md`
Write in the language the user is using. Use exactly this structure:
```markdown
## 功能点 1:登录接口限流
按用户 ID 做滑动窗口计数,超限返回 429。
涉及改动:
- src/middleware/rateLimit.ts:新增 `slidingWindow`、`rateLimit`
- src/routes/auth.ts:在 `/login` 上注册中间件
## 未归入功能点的改动
- package.json:新增依赖 `ioredis`
```
In English the headings are `## Feature 1: <title>`, `Changes:` and `## Other changes`.
Rules:
- One section per thing the user would recognise as a separate change. Number them from 1.
- Under `涉及改动:` / `Changes:` list every file the feature touched, one per line, as a path relative to the repository root. After the colon, name the functions, classes, routes or keys you added or changed, each in backticks, spelled exactly as in the code.
- Put changes that belong to no feature (dependencies, config, formatting, a fix you made in passing) under `## 未归入功能点的改动` / `## Other changes`. List them even when they seem trivial: anything you changed and did not list is shown to the user as an unexplained change.
- Only list what you actually changed. Do not list a file you only read, and do not describe work you planned but did not do.
- Lock files and generated files need not be listed.
## 2. Call `claimdiff_check`
(If the `claimdiff_*` MCP tools are not connected in this session yet, tell the user `.claimdiff/summary.md` is ready and they can attach the local verification server once with `npx -y claimdiff-mcp@latest install --claude` or open the clickable guide immediately with `npx -y claimdiff-mcp@latest open`, then stop here.)
With no arguments it compares the uncommitted working tree with the latest commit. If you committed your work, pass the commit before your first change as `base` and your last commit as `head`.
Read the result:
- `claimedButNoCode`: a feature for which no change was found. Either you did not make the change, or the paths and names in the summary are wrong. Fix the code or fix the summary, whichever is wrong, and call `claimdiff_check` again. Never reword the summary just to make a warning go away.
- `claimedPathsNotInDiff`: paths you listed that were not changed. Correct them.
- `inListedFileButNotNamed`: hunks in a file you listed that contain none of the names you gave for that file. The user sees them marked "file listed, not named". If they are part of the feature, add the function or key they change to that line of the summary; if they are a separate change, list them under the last section. Then call `claimdiff_check` again.
- `unclassified`: hunks no feature accounts for.
## 3. Classify the leftover hunks
If `unclassified` is not empty, decide for each hunk which section it belongs to, and call `claimdiff_classify` with `{hunk, section}` pairs. Assign a hunk only when it really is part of that feature. Leave out hunks that belong to none; if they are your changes, add them to the summary's last section instead and run `claimdiff_check` again.
## 4. Call `claimdiff_open` and tell the user
Open the panel, then tell the user in one or two sentences that the guide is open and how many warnings it has. Say plainly what each remaining warning is about. A match only means the related code was changed, not that it is correct; do not present it as proof that the work is right.