跳到正文
Skillpedia
测试6.2k · #14389

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/agentscope-ai/agentscope-java/blob/main/agentscope-examples/agents/agentscope-codingagent/src/main/resources/workspace-templates/skills/verify-changes/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Detect the project's check commands from its config files:
    • Node/TS: package.json scripts (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>.
  2. Run ONLY the checks and tests directly related to the files you changed. Never run the full test suite.
  3. Disable color output so logs are readable: NO_COLOR=1, --no-color, or --no-colors.
  4. Read the output as ground truth. If it reports errors, they are real — do not claim success.
  5. Fix the root cause, then re-run the SAME command. Repeat until it passes.

Rules

  • Only mark a todo completed once 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.

repo: agentscope-ai/agentscope-java

热度

GitHub 星标
6.2k
排名
#14389
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能