/pstack:no-comments
自动调用一句话审核前清理注释:只留许可证、公开 API 文档和外部规则的说明。
- 什么时候用
- 代码拿去审核之前。
/pstack:no-comments the diff用它和不用它
同一件事,直接跟 AI 说,和点名用 /pstack:no-comments,AI 的做法不一样:
用 /pstack:no-commentsdo not remove 的注释原样留着提议改成类型、测试或 lint 检查,你同意后再删注释文档写了什么
原文分 2 节,约 500 个英文单词,中文译文约 950 字,读完约 2 分钟。点一节直接跳到全文。
开头把注释交给一个新开的帮手 AI Comment Sicko 去查,听它的判断,主 AI 只执行审过的发现。
写法亮点
挑了几句原文:每句让 AI 做什么、为什么这样写管用、你写提示词时怎么借来用。
让规则只写在一处
Do not restate its rules.
不要复述它的规则。
- 让 AI
- 主 AI 派活时只交代范围,不重复 Comment Sicko 的规则,两边的说法就不会打架。
- 为什么管用
- 规则只写在一个地方,以后改一处就够了,不会出现两个互相矛盾的版本。
- 借来用
- 交代任务时写:「格式要求见附件里的模板,这里不再重复。」
把举证责任放在「留」这边
A keep survives only with proof it is about something we cannot change.
一条保留,只有证明它说的是我们改不了的东西,才能留下。
- 让 AI
- 注释默认会被删掉,只有能证明它说的是改不了的外部事实,才会留下。
- 为什么管用
- 规定「要留就得拿出证据」,默认就偏向删除,AI 不会因为拿不准就全部留着。
- 借来用
- 清理文件时说:「旧文件默认归档,只有能说出下周还要用的理由,才留在桌面。」
预先定好拿不准时往哪倒
If a kill is ambiguous, do not restore.
如果一条删除说不清对错,就不恢复。
- 让 AI
- 遇到说不清该不该删的注释,它不会停下来纠结,而是照规定的方向处理。
- 为什么管用
- 提前定好平局怎么判,AI 就不用每次停下来问,前后的判断也会一致。
- 借来用
- 让 AI 分类反馈时写:「分不清是投诉还是建议的,一律按投诉处理。」
用两个短句切开分工
Architect shapes. Step 4 implements.
Architect 负责设计结构。第 4 步负责实现。
- 让 AI
- 设计结构的那一步只出草图,真正动手改代码留到下一步。
- 为什么管用
- 两个只有几个词的短句把谁做什么切得干干净净,AI 不会在设计时顺手把代码也改了。
- 借来用
- 让 AI 写长文时说:「第一步只列提纲。第二步再写正文。」
全文
AI 读到的就是这份 SKILL.md。可以看中文、看原文,或者一段一段对照着看。
descriptionSpawn Comment Sicko, fix accepted findings, and offer encodings for claimed constraints.
description派出 Comment Sicko,修好被采纳的发现;对注释里声称要遵守的限制,提出把它写进代码来保证的办法。
No comments
No comments(不要注释)
Spawn Comment Sicko. Act on accepted findings.
派出 Comment Sicko。按被采纳的发现去做。
Defer to Comment Sicko's fresh perspective.
以 Comment Sicko 不带成见的眼光为准。
Scope
范围
Use the caller's files or diff. Otherwise use the current diff against the base branch, default main, including the working tree.
用调用者给的文件或 diff。否则用当前分支相对基础分支的 diff,基础分支默认是 main,包括工作区里还没提交的改动。
Steps
步骤
- Spawn
Taskwithsubagent_type: "comment-sicko". Pass the scope. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the poteto-mode skill. Do not restate its rules. If your harness doesn't have comment-sicko registered as a subagent (any harness other than Cursor with the pstack plugin), spawn a general subagent instead:Agentin Claude Code (subagent_type: general-purpose),taskin OpenCode (subagent_type: general),spawn_agentin Codex. Its prompt isreferences/comment-sicko.mdverbatim, then the scope. If your harness has no subagent tool, as in Pi without an extension, run that prompt yourself in a fresh pass over the scope. - Inspect its report and diff. Reject application-code edits, scope escapes, exception-protected deletions, misstated
MUST KILLreasons, and flags that treat kept intentional code as guilty. Reshape flags on our-code surprises stay actionable. Do not restore those comments. A keep survives only with proof it is about something we cannot change. Audit missed scoped lint and TypeScript suppressions. Correctness or safety suppressions stay actionableMUST KILLs. Restore deletions only with exact exceptions and scoped proof. Before accepting thinIMPORTANTordo not removekills or keeps, run/pstack:howor/pstack:whyon their symbol. If a kill is ambiguous, do not restore. If a keep is refuted or still ambiguous, delete it, except aREVIEWkeep about an outside rule, which stays until someone checks that rule. Report it open. Revert and rerun one rejected report with the failure named. If you reject the rerun too, revert only its rejected findings, report them open, and go on with the accepted ones. - Fix trivial accepted flags directly by deleting a dead path, dropping a parameter, or using the real API. If any fix needs a shape, run
/pstack:architectonce for the accepted set and surrounding code. Stop at the sketch. Architect shapes. Step 4 implements. - Implement the smallest root-cause fix in scope. Remove every named workaround. If the root cause is out of scope, land the smallest in-scope fix and report the rest open. The principle-fix-root-causes and principle-redesign-from-first-principles skills guide intent only. Neither authorizes widening the fence nor fixing instances outside it. Never bolt on symptom guards.
- Constraint comments say
do not remove,do not change wording, ortalk to X before changing. Leave keeps about things we cannot change. Offer the cheapest in-scope type, runtime, test, or CI lint. Wait for interactive approval. Unattended and eval require caller pre-approval. If approved, encode then delete. Otherwise delete, report the constraint open, and sketch out-of-scope work. - Report the deletion count, restored comments,
REVIEWkeeps, reruns, architect sketch, fixes, encoding offers, encodings, unenforced constraints, and other open work.
- 用
Task派出帮手 AI,subagent_type: "comment-sicko"。把范围传过去。每个帮手 AI 的推理强度,以及用快速还是标准速度,按 poteto-mode 技能里 Subagents 那一节,根据任务来选。不要复述它的规则。如果你所用的工具没有把 comment-sicko 注册成帮手 AI(除了装了 pstack 插件的 Cursor,其他工具都是这样),就改派一个通用帮手 AI:Claude Code 里是Agent(subagent_type: general-purpose),OpenCode 里是task(subagent_type: general),Codex 里是spawn_agent。它的提示词是原样的references/comment-sicko.md,后面接上范围。如果你所用的工具没有派帮手 AI 的功能,比如没装扩展的 Pi,就自己在一轮全新的检查里,对范围跑一遍那个提示词。 - 检查它的报告和 diff。驳回这些:改了应用代码的、超出范围的、删掉受例外保护的注释的、把
MUST KILL的理由说错的,以及把有意保留的代码当成罪证的标记。针对我们自己代码里出人意料之处的「改结构」标记,仍然要处理。不要把那些注释恢复回来。一条保留,只有证明它说的是我们改不了的东西,才能留下。检查有没有漏掉范围内的 lint 和 TypeScript 抑制注释。关于正确性或安全的抑制注释,仍然是要处理的MUST KILL。只有在有确切的例外和限定范围的证据时,才恢复被删的注释。在接受理由单薄的IMPORTANT或do not remove的删除或保留之前,先对它们所在的符号运行/pstack:how或/pstack:why。如果一条删除说不清对错,就不恢复。如果一条保留被驳倒了,或者仍然说不清,就删掉它,但有一个例外:关于外部规则的REVIEW保留,要一直留着,直到有人核对过那条规则。把它报告为未解决。对一份被驳回的报告,撤回它的改动,点明失败之处,重跑一次。如果重跑的结果你也驳回,就只撤回其中被驳回的发现,把它们报告为未解决,然后继续处理被接受的那些。 - 被采纳的小标记,直接修:删掉一条死路径、去掉一个参数,或者改用真正的 API。如果有任何修复需要先设计结构,就为被采纳的这一批和周围的代码运行一次
/pstack:architect。停在草图那一步。Architect 负责设计结构。第 4 步负责实现。 - 在范围内做最小的、针对真正原因的修复。去掉每一个被点名的临时绕过办法。如果真正的原因在范围之外,就在范围内做最小的修复,把其余的报告为未解决。principle-fix-root-causes 和 principle-redesign-from-first-principles 两个技能只用来指导意图。它们都不允许扩大范围,也不允许修范围之外的同类问题。绝不加只治症状的防护代码。
- 限制类注释写的是
do not remove、do not change wording或talk to X before changing。关于我们改不了的东西的保留,不要动。提出范围内最省事的办法:类型、运行时检查、测试或 CI lint。等交互中的批准。无人值守和评测运行,需要调用者事先批准。批准了,就先编码,再删注释。没批准,就删注释,把这条限制报告为未解决,并为范围外的工作画个草图。 - 报告:删除的数量、恢复的注释、
REVIEW保留、重跑、architect 草图、修复、编码提议、已做的编码、没有强制执行的限制,以及其他未解决的工作。
原文作者 Lauren Tan(poteto),MIT 许可。译文由本站翻译,核对到 pstack 镜像 97de40d。 在 GitHub 上看