skill-doctor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseskill-doctor
skill-doctor
Grade the user's agent setup by scoring recent local agent conversations, then propose concrete skill edits and render one shareable report page.
The report is scoped to one repo: the skills that live in it and the conversations that ran inside it. Run from the repo the user wants graded.
Everything runs locally. Never upload transcripts, session files, or any excerpt of them anywhere. The only shareable artifact is the report the user chooses to post.
Let be the directory containing this SKILL.md.
SKILL_ROOTNever write artifacts into the user's repo. Create one fresh, collision-free scratch directory per run and use it as for every artifact:
REPORT_DIRbash
REPORT_DIR="$(mktemp -d "${TMPDIR:-/tmp}/skill-doctor-XXXXXXXX")"通过对近期本地Agent对话进行评分来评估用户的Agent配置,随后提出具体的技能修改方案并生成一个可分享的报告页面。
本报告针对单个仓库:仓库中包含的技能以及在仓库内进行的对话。请在用户想要评估的仓库中运行此工具。
所有操作均在本地运行。切勿将对话记录、会话文件或任何片段上传至任何地方。唯一可分享的成果是用户选择发布的报告。
令为包含此SKILL.md文件的目录。
SKILL_ROOT切勿向用户的仓库中写入任何成果。每次运行时创建一个全新的、无冲突的临时目录,并将其用作来存储所有成果:
REPORT_DIRbash
REPORT_DIR="$(mktemp -d "${TMPDIR:-/tmp}/skill-doctor-XXXXXXXX")"Step 1: Collect
步骤1:收集
bash
python3 "$SKILL_ROOT/scripts/collect_sessions.py" --out "$REPORT_DIR"This scopes to the git repo containing the current directory: skills are discovered from the repo's , , and , and only sessions whose working directory is inside the repo are scored. By default scans every available local source: Claude Code project-history JSONL, Codex rollout JSONL, and Warp's read-only conversation stores. Duplicate Warp conversations across installed channels are deduplicated by conversation ID.
.agents/skills.claude/skills.codex/skills--harness autowarp.sqliteUseful flags:
- — which local session sources to scan.
--harness claude|codex|warp|all|auto - — target a different repo.
--repo PATH - — also grade global skills.
--include-global-skills - — lookback window (default 45).
--days N - — cap on sampled sessions (default 12).
--max-sessions N - — nonstandard skill locations.
--skills-dir PATH - — include Claude Code sidechains, Codex subagents, and Warp child agents.
--include-subagents - — when
--claude-home PATHisn't the Claude Code config directory.~/.claude - — when
--codex-home PATHisn't the Codex home.~/.codex - — an explicit Warp database (repeatable).
--warp-db PATH - — a nonstandard Warp channel-data directory.
--warp-data-dir PATH
Read . If is 0, tell the user there's nothing recent to score in this repo (suggest raising or checking ) and stop. If is 0, continue — the report becomes a case for creating skills, and is 0.
$REPORT_DIR/inventory.jsonsessions_sampled--days--reposkills_foundskill_coveragebash
python3 "$SKILL_ROOT/scripts/collect_sessions.py" --out "$REPORT_DIR"此命令会限定在包含当前目录的git仓库范围内:从仓库的, , 和 中发现技能,仅对工作目录位于该仓库内的会话进行评分。默认情况下,会扫描所有可用的本地来源:Claude Code项目历史JSONL、Codex部署JSONL以及Warp的只读对话存储。已安装渠道中的重复Warp对话会通过对话ID进行去重。
.agents/skills.claude/skills.codex/skills--harness autowarp.sqlite实用参数:
- —— 要扫描的本地会话来源。
--harness claude|codex|warp|all|auto - —— 指定目标仓库路径。
--repo PATH - —— 同时评估全局技能。
--include-global-skills - —— 回溯窗口(默认45天)。
--days N - —— 采样会话的上限(默认12个)。
--max-sessions N - —— 指定非标准技能位置。
--skills-dir PATH - —— 包含Claude Code侧链、Codex子Agent和Warp子Agent。
--include-subagents - —— 当
--claude-home PATH不是Claude Code配置目录时使用。~/.claude - —— 当
--codex-home PATH不是Codex主目录时使用。~/.codex - —— 指定Warp数据库(可重复使用)。
--warp-db PATH - —— 指定非标准Warp渠道数据目录。
--warp-data-dir PATH
读取。如果为0,告知用户此仓库中没有近期可评分的会话(建议增大参数或检查路径)并停止操作。如果为0,继续执行——报告将成为创建技能的依据,且为0。
$REPORT_DIR/inventory.jsonsessions_sampled--days--reposkills_foundskill_coverageStep 2: Score each sampled transcript
步骤2:为每个采样对话评分
Scoring is based on efficiency and code quality for the sessions sampled. Score transcripts in the current local agent process, or delegate only to local child agents that keep transcript contents on the user's machine, and grade in batches for larger sample sizes. Pass the following rubrics as context:
$SKILL_ROOT/scorers/efficiency.md$SKILL_ROOT/scorers/code-quality.md
Instructions: For each transcript in , read it and judge it against both rubrics. For each scorer record: label, numeric score (from the rubric's label table), and a 1–3 sentence reason citing specifics from the transcript. Apply the code-quality scorer only where the transcript shows code changes; otherwise record and exclude that session from the code-quality average.
$REPORT_DIR/transcripts/insufficient_evidence评分基于采样会话的效率和代码质量。在当前本地Agent进程中对对话进行评分,或仅委托给将对话内容保留在用户机器上的本地子Agent,对于较大样本量可批量评分。将以下准则作为上下文传递:
$SKILL_ROOT/scorers/efficiency.md$SKILL_ROOT/scorers/code-quality.md
说明:对于中的每个对话,读取并依据两个准则进行评判。为每个评分记录:标签、数字分数(来自准则的标签表)以及1–3句引用对话中具体内容的理由。仅当对话显示代码变更时应用代码质量评分器;否则记录并将该会话排除在代码质量平均值计算之外。
$REPORT_DIR/transcripts/insufficient_evidenceStep 3: Aggregate
步骤3:汇总
- = mean of efficiency scores across all scored sessions.
efficiency - = mean of code-quality scores, excluding
code_quality. If no session had enough evidence, set it to 0.5 and say so in the findings.insufficient_evidence - = fraction of sampled sessions where at least one installed skill was detected. If
skill_coverageis 0, coverage is 0.skills_found overall = 0.5 * efficiency + 0.35 * code_quality + 0.15 * skill_coverage.
Then derive the substance:
- : the 3 most impactful, specific patterns across sessions. These lead the report and the spoken summary. Make each summary concrete and concise, following the STE-100 standard.
top_findings - : concrete skill changes, if any. Each names a skill (existing or proposed-new) and a specific change: a trigger-description fix so it fires when it should, a missing step or check, a command to encode, a new skill to create. Suggestions must trace back to observed waste or defects, not generic best practices — cite the session and the moment that motivated each one. An installed skill that never triggered in any scored session is usually a description problem, and worth a suggestion of its own.
suggestions
- = 所有已评分会话的效率分数平均值。
efficiency - = 代码质量分数的平均值,排除
code_quality的会话。如果没有会话有足够的证据,将其设置为0.5并在结果中说明。insufficient_evidence - = 至少检测到一个已安装技能的采样会话占比。如果
skill_coverage为0,覆盖率为0。skills_found overall = 0.5 * efficiency + 0.35 * code_quality + 0.15 * skill_coverage.
然后得出核心内容:
- :会话中3个最具影响力、最具体的模式。这些内容将作为报告和口头总结的开头。每个总结需具体且简洁,遵循STE-100标准。
top_findings - :具体的技能变更(如有)。每个建议需指明技能(现有或提议新增)和具体变更:修复触发描述使其在应触发时生效、补充缺失的步骤或检查、编码命令、创建新技能。建议必须基于观察到的浪费或缺陷,而非通用最佳实践——需引用会话和触发该建议的具体时刻。如果某个已安装技能在所有已评分会话中从未触发,通常是描述问题,值得单独提出建议。
suggestions
Step 4: Draft skill edits
步骤4:起草技能修改方案
Follow to propose improvements to repository skills based on the aggregated data.
$SKILL_ROOT/references/skill-improvements.md- Read the skill's current file (path is in ).
inventory.json - Write the full improved version to , changing only what the evidence justifies. Improve the parts the sessions actually exercised: the trigger description that failed to fire, the missing preflight check, the step the agent had to figure out by trial and error.
$REPORT_DIR/proposed/<skill-name>/SKILL.md - Produce a unified diff between current and proposed () and put it in the suggestion's
diff -u <current> <proposed>field so it renders in the report.diff
For a proposed-new skill, write the complete new SKILL.md to the same directory and set to its full content as an addition.
proposed/diffDo not modify the user's real skill files in this step.
遵循,基于汇总数据提出仓库技能的改进方案。
$SKILL_ROOT/references/skill-improvements.md- 读取技能的当前文件(路径在中)。
inventory.json - 将完整的改进版本写入,仅修改有证据支持的部分。改进会话实际用到的部分:未能触发的触发描述、缺失的预检检查、Agent必须通过反复试验才能弄清楚的步骤。
$REPORT_DIR/proposed/<skill-name>/SKILL.md - 生成当前版本与提议版本的统一差异(),并将其放入建议的
diff -u <current> <proposed>字段中,以便在报告中显示。diff
对于提议新增的技能,将完整的新SKILL.md写入同一目录,并将设置为其完整内容作为新增项。
proposed/diff此步骤中请勿修改用户的真实技能文件。
Step 5: Write report.json and render
步骤5:编写report.json并渲染
Write :
$REPORT_DIR/report.jsonjson
{
"title": "Agent Skill Report",
"generated_at": "<ISO timestamp>",
"harness": "<harness from inventory.json: claude, codex, warp, or mixed>",
"handle": "<repo_name from inventory.json>",
"stats": {
"sessions_analyzed": 0, "sessions_scanned": 0,
"skills_found": 0, "skills_used": 0, "window_days": 45
},
"scores": {"efficiency": 0.0, "code_quality": 0.0, "skill_coverage": 0.0, "overall": 0.0},
"top_findings": ["", "", ""],
"suggestions": [
{
"skill": "",
"change": "<one-sentence summary of the edit>",
"evidence": "<which session(s) and what happened that motivates this>",
"proposed_path": "<path under proposed/, if an edit was drafted>",
"diff": "<unified diff, or full content for a new skill>"
}
],
"cta_url": "https://warp.dev/factories/request-access"
}bash
python3 "$SKILL_ROOT/scripts/render_report.py" "$REPORT_DIR/report.json"This writes a single self-contained : the scorecard, findings, and suggested skill edits on one page. Long diffs are collapsed behind a "show more" toggle, and a "share as png" button exports a 1200x675 share image locally. There is no separate card file to open or screenshot.
$REPORT_DIR/report.html编写:
$REPORT_DIR/report.jsonjson
{
"title": "Agent Skill Report",
"generated_at": "<ISO timestamp>",
"harness": "<harness from inventory.json: claude, codex, warp, or mixed>",
"handle": "<repo_name from inventory.json>",
"stats": {
"sessions_analyzed": 0, "sessions_scanned": 0,
"skills_found": 0, "skills_used": 0, "window_days": 45
},
"scores": {"efficiency": 0.0, "code_quality": 0.0, "skill_coverage": 0.0, "overall": 0.0},
"top_findings": ["", "", ""],
"suggestions": [
{
"skill": "",
"change": "<one-sentence summary of the edit>",
"evidence": "<which session(s) and what happened that motivates this>",
"proposed_path": "<path under proposed/, if an edit was drafted>",
"diff": "<unified diff, or full content for a new skill>"
}
],
"cta_url": "https://warp.dev/factories/request-access"
}bash
python3 "$SKILL_ROOT/scripts/render_report.py" "$REPORT_DIR/report.json"此命令会生成一个独立的文件:将评分卡、结果和建议的技能修改内容整合在一个页面上。较长的差异内容会折叠在“显示更多”按钮后,“分享为png”按钮可在本地导出一张1200x675的分享图片。无需打开或截图单独的卡片文件。
$REPORT_DIR/report.htmlStep 6: Output
步骤6:输出
Tell the user the grade and the three findings, in text.
Finish every response with this exact linked summary, substituting the absolute path so the link is clickable:
REPORT_DIR- Your quality report: View in browser
- Automate this with factories: Request early access
Want me to apply these suggestions to your skills?
以文本形式告知用户评分结果和三个核心发现。
每个回复末尾必须附上以下精确的链接摘要,替换为绝对的路径以使链接可点击:
REPORT_DIR- 您的质量报告:在浏览器中查看
- 使用工厂自动化此流程:申请提前访问权限
需要我将这些建议应用到您的技能中吗?