After finishing a coding task, write a structured feature-by-feature summary to .claimdiff/summary.md and cross-check every claimed feature and modified hunk against the real git diff, warning the user whenever a summary point lacks backing code or a diff hunk is unexplained. Use 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-claimdiff)
---
name: claimdiff
description: After finishing a coding task, write a structured feature-by-feature summary to .claimdiff/summary.md and cross-check every claimed feature and modified hunk against the real git diff, warning the user whenever a summary point lacks backing code or a diff hunk is unexplained. Use whenever you have edited files and are about to report the result. 改完代码、准备向用户汇报时使用。
---
# ClaimDiff — Structured Code Review & Git Diff Verification
ClaimDiff turns scattered multi-file edits into a structured, verifiable change guide in `.claimdiff/summary.md`, cross-checked hunk-by-hunk against `git diff` so unimplemented claims and silent edits are surfaced before review.
Follow these four steps whenever a coding task is finished:
## 1. Write the structured summary to `.claimdiff/summary.md`
Write in the language the user is using, following this exact 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 numbered section per user-recognizable feature or fix, starting from 1.
- Under `涉及改动:` / `Changes:`, list every modified file as a repository-relative path (one per line). After the colon, list the exact added or modified functions, classes, routes, or config keys in backticks.
- Put supporting edits (dependencies, config, formatting, incidental fixes) under `## 未归入功能点的改动` / `## Other changes`.
- List only files and symbols actually changed; omit lock files and generated build outputs.
## 2. Cross-check `.claimdiff/summary.md` against `git diff`
Inspect the real `git diff` (or `git diff <base>..<head>` if already committed) and verify all four invariants:
- **No unbacked claims (`claimedButNoCode`)**: Every feature section maps to real modified hunks.
- **No stale paths (`claimedPathsNotInDiff`)**: Every listed file path actually appears in the diff.
- **No unnamed symbol changes (`inListedFileButNotNamed`)**: Every modified hunk in a listed file matches at least one backticked identifier on that file's line (or move unrelated hunks to `Other changes`).
- **No silent edits (`unclassified`)**: Every non-generated diff hunk is accounted for by a numbered feature or `Other changes`.
## 3. Fix mismatches truthfully
If any discrepancy appears, fix the code or update `.claimdiff/summary.md` so the summary and the real diff agree — never invent or hide changes.
## 4. Report the verified summary
Present `.claimdiff/summary.md` clearly and state how many files/hunks were verified and any remaining caveats. A match means the related code changed, not that it is bug-free or secure. Documentation: https://zhiyuanv.com/claimdiff.html