doc-ecosystem-audit
Skill2 starsChanged 9 months agoApache-2.0View on GitHub
Comprehensive diagnostic of the documentation ecosystem — 16 categories across 5 domains with composite health scoring, trend tracking, patch suggestions, and interactive finding-by-finding walkthrough. Covers index sync, link integrity, content quality, generation pipelines, and documentation coverage.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
When to use: When you want to understand the overall health of the documentation system, identify broken links, orphaned docs, stale …
- Distinctive: line 40
When the task doesn't match this skill's scope -- check related skills
- Distinctive: line 41
When a more specialized skill exists for the specific task
- Distinctive: line 70
Run the audit script:
- Distinctive: line 78
Create a session decision log file:
- Very specific: line 80
Create .claude/tmp/ directory if it doesn't exist
- Very specific: line 149
Write report to .claude/tmp/doc-audit-report-{YYYY-MM-DD}.md.
- Very specific: line 151
Process verification: Run __tests__/ suite:
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- prettier-ignore-start -->Document Version: 1.0 Last Updated: 2026-02-24 Status: ACTIVE
<!-- prettier-ignore-end -->Doc Ecosystem Audit
Deep diagnostic of the entire documentation ecosystem — documentation index
(DOCUMENTATION_INDEX.md), cross-references, content quality, generation
pipelines (docs:index, doc-optimizer), and coverage completeness. Produces
per-category scores, a composite health grade (A-F), trend tracking across runs,
and an interactive walkthrough with patch suggestions.
Invocation: /doc-ecosystem-audit
When to use: When you want to understand the overall health of the
documentation system, identify broken links, orphaned docs, stale content, or
pipeline issues. Complementary with /hook-ecosystem-audit (hook audit owns
hook internals; doc audit owns documentation quality).
When to Use
- |
- User explicitly invokes
/doc-ecosystem-audit
When NOT to Use
- When the task doesn't match this skill's scope -- check related skills
- When a more specialized skill exists for the specific task
CRITICAL RULES (Read First)
Read
.claude/skills/_shared/ecosystem-audit/CRITICAL_RULES.mdand follow all 8 rules. The rules below are summaries — the shared file is authoritative.
- CHECK for saved progress first (MUST)
- ALWAYS run the script first (MUST)
- ALWAYS display the dashboard (MUST)
- Use conversational Q&A for decisions (MUST) — NEVER use AskUserQuestion
- SAVE progress after every decision (MUST)
- Show patch suggestions inline (SHOULD)
- Create TDMS entries (MUST) for deferred findings
- Save decisions (MUST) to session log
Compaction Guard
Read
.claude/skills/_shared/ecosystem-audit/COMPACTION_GUARD.mdfor the full compaction guard protocol (state file schema, resume, save, cleanup).
State file path: .claude/tmp/doc-audit-progress.json
Phase 1: Run & Parse
- Run the audit script:
node .claude/skills/doc-ecosystem-audit/scripts/run-doc-ecosystem-audit.js- Parse the v2 JSON output from stdout (progress goes to stderr).
- Create a session decision log file:
- Path:
.claude/tmp/doc-audit-session-{YYYY-MM-DD-HHMM}.jsonl - Create
.claude/tmp/directory if it doesn't exist
- Path:
- Save initial progress state to
.claude/tmp/doc-audit-progress.jsonwithcurrentFindingIndex: 0, the full findings data, score, and grade.
Phase 2: Dashboard Overview (compact)
Present a compact header with composite grade and domain breakdown:
Doc Ecosystem Health: {grade} ({score}/100) | Trend: {sparkline} ({delta})
{errors} errors · {warnings} warnings · {info} info | {patches} patch suggestions
┌──────────────────────────────────────┬───────┬──────────┬──────────────┐
│ Category │ Score │ Rating │ Trend │
├──────────────────────────────────────┼───────┼──────────┼──────────────┤
│ D1: Index & Registry Health │ │ │ │
│ Index-Filesystem Sync │ {s} │ {rating} │ {trend} │
│ Index Metadata Accuracy │ {s} │ {rating} │ {trend} │
│ Orphaned Documents │ {s} │ {rating} │ {trend} │
├──────────────────────────────────────┼───────┼──────────┼──────────────┤
│ D2: Link & Reference Integrity │ │ │ │
│ Internal Link Health │ {s} │ {rating} │ {trend} │
│ Cross-Doc Dependency Accuracy │ {s} │ {rating} │ {trend} │
│ Anchor Reference Validity │ {s} │ {rating} │ {trend} │
│ Image Asset References │ {s} │ {rating} │ {trend} │
├──────────────────────────────────────┼───────┼──────────┼──────────────┤
│ D3: Content Quality & Compliance │ │ │ │
│ Header & Frontmatter Compliance │ {s} │ {rating} │ {trend} │
│ Formatting Consistency │ {s} │ {rating} │ {trend} │
│ Content Freshness │ {s} │ {rating} │ {trend} │
├──────────────────────────────────────┼───────┼──────────┼──────────────┤
│ D4: Generation Pipeline Health │ │ │ │
│ Docs Index Correctness │ {s} │ {rating} │ {trend} │
│ Doc Optimizer Pipeline │ {s} │ {rating} │ {trend} │
│ Pre-commit Doc Checks │ {s} │ {rating} │ {trend} │
├──────────────────────────────────────┼───────┼──────────┼──────────────┤
│ D5: Coverage & Completeness │ │ │ │
│ Documentation Coverage │ {s} │ {rating} │ {trend} │
│ Agent Doc References │ {s} │ {rating} │ {trend} │
│ README & Onboarding │ {s} │ {rating} │ {trend} │
└──────────────────────────────────────┴───────┴──────────┴──────────────┘Rating badges: good = "Good", average = "Avg", poor = "Poor"
Then say: "Found N findings to review. Walking through each one (impact-weighted)..."
Phase 3: Finding-by-Finding Walkthrough
Read
.claude/skills/_shared/ecosystem-audit/FINDING_WALKTHROUGH.mdfor the full walkthrough protocol (finding card, decisions, patches, delegation, batching).
Sort findings by impactScore descending (highest impact first). DEBT entries
use source_id: review:doc-ecosystem-audit-{date}.
Phase 4: Summary & Actions
Read
.claude/skills/_shared/ecosystem-audit/SUMMARY_AND_TRENDS.mdfor the summary template, trend report template, and verification re-run template.
Write report to .claude/tmp/doc-audit-report-{YYYY-MM-DD}.md.
Process verification: Run __tests__/ suite:
node --test .claude/skills/doc-ecosystem-audit/scripts/__tests__/*.test.jsPhase 5: Trend Report (if previous runs exist)
Uses trend report template from
SUMMARY_AND_TRENDS.md.
History: .claude/state/doc-ecosystem-audit-history.jsonl
Phase 6: Self-Audit (Verification)
Uses verification re-run template from
SUMMARY_AND_TRENDS.md.
Re-run script:
node .claude/skills/doc-ecosystem-audit/scripts/run-doc-ecosystem-audit.jsCategory Reference
Domain 1: Index & Registry Health (20% weight)
| Category | What It Checks |
| Index-Filesystem Sync | Every DOCUMENTATION_INDEX.md entry has a matching file on disk and v.v. |
| Index Metadata Accuracy | Titles and descriptions in the index match actual file content |
| Orphaned Documents | Files in docs/ referenced by at least one other document |
Domain 2: Link & Reference Integrity (25% weight)
| Category | What It Checks |
| Internal Link Health | All markdown links text resolve to existing files |
| Cross-Doc Dependency Accuracy | Cross-doc dependency checker exists and rules are valid |
| Anchor Reference Validity | Links with #section anchors point to existing headings |
| Image Asset References | Image references (, <img src>) point to real files |
Domain 3: Content Quality & Compliance (20% weight)
| Category | What It Checks |
| Header & Frontmatter Compliance | Required elements: title heading, Purpose, Version History |
| Formatting Consistency | Heading levels, code block language tags, list markers |
| Content Freshness | Docs not >30 days behind their referenced code files |
Domain 4: Generation Pipeline Health (20% weight)
| Category | What It Checks |
| Docs Index Correctness | npm docs:index script exists, referenced file exists, index valid |
| Doc Optimizer Pipeline | doc-optimizer skill present, state files valid |
| Pre-commit Doc Checks | Doc-related stages present in .husky/pre-commit |
Domain 5: Coverage & Completeness (15% weight)
| Category | What It Checks |
| Documentation Coverage | Major systems (from package.json, directories) have docs |
| Agent Doc References | All docs referenced in CLAUDE.md exist and are non-empty |
| README & Onboarding | README, CLAUDE.md, AI_WORKFLOW.md present and consistent |
Benchmarks & Checker Development
Read
.claude/skills/_shared/ecosystem-audit/CLOSURE_AND_GUARDRAILS.mdfor scoring conventions and the checker development guide.
16 categories. Domain weights: D1=20%, D2=25%, D3=20%, D4=20%, D5=15%.
Data Sources
| Source | Path | Content |
| Documentation Index | DOCUMENTATION_INDEX.md | Master doc listing |
| Documentation files | docs/**/*.md | All documentation |
| Main AI config | CLAUDE.md | AI rules and doc references |
| AI workflow | AI_WORKFLOW.md | Session startup, navigation |
| Pre-commit pipeline | .husky/pre-commit | Doc quality gates |
| Cross-doc deps | scripts/check-cross-doc-deps.js | Dependency rules |
| Doc optimizer | .claude/skills/doc-optimizer/ | Optimizer state and config |
| Package config | package.json | npm scripts for doc tools |
| State files | .claude/state/*.jsonl | Audit history and trends |
Version History
| Version | Date | Description |
| 1.1 | 2026-03-25 | Extract shared patterns to _shared/ecosystem-audit/ |
| 1.0 | 2026-02-24 | Initial implementation |
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
- find-skillsSkill
- add-debtSkill
- alertsSkill
- analyzeSkill
- artifacts-builderSkill
- audit-agent-qualitySkill
- audit-aggregatorSkill
- audit-ai-optimizationSkill
- audit-codeSkill
- audit-comprehensiveSkill
- audit-documentationSkill
- audit-engineering-productivitySkill
- audit-enhancementsSkill
- audit-healthSkill
- audit-performanceSkill
- audit-processSkill
- audit-refactoringSkill
- audit-securitySkill
- brainstormSkill
- checkpointSkill
- code-reviewerSkill
- comprehensive-ecosystem-auditSkill
- content-research-writerSkill
- convergence-loopSkill
- create-auditSkill
- data-effectiveness-auditSkill
- debt-runnerSkill
- decrypt-secretsSkill
- deep-planSkill
- deep-researchSkill
- developer-growth-analysisSkill
- doc-optimizerSkill
- docs-maintainSkill
- document-analysisSkill
- ecosystem-healthSkill
- Excel AnalysisSkill
- find-skillsSkill
- frontend-designSkill
- gh-fix-ciSkill
- github-healthSkill
- health-ecosystem-auditSkill
- hook-ecosystem-auditSkill
- market-research-reportsSkill
- mcp-builderSkill
- media-analysisSkill
- multi-ai-auditSkill
- pre-commit-fixerSkill
- pr-ecosystem-auditSkill
- pr-retroSkill
- pr-reviewSkill
- quick-fixSkill
- recallSkill
- repo-analysisSkill
- repo-synthesisSkill
- script-ecosystem-auditSkill
- session-beginSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

