正在加载陈远的个人网站

/doctor prompt-audit:为 Claude Code 提示词做全面体检的爆款提示词

Dan McAteer 分享一条 Claude Code 病毒式提示词,用于审计提示中的过期路径、废弃命令与冲突指令。

原始内容

Claude Coders: Run this prompt for Opus 5.5 *NOW*. '/doctor prompt-audit' Different from a viral post I had earlier this week because it prioritizes stale paths, obsolete commands, and conflicting instructions.

在 X 上查看原视频

中文译文

机器翻译,保留原文供核对。

Claude 编程者:为 Opus 5.5 *现在* 运行这条提示词。 '/doctor prompt-audit' 这与我本周早些时候发布的那篇爆火帖子不同,因为它优先处理过期路径、废弃命令和相互冲突的指令。

深度解析

是什么:一条围绕 Claude Code 的病毒式提示词推文。作者 Dan McAteer 建议立即运行 /doctor prompt-audit,声称它优先排查提示词中的过期路径、废弃命令与相互冲突的指令,与其此前另一条爆款有所区分。

核心洞察:Agent 的长期记忆(CLAUDE.md 等上下文文件)会随代码库演进而"腐烂"——路径迁移、命令更替、新旧规则并存,导致模型执行矛盾指令。推文借用 /doctor 这一自检隐喻,把模糊的 prompt 工程经验压缩成一条可复制的斜杠命令,这是其走红的根本:它把"提示词体检"仪式化、可执行化。

背景与意义:反映出 Agent 工程正从"写好提示词"转向"维护提示词全生命周期",上下文卫生(context hygiene)正在成为独立的工程实践;病毒式提示词本身也成为一种分发与获客模式。

边界与风险:效果未经第三方验证,"NOW""Opus 5.5"带有典型病毒式营销话术;在生产项目中运行此类审计提示后,输出结论仍需人工复核,避免误判或误删仍然有效的团队约定。

精选追评与案例

  1. 提供实际使用效果:清理无用技能和文件后降低上下文占用。

    @daniel_mac8 Tried it today and it works great. Cleaned up so many unused skills and files which are no longer required in the codebase which reduced context usage.

    中文译文 · 机器翻译

    今天试了,效果很好。清理了许多代码库中不再需要的未使用技能和文件,从而减少了上下文占用。

  2. 指出冲突指令的检测深度这一关键边界,追问是否定位到具体行。

    @daniel_mac8 'conflicting instructions' is doing something harder than stale paths. those are findable mechanically. curious whether it surfaces the specific lines that conflict or just flags the general section?

    中文译文 · 机器翻译

    “相互冲突的指令”比过期路径更难处理。后者可以通过机械方式发现。好奇它是会指出具体冲突的行,还是只标记出大致章节?

  3. 提出配置冲突时是否自动裁决的重要边界,贴近真实工程场景。

    @daniel_mac8 The AGENTS.md vs plugin conflict is the scary finding, since both look right on their own. Does it pick a winner or just flag it?

    中文译文 · 机器翻译

    AGENTS.md 与插件之间的冲突是可怕的发现,因为两者单独看都没问题。它会判定哪个优先,还是只把它们标记出来?

  4. 追问技能与 CLAUDE.md 规则冲突的覆盖范围,补充审计边界。

    @daniel_mac8 stale paths are the easy catch. does /doctor prompt-audit also flag a skill that shadows a CLAUDE.md rule, or is it mostly path and command drift?

    中文译文 · 机器翻译

    过期路径比较容易发现。/doctor prompt-audit 是否也会标记出覆盖 CLAUDE.md 规则的技能,还是主要只处理路径和命令漂移?

  5. 提供命令迁移的实际使用反馈,提示新旧命令差异。

    @daniel_mac8 Ran the /claude-api prompt-audit yesterday in my project. Understand we are now supposed to use the /doctor command instead.

    中文译文 · 机器翻译

    昨天我在项目中运行了 /claude-api prompt-audit。据我理解,现在应该改用 /doctor 命令。