跳到正文
Skillpedia
通用编程15k · #10959

correct

它能做什么

让智能体审阅反复出现的纠正,并从代码库本身修复其根本原因。适合那些一直在纠正同类 AI 错误的团队。

适用场景

  • ✓当 AI 生成的改动中反复出现同样的错误的时候。
  • ✓当你希望通过修改代码仓库本身来停止重复纠正的时候。
  • ✓当你要求智能体运行正确的流程的时候。

技能链接

https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/correct/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

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

可以这样问 AI

“请查看我们最近的回退和审阅评论,找出反复出现的 AI 错误,并让它们难以再次发生。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会把反复出现的错误归为几类,然后在最高的层级修复每一类:先修改架构,再修改类型,然后是带有有用提示信息的代码检查规则、测试,最后才是文档。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Correct

The operator keeps correcting agents in this repo for the same mistakes. Change the repo so the next agent can't make them.

Assume every contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Design the repo so a change that looks right from one file is right for the whole repo.

Find the mistake classes

First, read recent commits, reverts, review comments, agent instruction files, and comments that explain workarounds. Group the mistakes into classes. A class counts once it has happened twice.

Fix each class at the highest level that works

  1. Eliminate it with architecture. Give each piece of state one owner and each task one supported way. Hide internals so the wrong import fails. Replace hand-synced lists with one source of truth. Delete old ways and dead code an agent would copy.
  2. Enforce it with types so the bad state can't be written. If bad code still compiles, add a lint or CI check whose error names the file, type, or function to use instead. If the pattern is already common, fail only when a change adds more.
  3. Test the behavior. Fix or delete any test that still passes when the behavior it checks breaks, or that fails when only the internals change.
  4. Write docs or agent rules last, only for judgment calls. Nothing fails when an agent skips them.

Fix and prove

Then fix the most frequent classes now, one commit each. Prove each new check fails on a real past mistake. Run the same command locally and in CI. Exceptions go on the offending line with a reason, an expiry date, and a human's approval.

Keep the rule table

Last, keep a table in the agent instruction file that pairs each rule with what enforces it. When the operator corrects you, fix the mistake and add the rule. If the rule was already there and nothing enforces it, that's a repeat, so fix it at the highest level in the same change. Drop a rule once its mistake can't happen.

Reply: each class with its evidence, the level you picked, and why a higher level didn't work.

常见问题

为什么先修复架构?

能彻底消除错误的设计,比智能体可能跳过的检查或文档更有效。

什么时候一个错误才算一类?

当它发生过两次之后,该技能会将其视为值得修复的重复类别。

它会先写文档吗?

不会。文档放在最后,只用于判断性的问题,因为智能体跳过文档时不会有任何失败。

详情

作者的原始描述

Find the mistakes agents keep repeating in this repo and make each one impossible. Try architecture first, then types, then a lint whose error names the fix, then a test, and write docs last. Prove each check fails on a real past mistake. Repeat this each time the operator corrects you. Use for /correct.

repo: cursor/plugins

热度

GitHub 星标
15k
排名
#10959
许可证
—
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能