重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
ln-610-docs-auditor by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-610-docs-auditor路径说明: 文件路径(
shared/、references/、../ln-*)是相对于技能仓库根目录的。如果在当前工作目录(CWD)中未找到,请定位此 SKILL.md 文件所在的目录,然后向上返回一级以找到仓库根目录。如果缺少shared/目录,请通过 WebFetch 从https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}获取文件。
协调 4 个专门的审计工作器,执行全面的文档质量分析。
docs/project/docs_audit.md (基于文件,不创建任务)广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
docs/project/docs_audit.md加载项目元数据:
CLAUDE.md — 文档层次结构的根docs/README.md — 文档索引package.json、requirements.txt、go.mod、Cargo.tomldocs/project/ 中现有的文档提取:
.md 文件列表 (供 ln-611 检查层次结构)ln-612 的目标文档:
FOR doc IN [CLAUDE.md, docs/README.md, docs/documentation_standards.md,
docs/principles.md, docs/project/*.md]:
IF doc exists AND doc NOT IN [docs/tasks/*, docs/reference/*, docs/presentation/*]:
semantic_targets.append(doc)
{
"tech_stack": {"language": "...", "frameworks": [...]},
"project_root": "...",
"output_dir": "docs/project/.audit/ln-610/{YYYY-MM-DD}"
}
其中 {YYYY-MM-DD} 是当前日期 (例如,2026-03-01)。
mkdir -p {output_dir}
工作器文件在汇总后会被清理 (见阶段 9)。
必读: 加载 shared/references/task_delegation_pattern.md。
通过 Agent 工具并行调用所有工作器:
| 工作器 | 调用次数 | 输出 |
|---|---|---|
| ln-611-docs-structure-auditor | 1 | {output_dir}/611-structure.md |
| ln-612-semantic-content-auditor | N (每个目标文档) | {output_dir}/612-semantic-{doc-slug}.md |
| ln-613-code-comments-auditor | 1 | {output_dir}/613-code-comments.md |
| ln-614-docs-fact-checker | 1 | {output_dir}/614-fact-checker.md |
ln-614 仅接收 contextStore 并在内部发现 .md 文件。工作器遵循共享的基于文件的审计契约,并返回包含报告路径、分数和严重性计数的简洁摘要。
调用方式:
// 全局工作器 (ln-611, ln-613, ln-614) — 每个调用 1 次:
FOR EACH worker IN [ln-611, ln-613, ln-614]:
Agent(description: "Docs audit via " + worker,
prompt: "Execute audit worker.
Step 1: Invoke worker:
Skill(skill: \"" + worker + "\")
CONTEXT:
" + JSON.stringify(contextStore),
subagent_type: "general-purpose")
// 按文档工作器 (ln-612) — 调用 N 次:
FOR EACH doc IN semantic_targets:
doc_context = { ...contextStore, doc_path: doc }
Agent(description: "Semantic audit " + doc + " via ln-612",
prompt: "Execute audit worker.
Step 1: Invoke worker:
Skill(skill: \"ln-612-semantic-content-auditor\")
CONTEXT:
" + JSON.stringify(doc_context),
subagent_type: "general-purpose")
必读: 加载 shared/references/audit_coordinator_aggregation.md。
使用共享的汇总模式进行摘要解析、工作器报告读取、严重性汇总和最终报告组装。
类别权重:
| 类别 | 来源 | 权重 |
|---|---|---|
| 文档结构 | ln-611 | 25% |
| 语义内容 | ln-612 (跨文档平均) | 30% |
| 代码注释 | ln-613 | 20% |
| 事实准确性 | ln-614 | 25% |
计算总体分数作为上述 4 个类别的加权平均值。
必读: 加载 shared/references/context_validation.md
应用规则 1 和文档特定的内联过滤器:
FOR EACH finding WHERE severity IN (HIGH, MEDIUM):
# 规则 1: ADR/计划覆盖
IF finding matches ADR → advisory "[Planned: ADR-XXX]"
# 文档特定:压缩上下文 (来自 ln-611)
IF Structure finding Cat 3 (Compression):
- Skip if path in references/ or templates/ (reference docs = naturally large)
- Skip if filename contains architecture/design/api_spec
- Skip if tables+lists > 50% of content (already structured)
# 事实核查器:示例/模板路径排除 (来自 ln-614)
IF Fact finding (PATH_NOT_FOUND):
- Path in examples/ or templates/ directory reference → advisory
- Path has placeholder pattern (YOUR_*, <project>, {name}) → remove
# 事实核查器:计划功能声明 (来自 ln-614)
IF Fact finding (ENTITY_NOT_FOUND, ENDPOINT_NOT_FOUND):
- Entity mentioned in ADR/roadmap as planned → advisory "[Planned: ADR-XXX]"
# 事实核查器:跨文档矛盾权威性 (来自 ln-614)
IF Fact finding (CROSS_DOC_*_CONFLICT):
- docs/project/ is authority over docs/reference/ → report reference doc
# 注释特定:按类别密度目标 (来自 ln-613)
IF Comment finding Cat 2 (Density):
- test/ or tests/ → target density 2-10%
- infra/ or config/ or ci/ → target density 5-15%
- business/domain/services → target density 15-25%
Recalculate with per-category target.
# 注释特定:WHY-not-WHAT 的复杂性上下文 (来自 ln-613)
IF Comment finding Cat 1 (WHY not WHAT):
- If file McCabe complexity > 15 → WHAT comments acceptable
- If file in domain/ or business/ → explanatory comments OK
Downgraded findings → "Advisory Findings" section in report.
将汇总报告写入 docs/project/docs_audit.md:
## Documentation Audit Report - {DATE}
### Overall Score: X.X/10
| Category | Score | Worker | Issues |
|----------|-------|--------|--------|
| Documentation Structure | X/10 | ln-611 | N issues |
| Semantic Content | X/10 | ln-612 | N issues (across M docs) |
| Code Comments | X/10 | ln-613 | N issues |
| Fact Accuracy | X/10 | ln-614 | N issues |
### Critical Findings
- [ ] **[Category]** `path/file:line` - Issue. **Action:** Fix suggestion.
### Advisory Findings
(Context-validated findings downgraded from MEDIUM/HIGH)
### Recommended Actions
| Priority | Action | Location | Category |
|----------|--------|----------|----------|
| High | ... | ... | ... |
必读: 加载 shared/references/audit_scoring.md。
必读: 加载 shared/references/results_log_pattern.md
向 docs/project/.audit/results_log.md 追加一行,包含:Skill=ln-610、Metric=overall_score、Scale=0-10、来自阶段 7 报告的分数。计算与之前 ln-610 行的差值。如果文件缺失,则创建带标题的文件。滚动窗口:最多 50 条记录。
rm -rf {output_dir}
删除带日期的输出目录 (docs/project/.audit/ln-610/{YYYY-MM-DD}/)。汇总报告和结果日志已保存所有审计数据。
docs/project/.audit/ln-610/{YYYY-MM-DD}docs/project/docs_audit.mddocs/project/.audit/results_log.md必读: 加载 shared/references/meta_analysis_protocol.md
技能类型:review-coordinator (仅限工作器)。在所有阶段完成后运行。使用 review-coordinator — workers only 格式输出到聊天。
shared/references/context_validation.mdshared/references/task_delegation_pattern.mdshared/references/audit_coordinator_aggregation.md版本: 5.0.0 最后更新: 2026-03-01
每周安装次数
100
仓库
GitHub 星标数
245
首次出现
2026年3月1日
安全审计
已安装于
codex94
cursor93
opencode92
gemini-cli92
github-copilot92
amp92
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Coordinates 4 specialized audit workers to perform comprehensive documentation quality analysis.
docs/project/docs_audit.md (file-based, no task creation)docs/project/docs_audit.mdLoad project metadata:
CLAUDE.md — root of documentation hierarchydocs/README.md — documentation indexpackage.json, requirements.txt, go.mod, Cargo.tomldocs/project/Extract:
.md files in project (for ln-611 hierarchy check)Target documents for ln-612:
FOR doc IN [CLAUDE.md, docs/README.md, docs/documentation_standards.md,
docs/principles.md, docs/project/*.md]:
IF doc exists AND doc NOT IN [docs/tasks/*, docs/reference/*, docs/presentation/*]:
semantic_targets.append(doc)
{
"tech_stack": {"language": "...", "frameworks": [...]},
"project_root": "...",
"output_dir": "docs/project/.audit/ln-610/{YYYY-MM-DD}"
}
Where {YYYY-MM-DD} is current date (e.g., 2026-03-01).
mkdir -p {output_dir}
Worker files are cleaned up after consolidation (see Phase 9).
MANDATORY READ: Load shared/references/task_delegation_pattern.md.
All workers in PARALLEL via Agent tool:
| Worker | Invocations | Output |
|---|---|---|
| ln-611-docs-structure-auditor | 1 | {output_dir}/611-structure.md |
| ln-612-semantic-content-auditor | N (per target document) | {output_dir}/612-semantic-{doc-slug}.md |
| ln-613-code-comments-auditor | 1 | {output_dir}/613-code-comments.md |
| ln-614-docs-fact-checker | 1 | {output_dir}/614-fact-checker.md |
ln-614 receives only contextStore and discovers .md files internally. Workers follow the shared file-based audit contract and return compact summaries with report path, score, and severity counts.
Invocation:
// Global workers (ln-611, ln-613, ln-614) — 1 invocation each:
FOR EACH worker IN [ln-611, ln-613, ln-614]:
Agent(description: "Docs audit via " + worker,
prompt: "Execute audit worker.
Step 1: Invoke worker:
Skill(skill: \"" + worker + "\")
CONTEXT:
" + JSON.stringify(contextStore),
subagent_type: "general-purpose")
// Per-document worker (ln-612) — N invocations:
FOR EACH doc IN semantic_targets:
doc_context = { ...contextStore, doc_path: doc }
Agent(description: "Semantic audit " + doc + " via ln-612",
prompt: "Execute audit worker.
Step 1: Invoke worker:
Skill(skill: \"ln-612-semantic-content-auditor\")
CONTEXT:
" + JSON.stringify(doc_context),
subagent_type: "general-purpose")
MANDATORY READ: Load shared/references/audit_coordinator_aggregation.md.
Use the shared aggregation pattern for summary parsing, worker report reads, severity rollups, and final report assembly.
Category weights:
| Category | Source | Weight |
|---|---|---|
| Documentation Structure | ln-611 | 25% |
| Semantic Content | ln-612 (avg across docs) | 30% |
| Code Comments | ln-613 | 20% |
| Fact Accuracy | ln-614 | 25% |
Calculate overall score as the weighted average of the 4 categories above.
MANDATORY READ: Load shared/references/context_validation.md
Apply Rule 1 + documentation-specific inline filters:
FOR EACH finding WHERE severity IN (HIGH, MEDIUM):
# Rule 1: ADR/Planned Override
IF finding matches ADR → advisory "[Planned: ADR-XXX]"
# Doc-specific: Compression context (from ln-611)
IF Structure finding Cat 3 (Compression):
- Skip if path in references/ or templates/ (reference docs = naturally large)
- Skip if filename contains architecture/design/api_spec
- Skip if tables+lists > 50% of content (already structured)
# Fact-checker: Example/template path exclusion (from ln-614)
IF Fact finding (PATH_NOT_FOUND):
- Path in examples/ or templates/ directory reference → advisory
- Path has placeholder pattern (YOUR_*, <project>, {name}) → remove
# Fact-checker: Planned feature claims (from ln-614)
IF Fact finding (ENTITY_NOT_FOUND, ENDPOINT_NOT_FOUND):
- Entity mentioned in ADR/roadmap as planned → advisory "[Planned: ADR-XXX]"
# Fact-checker: Cross-doc contradiction authority (from ln-614)
IF Fact finding (CROSS_DOC_*_CONFLICT):
- docs/project/ is authority over docs/reference/ → report reference doc
# Comment-specific: Per-category density targets (from ln-613)
IF Comment finding Cat 2 (Density):
- test/ or tests/ → target density 2-10%
- infra/ or config/ or ci/ → target density 5-15%
- business/domain/services → target density 15-25%
Recalculate with per-category target.
# Comment-specific: Complexity context for WHY-not-WHAT (from ln-613)
IF Comment finding Cat 1 (WHY not WHAT):
- If file McCabe complexity > 15 → WHAT comments acceptable
- If file in domain/ or business/ → explanatory comments OK
Downgraded findings → "Advisory Findings" section in report.
Write consolidated report to docs/project/docs_audit.md:
## Documentation Audit Report - {DATE}
### Overall Score: X.X/10
| Category | Score | Worker | Issues |
|----------|-------|--------|--------|
| Documentation Structure | X/10 | ln-611 | N issues |
| Semantic Content | X/10 | ln-612 | N issues (across M docs) |
| Code Comments | X/10 | ln-613 | N issues |
| Fact Accuracy | X/10 | ln-614 | N issues |
### Critical Findings
- [ ] **[Category]** `path/file:line` - Issue. **Action:** Fix suggestion.
### Advisory Findings
(Context-validated findings downgraded from MEDIUM/HIGH)
### Recommended Actions
| Priority | Action | Location | Category |
|----------|--------|----------|----------|
| High | ... | ... | ... |
MANDATORY READ: Load shared/references/audit_scoring.md.
MANDATORY READ: Load shared/references/results_log_pattern.md
Append one row to docs/project/.audit/results_log.md with: Skill=ln-610, Metric=overall_score, Scale=0-10, Score from Phase 7 report. Calculate Delta vs previous ln-610 row. Create file with header if missing. Rolling window: max 50 entries.
rm -rf {output_dir}
Delete the dated output directory (docs/project/.audit/ln-610/{YYYY-MM-DD}/). The consolidated report and results log already preserve all audit data.
docs/project/.audit/ln-610/{YYYY-MM-DD}docs/project/docs_audit.mddocs/project/.audit/results_log.mdMANDATORY READ: Load shared/references/meta_analysis_protocol.md
Skill type: review-coordinator (workers only). Run after all phases complete. Output to chat using the review-coordinator — workers only format.
shared/references/context_validation.mdshared/references/task_delegation_pattern.mdshared/references/audit_coordinator_aggregation.mdVersion: 5.0.0 Last Updated: 2026-03-01
Weekly Installs
100
Repository
GitHub Stars
245
First Seen
Mar 1, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex94
cursor93
opencode92
gemini-cli92
github-copilot92
amp92
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
48,700 周安装