↑ ↓ 移动 · Enter 打开 · Esc 关闭点按一个结果

架构
skill · observer 类 · sonnet

arch-doctor

诊断这台机器上的设置:hook、边界规则、构建 wrapper、java、项目来自哪个 .claude/,以及 compose 栈是否在运行。

skill · observersonneteffort high不写任何文件随生成的项目导出
§ skill 的定义

arch-doctor,逐节说明

skill 自己的 SKILL.md 的各个章节,节选。悬停或点击一个章节,查看它引用的项目规则、模板和 references/ 文件。章节也是标签:点击即可跳转。

nerviz/.claude/skills/arch-doctor/SKILL.md

## Diagnosis

!java "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/ArchHook.java" doctor 2>&1

## AI files

!find "${CLAUDE_PROJECT_DIR:-.}/.claude" -maxdepth 2 -type f | sort

Interpret the result above and tell the user, in two or three sentences, whether the setup is operational. If something is marked with ❌, give the concrete command that fixes it — don't describe the problem in general terms.

The Provenance line is the one exception to "give the command": when it lists files edited locally, say which ones and that an update would overwrite them. Don't offer to run the update — losing a hand-edited norm is the user's call, not a fix to apply.

Don't fix anything without the user asking.

## Why this is a manually-invoked skill

Form 2: the whole body is two shell injections plus how to read them, so it is a procedure (axis 5) fired by a person who wants a verdict (axis 2 — /arch-doctor). Form 1 was rejected because a diagnostic the model reaches on its own runs a JVM and a find on every session that mentions a hook; Form 3 was rejected because there is nothing to isolate — the output is the report, and it is what the user asked to see.

Runs on sonnet with effort: high: the report is computed, but naming the cause and the command that fixes it is judgment (@.claude/decisions/0080-procedural-skills-on-sonnet.md).

The name is not doctor: /doctor is a native command, and a skill folder with that name shadows it silently — @CLAUDE.md § Known pitfalls.

在 GitHub 上打开完整文件 →
§ 行为

它读什么、写什么、拒绝什么

skill 自己的契约,取自 SKILL.md,保留原文。

Class

observer — the territory is skill_classes.observer in @.claude/schemas/extensions.json, and it is empty: this skill writes no file. It reports, and the fix is the user's call. ArchHook.java guard enforces it.

Reads

the output of ArchHook.java doctor (which folds in compose) and the listing of .claude/, both injected above. Nothing else: an injection that lied about the setup would be worse than no report.

Writes

nothing, ever. Leaves no audit report either — its class, observer in skill_classes of @.claude/schemas/extensions.json, declares audited: false, because an observer that records its own observation makes the trail mostly about reading it.

来源:SKILL.md § Contract(nerviz e4cae27)。

§ guard 与 hook

guard 如何处理它

observer 是这个 skill 的类别,左侧的列表就是它的领地。skill 在自己的提示上运行时阶段打开,ArchHook 对照这份列表判断每一次写入。右侧的文字是 hook 自己输出的。

arch-doctor 的 write_allow

  • 任何文件:领地为空

拒绝以退出码 2 结束,消息回到模型。

> /arch-doctor …
UserPromptSubmit
  guard prompt                     exit 0
# phase opened: arch-doctor (class observer)
# write_allow: [] — this class writes no file
§ 如何被调用

由谁调用

它不是某条链上的步骤。它由自己的提示 /arch-doctor 启动,guard 像对待其他 skill 一样对待它:阶段打开,其类别的领地生效。

← 返回链路