一键导入
audit-docs
Use when asked to audit documentation accuracy, coverage, or find documentation gaps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when asked to audit documentation accuracy, coverage, or find documentation gaps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Rewrite an issue's Implementation Steps, Acceptance Criteria, and Files to Modify in place from its own accumulated research findings, without appending or bulldozing human prose
Use when asked about project health, velocity, bug trends, or whether we're making progress.
Use when asked for an adversarial go/no-go review or whether an issue is worth implementing.
Use when asked to manually compact a session's memory, trigger session summarization, or reduce a long session's context footprint.
Use when asked to manually compact a session's memory, trigger session summarization, or reduce a long session's context footprint.
Use when asked to detect conflicting requirements or incompatible decisions across open issues.
| name | audit-docs |
| description | Use when asked to audit documentation accuracy, coverage, or find documentation gaps. |
| disable-model-invocation | true |
| argument-hint | [scope] |
| allowed-tools | ["Task","Read","Glob","Grep","Edit","Write","Bash(git:*)"] |
| arguments | [{"name":"scope","description":"Audit scope (full|readme|file:<path>)","required":false},{"name":"fix","description":"Auto-apply fixable corrections without prompting","required":false}] |
| metadata | {"short-description":"Use when asked to audit documentation accuracy, coverage, or find documentation"} |
You are tasked with auditing project documentation for accuracy, completeness, and consistency with the codebase.
This command uses project configuration from .ll/ll-config.json:
{{config.project.src_dir}}docs/guides/): Audit every markdown file under that directoryThis skill MUST NOT read documentation file bodies into the orchestrator
context. At full, dir:, or any multi-file scope, reading every file plus
every codebase verification search into one window overflows the context limit
(this is the failure this design exists to prevent).
Instead, the orchestrator discovers the file list and fans out one
audit subagent per file (batched, in parallel). Each subagent reads its file
and runs codebase verification in its own context, returning only a compact
structured findings list. The orchestrator aggregates findings — it never reads
a doc body or runs verification searches itself. This mirrors the wave-based
subagent architecture in audit-claude-config.
Discover the file list only — do not read file bodies here.
full and dir:/bare-path scopes must exclude non-documentation
directories that happen to contain markdown — issue-tracker files
(.issues/), planning notes (thoughts/), loop/runtime artifacts
(.loops/, .ll/, logs/, .pytest_cache/, .demo/), and Claude Code
plugin components (skills/, commands/, agents/, hooks/ — these are
commands and agent definitions, not documentation), plus vendored
dependencies (node_modules/, .venv/, venv/, anywhere in the tree, not
just at the repo root). Skipping this exclusion list is the single biggest
cause of this skill overflowing context or exhausting concurrent-agent
limits: in a repo with a large issue backlog, full scope can otherwise
discover thousands of files instead of dozens.
SCOPE="${scope:-readme}"
DOC_PRUNE=( -not -path "*/.git/*" -not -path "*/node_modules/*" \
-not -path "*/.venv/*" -not -path "*/venv/*" \
-not -path "./.issues/*" -not -path "./thoughts/*" \
-not -path "./.loops/*" -not -path "./.ll/*" -not -path "./logs/*" \
-not -path "./.pytest_cache/*" -not -path "./.demo/*" \
-not -path "./skills/*" -not -path "./commands/*" \
-not -path "./agents/*" -not -path "./hooks/*" )
case "$SCOPE" in
full)
# Find all documentation markdown files (excludes issues/thoughts/
# loop artifacts/plugin components/vendored deps — see above)
find . -name "*.md" "${DOC_PRUNE[@]}"
;;
readme)
# Start with README, follow links
echo "README.md"
;;
file:*)
# Specific file
echo "${SCOPE#file:}"
;;
dir:*)
# All markdown under a directory (same doc-only excludes as `full`)
find "${SCOPE#dir:}" -name "*.md" "${DOC_PRUNE[@]}"
;;
*/|*/*)
# Bare directory path (e.g. docs/guides/)
find "${SCOPE%/}" -name "*.md" "${DOC_PRUNE[@]}"
;;
esac
Large-scope guard: if the discovered file count exceeds 30, do not
proceed directly to Phase 2. Show the user the count and use
AskUserQuestion (single-select) to confirm:
dir:<subpath> scope
Only continue to Phase 2 after the user confirms.Do not read the files yourself. For each discovered file, spawn a
codebase-analyzer subagent via the Task tool. For a single-file scope
(readme, file:), one subagent is fine.
For multi-file scopes, this is a required sequential batch loop, not optional guidance:
Task calls in a single message (a message
with multiple Task calls runs them concurrently — that's the
parallelism). Never put more than 6 Task calls in one message.Task calls. Never send a new batch while a previous
batch's results are still outstanding.This bounds concurrent-agent usage to 6 at a time regardless of total file
count, which is what keeps full/dir: scopes from exhausting the
concurrent-agent API limit.
Give each subagent this verbatim assignment (substitute <FILE>):
Audit the documentation file
<FILE>for accuracy against this codebase. Read the file, then verify its claims by reading/grepping the actual code, file paths, command syntax, config keys, and version numbers it references. Check the dimensions below. Return ONLY a compact findings list — for each finding:file:line, dimension, severity (high/med/low), a one-line description, and (when mechanically fixable) the exactold → newtext. Do not return the file contents or your search transcript.Dimensions to check:
- Accuracy: code examples run, file paths exist, API references match actual code, version numbers current, command examples work.
- Completeness: public APIs documented, install/usage/config/error handling covered.
- Consistency: terminology, formatting conventions, links resolve, images accessible.
- Currency: no deprecated info, reflects latest features, version requirements accurate.
Where a subagent reports a runnable code block worth executing, it should test
it in its own context (python -c "...", bash -n) rather than returning the
block for the orchestrator to run.
Merge the structured findings returned by all subagents into a single list. The orchestrator holds only these compact findings — never the file bodies — so multi-file scopes stay within the context budget.
Generate a comprehensive audit report using the format defined in templates.md (see "Audit Report Format" section).
After generating the report, classify each finding and offer direct fixes for auto-fixable items.
Classify each finding from the report using the classification table in templates.md:
| Category | Criteria | Examples |
|---|---|---|
| Auto-fixable | Specific old/new content known, mechanical replacement | Wrong counts, outdated paths, broken relative links, incorrect version numbers, wrong command syntax |
| Needs issue | Requires investigation, writing, or design decisions | Missing sections, incomplete docs, content rewrites, new examples needed |
If --fix flag is set: Skip the prompt. Auto-apply all auto-fixable corrections and output progress:
Applying auto-fixes...
Fix 1/N: [description] in [file:line]... done
Fix 2/N: [description] in [file:line]... done
...
Applied: X fixes
Remaining: Y findings (need issue tracking)
Then proceed to Phase 5 with only the non-fixable findings.
Otherwise: Present findings grouped by fixability using the format in templates.md (see "Auto-Fixable Findings Format" section).
Use the AskUserQuestion tool with single-select:
If there are no auto-fixable findings, skip this phase and proceed directly to Phase 5 with all findings.
For each auto-fixable finding:
Fixed: [description] in [file:line]After all fixes applied:
git add [fixed files]
Output:
Direct fixes applied: N
- [file:line]: [description]
- [file:line]: [description]
Files staged. Run `/ll:commit` to commit, or continue to create issues for remaining findings.
Proceed to Phase 5 with only the non-fixable findings (skip issue management entirely if no non-fixable findings remain).
Skip direct fixes. Proceed to Phase 5 with all findings (both auto-fixable and non-fixable).
For each auto-fixable finding, use the AskUserQuestion tool with single-select:
[old] → New: [new]"Apply fixes for "Fix now" selections, collect "Create issue" selections for Phase 5, discard "Skip" selections.
After review:
git add [fixed files]
Proceed to Phase 5 with findings marked "Create issue" plus all non-fixable findings.
Note: If findings were fixed directly in Phase 4.5, only the remaining unfixed findings are processed in this phase. If all findings were fixed directly, skip to Phase 8's summary output.
After generating the report, offer to create, update, or reopen issues for documentation problems.
Use the mapping table defined in templates.md (see "Finding-to-Issue Mapping" section).
Before creating issues, search for existing issues that cover the same problem:
Search active issues by file path:
# Search for issues mentioning the doc file
grep -r "README.md" .issues/bugs/ .issues/enhancements/
Search completed issues for potential reopen:
# Check if this was previously fixed and regressed
grep -r "README.md" .issues/completed/
Match criteria:
| Match Found | Location | Action |
|---|---|---|
| High confidence match | Active issue | Update existing issue with new context |
| High confidence match | Completed | Reopen if problem recurred |
| Low/no match | - | Create new issue |
Use the issue file template defined in templates.md (see "Issue File Template" section).
If a completed issue matches a new finding:
Verify it's the same problem:
Move from completed to active:
git mv .issues/completed/P2-BUG-XXX-broken-link.md .issues/bugs/
Append Reopened section using the template in templates.md (see "Reopened Section Template").
Present a summary before making any changes using the format in templates.md (see "Proposed Issue Changes Format" section).
Use the AskUserQuestion tool with single-select:
Wait for user selection before modifying any files.
After approval:
git add .issues/ — a directory-level stage
sweeps in unrelated untracked/modified files (BUG-1976).
git add "<each created/updated/reopened issue-file-path>"
Audit complete:
- Fixed directly: N findings
- Created: N issues (N BUG, N ENH)
- Updated: N issues
- Reopened: N issues
- Skipped: N findings
Run `/ll:commit` to commit these changes.
$ARGUMENTS
scope (optional, default: readme): What to audit
full - All documentationreadme - README and linked docsfile:<path> - Specific filedir:<path> or a bare directory path (e.g. docs/guides/) - All markdown under a directory--fix (optional, flag): Automatically apply all auto-fixable corrections without prompting. Skips the action selection prompt for fixable items and applies them directly. Non-fixable findings still flow to issue management.
# Audit README and linked docs
/ll:audit-docs
# Full documentation audit
/ll:audit-docs full
# Audit specific file
/ll:audit-docs file:docs/api.md
# Audit every markdown file under a directory (fans out to subagents)
/ll:audit-docs docs/guides/
# Auto-fix documentation issues
/ll:audit-docs --fix
# Full audit with auto-fix
/ll:audit-docs full --fix
After auditing:
/ll:commit to save all changes (direct fixes + issue files)Works well with:
/ll:scan-codebase - May find related code issues/ll:verify-issues - Validate existing doc-related issues/ll:manage-issue - Process created documentation issuesWhen this skill emits an audit finding, verdict, or scorecard, cite evidence verbatim rather than re-summarizing — quoting is cheaper than paraphrasing and keeps the audit auditable:
IMPORTANT: For each condition you evaluate:
Do not assert a verdict without evidence. "The task appears complete" is not evidence.