skills/docs-auditor/SKILL.md
セッションtranscriptを分析してドキュメントの効果を評価する。 doc参照がAgentの行動を改善したか、Context浪費か、腐敗して有害かを判定。 last-validated がないドキュメントにもgit履歴ベースで対応。 HTML reportでper-doc健全性、Context budget、freshness、推奨アクションを表示。 Use when user says "audit docs", "docs audit", "run docs-auditor", "ドキュメント監査", "doc ROI", "ドキュメントの効果分析".
npx skillsauth add nyosegawa/skills docs-auditorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Transcript-based documentation effectiveness analysis. Evaluates whether reading docs actually improves agent behavior or wastes context tokens. Generates an interactive HTML report with per-doc health, freshness dashboard, context budget, and actionable recommendations.
pip install tiktoken (optional — falls back to character-based estimation)Run all steps sequentially. The coordinator (you) manages data flow between scripts and sub-agents.
Ask the user for the report language using AskUserQuestion: "レポートの言語は? (e.g. 日本語, English)" Default to the user's conversation language if not specified. Pass the language choice to all sub-agents as an instruction prefix: "Write all output text in [chosen language]."
Scope is always current project only. Do NOT ask.
Set up a timestamped workspace:
RUN_ID=$(date +%Y-%m-%dT%H-%M-%S)
WORKSPACE=<project>/.claude/docs-report/${RUN_ID}
mkdir -p ${WORKSPACE}
Collect transcripts:
python3 scripts/collect_transcripts.py --cwd "$(pwd)" --days 14 \
--output ${WORKSPACE}/transcripts.json --verbose
Collect doc metadata:
python3 scripts/collect_docs.py --project-root "$(pwd)" \
--output ${WORKSPACE}/doc-manifest.json --verbose
Report: "N sessions, M user turns, K docs found. Context budget: T tokens (A always-on, D on-demand)."
Batch sessions (~60 per batch, cap at MAX_BATCHES=12). Spawn parallel sub-agents — one per batch:
For each batch i:
Agent tool (general-purpose):
"Read agents/doc-impact-analyst.md from the docs-auditor skill directory
for your analysis instructions.
Read ${WORKSPACE}/doc-manifest.json for doc definitions.
Read ${WORKSPACE}/transcripts.json for session data.
Only analyze sessions with these indices: [list from batch].
Write all output text in [chosen language].
Write your analysis as JSON to ${WORKSPACE}/batch-impact-${i}.json
following the exact schema in schemas/schemas.md (doc-impact-report section)."
After all sub-agents complete, merge batch results:
doc_reports (combine incidents, recalculate stats per doc)docs_never_readmeta totals${WORKSPACE}/doc-impact-report.jsonAgent tool (general-purpose):
"Read agents/always-on-analyst.md from the docs-auditor skill directory.
Read ${WORKSPACE}/doc-manifest.json for doc definitions.
Read ${WORKSPACE}/transcripts.json for session data.
Focus on docs with injection_mode 'always' (CLAUDE.md, AGENTS.md).
Write all output text in [chosen language].
Write analysis to ${WORKSPACE}/always-on-report.json."
Agent tool (general-purpose):
"Read agents/portfolio-analyst.md from the docs-auditor skill directory.
Read ${WORKSPACE}/doc-manifest.json
Read ${WORKSPACE}/doc-impact-report.json
Read ${WORKSPACE}/always-on-report.json
Write all output text in [chosen language].
Write analysis to ${WORKSPACE}/portfolio-analysis.json."
Agent tool (general-purpose):
"Read agents/improvement-planner.md from the docs-auditor skill directory.
Read ${WORKSPACE}/doc-impact-report.json
Read ${WORKSPACE}/always-on-report.json
Read ${WORKSPACE}/portfolio-analysis.json
Read ${WORKSPACE}/doc-manifest.json
Write all output text in [chosen language].
Write recommendations to ${WORKSPACE}/improvement-plan.json.
Write individual recommendation files to ${WORKSPACE}/recommendations/."
Generate HTML report:
python3 scripts/generate_report.py --workspace ${WORKSPACE}
open ${WORKSPACE}/docs-audit-report.html
Update health history — read <base_dir>/health-history.json (create if
doesn't exist as []). Append:
{
"timestamp": "<ISO 8601>",
"sessions_analyzed": 0,
"turns_analyzed": 0,
"docs_analyzed": 0,
"total_doc_tokens": 0,
"always_on_tokens": 0,
"portfolio_health": "healthy | needs_attention | critical",
"freshness_score": "fresh | aging | stale",
"mean_impact_score": 0.0,
"docs_never_read": 0,
"recommendations_proposed": 0
}
Show delta from previous run if exists.
Do NOT auto-apply any recommendations. All recommendations (including update_last_validated and add_last_validated) are presented in the HTML report for human review. The user decides what to apply manually.
If the user explicitly asks to apply specific recommendations after reviewing the report:
python3 scripts/apply_recommendations.py \
--recommendations ${WORKSPACE}/recommendations/ --confirm \
--output ${WORKSPACE}/changelog.md
Report what was done:
| Verdict | Description | |---------|-------------| | beneficial | Agent behavior improved after reading the doc | | neutral | No observable behavior change | | harmful | Outdated/conflicting info caused agent to act incorrectly | | unnecessary | Doc was irrelevant to the task (context waste) | | inconclusive | Cannot determine impact from available context |
| Verdict | Description | |---------|-------------| | followed | Agent behavior aligned with directive | | violated | Agent behavior contradicted directive | | not_applicable | Directive was not relevant to this session |
<base_dir>/
├── health-history.json
└── <TIMESTAMP>/
├── transcripts.json
├── doc-manifest.json
├── batch-impact-*.json
├── doc-impact-report.json
├── always-on-report.json
├── portfolio-analysis.json
├── improvement-plan.json
├── recommendations/*.rec.json
├── docs-audit-report.html
└── changelog.md
--cwd or --list with collect_transcripts.py.development
Analyzes Claude Code session transcripts to evaluate skill portfolio health — routing errors, attention competition between descriptions, and coverage gaps. Generates an interactive HTML report with per-skill health cards, competition matrix, attention budget analysis, and actionable patches. Unlike skill-creator which optimizes individual skills in isolation, skill-auditor optimizes the portfolio as a system, detecting cross-skill attention theft and cascade risks. Use when user says "audit my skills", "skill audit", "run skill-auditor", "analyze skill routing", "check skill competition", "portfolio health", "スキル監査", "スキルの精度を分析", "スキルルーティング分析".
tools
Build high-quality Remotion promo and intro videos for any app type (web, mobile, API/SDK, developer tool, AI product) using app-type blueprints, timeline patterns, and frame-capture QA. Use when users ask to create a product promo, teaser, app intro, UX flow video, or Remotion-based demo video.
tools
MCPサーバーの「Light版」を生成する。descriptionを1行に圧縮し、ベストプラクティスをAgent Skillとして分離する。Use when user asks to "MCP Light版を作って", "MCPを軽量化", "Light MCP", "mcp-light", "create light mcp", "compress mcp descriptions", "MCP description圧縮", or wants to reduce MCP tool definition token usage.
development
Gemini画像生成APIを使ってブログ記事やドキュメント用の図・イラストを生成する。Use when user asks to "画像生成", "図を作って", "generate image", "create diagram", "イラスト作って", "図示して", or wants to create visual assets for articles.