skill-doctor
Use when the user wants their agent setup graded from real conversation history, asks which installed skills are actually working, or wants evidence-backed skill edits — scores recent local Claude Code / Codex sessions against efficiency and code-quality rubrics, then drafts skill changes gated by a deterministic aggregator and renders one local shareable report.
- License 许可
- MIT
- 最近更新
- 2026-10-28
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- skill-doctor
- license
- MIT
- metadata
- { "version": "1.0.0", "build_pattern": "Rebuild of warpdotdev/common-skills skill-doctor (MIT): harvest → LLM-judges-with-rubrics → deterministic aggregation gate → self-contained HTML report", "distinct_from": "skillopt-sleep (nightly automated replay loop with adopt gate; this is one interactive graded pass); write-a-skill (authors a skill from expertise; this improves skills from observed session evidence); self-eval (grades this session's own work; this grades a window of past sessions)" }
- description
- Use when the user wants their agent setup graded from real conversation history, asks which installed skills are actually working, or wants evidence-backed skill edits — scores recent local Claude Code / Codex sessions against efficiency and code-quality rubrics, then drafts skill changes gated by a deterministic aggregator and renders one local shareable report.
- argument-hint
- [optional: --repo PATH, --days N, or a question about the setup]
02 资源文件 11
- 资产文件assets/report.example.json2.1 KB
- 资产文件assets/session_scores.example.json1.6 KB
- 资产文件assets/suggestions.example.json1.2 KB
- 参考文档references/session_mining_privacy.md5.0 KB
- 参考文档references/skill_edit_governance.md5.8 KB
- 参考文档references/transcript_scoring_canon.md4.7 KB
- 参考文档scorers/code-quality.md4.7 KB
- 参考文档scorers/efficiency.md3.3 KB
- 脚本scripts/collect_sessions.py32.5 KB
- 脚本scripts/render_report.py11.5 KB
- 脚本scripts/score_aggregator.py15.4 KB
03 SKILL.md 正文
skill-doctor — grade the agent setup from real sessions
Privacy is the contract. Everything runs locally. Transcripts are condensed, secret-redacted, chmod-0600, and never uploaded — the only shareable artifact is the report the user chooses to share.
Run from the repo being graded. Every artifact goes to one fresh scratch dir, never into the repo:
RUN="$(mktemp -d "${TMPDIR:-/tmp}/skill-doctor-XXXXXXXX")"
python scripts/collect_sessions.py --out "$RUN" # 1 — harvest + redact
1 — Collect. Scans Claude Code project-history JSONL and Codex rollouts,
discovers repo skills (.claude/skills, .agents/skills, .codex/skills, plugin
layouts), detects skill usage (Skill invocations, slash commands, SKILL.md paths), samples
newest-first, and writes redacted transcripts. Read $RUN/inventory.json: if
sessions_sampled is 0, tell the user there is nothing recent to score (suggest
--days 90 or --repo) and stop. skills_found 0 is fine — the report becomes a
case for creating skills.
2 — Score. python scripts/score_aggregator.py --inventory "$RUN/inventory.json" --emit-template > "$RUN/session_scores.json". Read each transcript in
$RUN/transcripts/ and judge it against both rubrics — scorers/efficiency.md
and scorers/code-quality.md. Fill the template with a label from the rubric's
table and a 1–3 sentence reason citing transcript specifics. Never invent numeric
scores — the aggregator derives them from labels. Use insufficient_evidence when
a transcript shows no judgeable diff. Also write 1–5 top_findings: the most
impactful cross-session patterns, concrete and specific.
3 — Draft edits. Follow references/skill_edit_governance.md (the filing bar:
would a competent agent with the current instructions still fail this way?). For
each suggestion that clears it, write the full improved SKILL.md to
$RUN/proposed/<skill>/SKILL.md, produce diff -u <current> <proposed>, and record
it in $RUN/suggestions.json citing the sampled session id(s) that motivated it.
Zero suggestions is a valid success — say why per finding. Never modify the user's
real skill files in this step.
4 — Aggregate (the gate). python scripts/score_aggregator.py --inventory "$RUN/inventory.json" --scores "$RUN/session_scores.json" --suggestions "$RUN/suggestions.json". It validates labels against the rubric tables, refuses
scores for unsampled sessions, requires substantive reasons, rejects suggestions
that cite no scored session, computes overall = 0.5·efficiency + 0.35·code_quality + 0.15·skill_coverage, and writes report.json. Exit 4 is a
stop: fix what it names and re-run; never hand-edit report.json around it.
5 — Render + tell. python scripts/render_report.py --report "$RUN/report.json"
→ one self-contained report.html (no JS, no CDN, dark-mode + print-to-PDF). Then
tell the user the grade and the top findings in text, link
file://$RUN/report.html, and ask whether to apply the proposed diffs to their
real skills — apply only on an explicit yes, skill by skill.
Hard rules
- Never upload transcripts, session files, or any excerpt. Local only.
- Labels only, from the rubric tables. The aggregator owns all arithmetic.
- Every suggestion traces to a scored session — or it is dropped. Generic best practice is not evidence.
- Zero suggestions is a success, not a failure to report around.
- Exit 4 from the aggregator is a stop, not an error to swallow or bypass.
- Never touch the user's real skill files without an explicit per-skill yes; proposed edits live under
$RUN/proposed/. - A proposed skill edit follows write-a-skill discipline — trigger phrase in the description, smallest change that expresses the rule, replace over append.
Scripts
| Script | Role | Exit codes |
|---|---|---|
scripts/collect_sessions.py |
Harvest Claude Code + Codex sessions, redact secrets, sample, inventory | 0 · 3 bad input |
scripts/score_aggregator.py |
Validate labels/reasons/suggestions, compute grade, emit report.json | 0 · 2 warnings · 3 bad input · 4 validation failure |
scripts/render_report.py |
report.json → single self-contained report.html | 0 · 3 bad input |
All support --help, --output json, and --sample (no real history needed).
References and assets
scorers/efficiency.md·scorers/code-quality.md— the two rubrics, preserved verbatim from upstreamreferences/transcript_scoring_canon.md— why rubric-anchored LLM judging works and where it fails (7 sources)references/session_mining_privacy.md— the local-only contract, redaction pattern canon (7 sources)references/skill_edit_governance.md— the filing bar for proposing skill edits (7 sources)assets/session_scores.example.json·assets/suggestions.example.json·assets/report.example.json— the three handoff shapes
04 同仓库更多 Skills
syllabus
Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.
pulse
Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X/Twitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend/sentiment/problems/opportunities/comparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.
patent
Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search / freedom-to-operate / competitive landscape / acquisition diligence / litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.
notebooklm
Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio/Video Overviews, Mind Maps, Reports incl. Briefing Doc/Study Guide/FAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.
litreview
Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER / Decomposition / hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5/10/20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed/OpenAlex (or Consensus) query.
grants
NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance/Innovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget/scope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.