测试8.2k · #12543
verify-changes
它能做什么
这项技能让你的 AI 在宣称修改有效之前,先运行这些修改进行测试。适合希望获得新代码或改动后代码确实可用的真实证据的人。
适用场景
- ✓当你的 AI 刚刚编写或修改了代码,而你想确认它真的有效的时候。
- ✓当你需要确认一个错误修复真的能阻止该错误的时候。
- ✓当构建或配置改动必须通过实际运行来检查的时候。
技能链接
https://github.com/vudovn/ag-kit/blob/main/.agents/skills/verify-changes/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/vudovn/ag-kit/blob/main/.agents/skills/verify-changes/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add vudovn/ag-kit --skill verify-changes
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/vudovn/ag-kit/main/.agents/skills/verify-changes/SKILL.md -o SKILL.md
可以这样问 AI
“请做这项修改,然后运行它并把输出给我看,让我知道它真的能用。”
每周 5 个新技能,1 分钟读完。
工作原理
技能会根据改动的类型选择验证方法,例如复现错误或运行构建。AI 运行验证,并报告证据。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Verify Changes — Prove Code Works
"Code that exists" ≠ "Code that works." This skill ensures changes are verified through execution.
Core Principle
❌ Verification by inspection: "I can see the function exists, it should work"
❌ Verification by assumption: "The types check out, so it's correct"
✅ Verification by execution: "I ran it, here's the output, it works because [evidence]"
Verification Protocol
Step 1: Identify What Changed
- Which files were modified?
- What behavior should be different now?
- What was the original bug/requirement?
Step 2: Determine Verification Method
| Change Type | Verification Method |
|---|---|
| Bug fix | Reproduce the original bug scenario → confirm it no longer occurs |
| New feature | Run the feature → confirm expected output |
| Refactor | Run existing tests → confirm nothing broke |
| API change | Call the endpoint → confirm response shape |
| UI change | Render the component → confirm visual output |
| Config change | Load the config → confirm values applied |
| Build/infra | Run build command → confirm success |
Step 3: Execute Verification
# For Node.js projects
npm run build # Does it compile?
npm run test # Do tests pass?
npm run dev # Does it start?
# For specific files
node -e "require('./path/to/module'); console.log('✅ Loads correctly')"
# For API endpoints
curl http://localhost:3000/api/endpoint
# For scripts
python script.py --test
Step 4: Report Evidence
## Verification Report
### What was changed
- [File list and summary]
### How it was verified
- [Exact commands run]
### Evidence
- Build: ✅ Compiled without errors
- Tests: ✅ 42/42 passing
- Runtime: ✅ Server starts, endpoint returns expected JSON
- Edge case: ✅ Empty input handled correctly
### Not yet verified
- [Anything that couldn't be tested automatically]
Verification Checklist by Project Type
Web Application
-
npm run build— compiles without errors -
npm run lint— no linting errors -
npm run test— all tests pass - Dev server starts successfully
- Changed pages render correctly
- No console errors in browser
API / Backend
- Server starts without errors
- Changed endpoints respond correctly
- Error cases return appropriate status codes
- Database queries execute successfully
CLI / Script
- Script runs without errors
- Expected output matches actual output
- Error handling works (bad input test)
- Help/usage text is correct
Anti-Patterns
| Anti-Pattern | Why It's Bad | Fix |
|---|---|---|
| "It should work" | No evidence | Run it and show output |
| Only checking happy path | Bugs hide in edge cases | Test error paths too |
| Verifying only compilation | Compiles ≠ correct | Test runtime behavior |
| Skipping verification for "trivial" changes | Trivial changes cause real bugs | Verify everything |
Integration with Other Skills
| After Using | Verify With |
|---|---|
frontend-design → UI changes |
Render in browser, check console |
backend-specialist → API changes |
curl endpoints, check responses |
database-design → Schema changes |
Run migrations, query data |
testing-patterns → New tests |
Run test suite, check coverage |
常见问题
通过执行来验证是什么意思?
意思是运行代码并报告实际发生的情况,而不只是阅读代码并假设它有效。
它如何检查重构?
它会运行现有测试,确认没有破坏任何功能。
它适用于用户界面的修改吗?
适用。技能建议渲染组件,以确认视觉输出。
详情
作者的原始描述
Prove code works by running it, not just checking it exists. Verification through execution rather than inspection. Use after writing or modifying code to ensure it actually functions correctly.
repo: vudovn/ag-kit
热度
- GitHub 星标
- 8.2k
- 排名
- #12543
- 许可证
- MIT
- 更新时间
- 2026/10/18
评论
- …