verify-changes
它能做什么
这项技能在代码改动之后运行合适的检查,并持续修复直到全部通过。适合希望智能体在报告成功之前确认自己的编辑确实可用的开发者。
适用场景
- ✓当你的智能体刚刚编辑了一个源文件,需要确认它能正常工作时。
- ✓当你想在打开拉取请求之前运行构建、lint 或测试时。
- ✓当某项检查失败,你希望智能体找出原因、修复并重新运行的时候。
技能链接
https://github.com/agentscope-ai/agentscope-java/blob/main/agentscope-examples/agents/agentscope-codingagent/src/main/resources/workspace-templates/skills/verify-changes/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请编辑登录处理程序,然后运行构建、lint 和登录测试,确保一切通过后再告诉我已经完成。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能会找到与项目相匹配的检查命令,例如构建、lint 或单个测试文件,并针对改动过的文件运行。它以输出为准,修复任何错误的原因,然后再次运行同一命令。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Verify Changes
Editing a file is only half a step. Always close the loop by verifying before you mark work done or open a PR. This is the manual equivalent of an IDE/LSP diagnostics loop.
Procedure
- Detect the project's check commands from its config files:
- Node/TS:
package.jsonscripts (build,lint,typecheck),tsconfig.json->npx tsc --noEmit,npx eslint <changed files>. - Python:
ruff check <path>,mypy <path>,pytest <specific test file>. - Java/Maven:
mvn -q -pl <module> compile, then the single relevant test class via-Dtest=<ClassName>. - Gradle:
./gradlew :<module>:compileJava/:<module>:test --tests <ClassName>.
- Node/TS:
- Run ONLY the checks and tests directly related to the files you changed. Never run the full test suite.
- Disable color output so logs are readable:
NO_COLOR=1,--no-color, or--no-colors. - Read the output as ground truth. If it reports errors, they are real — do not claim success.
- Fix the root cause, then re-run the SAME command. Repeat until it passes.
Rules
- Only mark a todo
completedonce its verification command passes. - If you cannot find a check command, at minimum compile/parse the changed files.
- Do not disable or delete failing tests to make checks pass.
常见问题
它会运行整个测试套件吗?
不会。技能只运行与改动文件直接相关的检查和测试。
它能通过禁用失败的测试来让结果通过吗?
不能。技能规定不得禁用或删除失败的测试。
如果没有检查命令怎么办?
至少,技能会编译或解析改动过的文件。
详情
作者的原始描述
Verify code changes by running the project's typecheck, build, lint, and targeted tests, then fix and re-run until clean. Use after editing any source file.
热度
- GitHub 星标
- 6.2k
- 排名
- #14389
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agentscope-java
6.2k帮你的智能体用 Java 编写非阻塞的 AgentScope 代码,AgentScope 是基于 Project Reactor 的多智能体框架。
data-report
6.2k帮你的智能体把数据集汇总成报告,包括平均值、总数、范围和趋势,并保存为 Markdown 文件。
data-transform
6.2k帮你的智能体在 CSV 和 JSON 等格式之间转换数据文件,使数据可以在其他工具中使用。
git-changelog
6.2k帮你的智能体根据 Git 历史编写变更日志或发布说明,并按新功能、修复和其他改动分组。