‹ 首页

add-doctor-runbook

@michellemayes · 收录于 1 周前

Adds a new runbook to an existing doctor and registers it in the runbook index and mode config. Use when extending a doctor's audit coverage with a new check, without re-scaffolding the entire doctor.

适合你,如果需要在现有医生上增加新的审计检查项

/ 下载安装
add-doctor-runbook.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add michellemayes/meta-doctor/add-doctor-runbook
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- michellemayes/meta-doctor/add-doctor-runbook
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify michellemayes/meta-doctor/add-doctor-runbook
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
29GitHub stars
~1.2K上下文体积 · 单文件
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · 65dac64

Add Doctor Runbook

Extends an existing doctor (scaffolded by scaffold-doctor) with one new runbook — the internal markdown audit definition that drives a single health check in the doctor's agentic loop.


What you need before starting
  • The doctor's project root (where scaffold-doctor deposited its output).
  • A clear sense of what the new runbook should audit, what signals it reads, and what a violation looks like versus expected noise.

Flow
1. Locate the doctor's runbook directory and registration files

Inside the scaffolded doctor, runbooks live in skills/. The two registration files are:

| File | Purpose | |---|---| | skills/index.ts | Runbook index — imports every runbook and exports a bundledSkills record. | | config.ts | Mode config — assigns each runbook to runbooksDaily or runbooksWeekly. |

Read both files before writing anything. Confirm the existing runbook names and the mode lists so you can slot the new runbook in correctly.

2. Gather runbook requirements

Ask the user (or derive from context) three things:

  1. Purpose — what aspect of app health does this runbook audit? One or two sentences.
  2. Signals and tools — which data sources, queries, or MCP tools will the runbook call? (e.g., CloudWatch log groups, a Looker query, a DB table.)
  3. Healthy vs. violation — what does a clean run look like, and what specific conditions should trigger emit_finding?

Do not proceed to authoring until all three are clear. If any is ambiguous, ask a targeted question — a vague boundary between healthy and violation is the most common source of miscalibrated runbooks.

3. Author the runbook markdown

Create skills/<kebab-case-name>.md following the structure in [../scaffold-doctor/references/writing-runbooks.md](../scaffold-doctor/references/writing-runbooks.md).

Key requirements (enforced by the authoring checklist in that reference):

  • Pull live config first. Step 1 of the Inspect section always reads thresholds from the app's config store. No hardcoded numbers anywhere.
  • Parameterize every check. Time windows, count thresholds, feature-flag gates — all derived from the config you just read.
  • Healthy runs emit zero findings. If the runbook would fire on a normal day, the threshold or classify logic is wrong.
  • Separate violations from visibility. Informational observations (counts, rates, scorecards) go in the narrative; only actionable violations reach emit_finding.

For every emit_finding call, assign a stable signature using the format for the finding's category, per [../scaffold-doctor/references/finding-contract.md](../scaffold-doctor/references/finding-contract.md):

| Category | Signature format | |---|---| | Code bug with stack frame | {ExceptionClass}:{relativeFilePath}:{lineNumber} | | Code bug without stack frame | {ExceptionClass}:unknown:{md5_12chars_of_normalized_message} | | Audit finding | {runbook}:{category}:{bucketDate} (ISO week / date / month) |

Unstable signatures cause duplicate PRs and tickets. When in doubt, err toward broader bucketing — false dedups are cheaper than duplicate work items.

4. Register the runbook

Two edits required — both must be made before the doctor is redeployed.

skills/index.ts — import the new file and add it to bundledSkills:

import myRunbook from "./my-runbook.md";

export const bundledSkills: Record<RunbookName, string> = {
  // ... existing runbooks ...
  "my-runbook": myRunbook,
};

The key must exactly match the name field in the runbook's YAML frontmatter.

config.ts — assign the runbook to a mode:

runbooksDaily: [
  "existing-runbook",
  "my-runbook",        // add here for daily checks
],
runbooksWeekly: [
  "aws-cost-analysis", // or here for weekly checks
],

Choose the mode:

  • daily — checks that catch live regressions or fast-moving metrics (error rates, queue depth, send compliance, log anomalies).
  • weekly — checks where daily noise would exceed signal (cost trends, coverage drift, long-horizon metrics).

A runbook not in the index never runs. A runbook not assigned to a mode is imported but never scheduled.

5. Remind the user

Tell the user: the runbook is inert until the doctor is redeployed. Point them to the doctor's deploy instructions (typically sam deploy or the doctor's CI pipeline). The new runbook will not execute in the next scheduled audit cycle until the updated build is live.


Authoring checklist (condensed)

Full checklist is in [../scaffold-doctor/references/writing-runbooks.md](../scaffold-doctor/references/writing-runbooks.md).

  • [ ] Runbook file created at skills/<kebab-case-name>.md.
  • [ ] YAML frontmatter includes name (matches filename) and description.
  • [ ] Step 1 of Inspect reads live config — no hardcoded thresholds.
  • [ ] Every emit_finding call has a stable signature per the finding contract.
  • [ ] emit_finding is called only for actionable violations, not for PASS results or informational metrics.
  • [ ] Runbook imported and keyed in skills/index.ts.
  • [ ] Runbook added to runbooksDaily or runbooksWeekly in config.ts.
  • [ ] User reminded that a redeploy is required before the runbook runs.
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。