doc-coverage
Detect missing documentation in code (XML docs, docstrings, JSDoc) and project files (CHANGELOG gaps). Produces coverage reports with specific gaps by file and symbol. Use for pre-PR validation, CI gates, or documentation audits.
- License 许可
- MIT
- 最近更新
- 2026-03-11
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- doc-coverage
- model
- claude-sonnet-4-5
- agents
- [ "qa", "implementer", "analyst" ]
- license
- MIT
- metadata
- { "version": "1.0.0" }
- description
- Detect missing documentation in code (XML docs, docstrings, JSDoc) and project files (CHANGELOG gaps). Produces coverage reports with specific gaps by file and symbol. Use for pre-PR validation, CI gates, or documentation audits.
02 资源文件 140
- 其他.build-trigger24 B
- 其他articles/.gitkeep—
- 参考文档articles/7-tech-innovations-driving-a-nature-positive-transition.md5.4 KB
- 参考文档articles/acer-swift-edge-challenges-macbook-air-with-powerful-features.md5.1 KB
- 参考文档articles/ai-agents-market-to-hit-50-billion-by-2030-ensuring-quality.md5.6 KB
- 参考文档articles/ai-built-personalized-game-worlds-and-studios.md5.5 KB
- 参考文档articles/ai-data-centers-local-trust-australia-anthropic.md6.1 KB
- 参考文档articles/ai-decoding-ancient-history-dead-sea-scrolls.md4.9 KB
- 参考文档articles/ai-driven-large-quantitative-models-revolutionize-drug-discovery.md6.4 KB
- 参考文档articles/ai-drug-discovery-hype-vs-reality.md5.7 KB
- 参考文档articles/ai-explain-fermi-paradox-quiet-expansion.md6.4 KB
- 参考文档articles/ai-firm-stop-hiring-humans-campaign-sparks-job-displacement-fears.md5.6 KB
- 参考文档articles/ai-flame-resistance-testing-materials.md5.5 KB
- 参考文档articles/ai-game-development-market-quadruple-2035.md5.0 KB
- 参考文档articles/ai-game-development-procedural-content-market-2035.md6.3 KB
- 参考文档articles/ai-migraine-prediction-precision.md5.1 KB
- 参考文档articles/ai-powered-game-development-market-surge-28-billion-2035.md5.9 KB
- 参考文档articles/ai-scientists-show-promise-but-cant-replace-human-research.md6.0 KB
- 参考文档articles/ai-scientists-show-promise-but-hit-fundamental-limits.md6.2 KB
- 参考文档articles/ai-solves-370-year-old-cypher.md4.7 KB
- 参考文档articles/ai-tools-planning-summer-trip.md5.4 KB
- 参考文档articles/ai-tutors-learn-to-coach-not-just-answer-questions.md5.0 KB
- 参考文档articles/ais-impact-on-jobs-understanding-the-economic-realities.md5.3 KB
- 参考文档articles/americas-oil-emergency-fund-low.md4.6 KB
- 参考文档articles/anthropic-faults-claude-ai-for-legal-filing-error.md5.9 KB
- 参考文档articles/ao3-status-updates-and-outages-information.md5.0 KB
- 参考文档articles/apple-ai-photo-tools-wwdc-spatial-reframing.md5.4 KB
- 参考文档articles/apple-removes-iceblock-app-from-app-store.md5.2 KB
- 参考文档articles/brad-pitt-sobriety-relapse.md5.3 KB
- 参考文档articles/brain-like-ai-architecture-slashes-energy-use-while-learning.md5.3 KB
- 参考文档articles/burger-king-whopper-guarantee.md4.9 KB
- 参考文档articles/can-venture-capital-fund-the-next-innovation-wave.md11.0 KB
- 参考文档articles/care-for-women-drives-health-system-redesign.md10.8 KB
- 参考文档articles/challenges-ahead-for-us-battery-industry-growth.md5.1 KB
- 参考文档articles/china-joins-race-to-discover-life-on-mars.md5.4 KB
- 参考文档articles/cityu-unveils-game-changing-building-skins-hydrogen-tech.md5.1 KB
- 参考文档articles/clear-winners-amid-economic-chaos-and-key-market-news.md10.1 KB
- 参考文档articles/coinbase-support-agents-involved-in-customer-data-theft.md5.6 KB
- 参考文档articles/corporate-vs-influencer-life-bengaluru-women.md7.8 KB
- 参考文档articles/cyber-resilience-requires-practical-collective-cooperation.md12.2 KB
- 参考文档articles/deepfake-porn-the-trauma-of-seeing-your-body-misused.md10.7 KB
- 参考文档articles/deepseek-elastic-compute-ai-agent-training.md5.6 KB
- 参考文档articles/discover-audio-technicas-transparent-at-lpa2-turntable.md5.1 KB
- 参考文档articles/do-larger-ai-models-enhance-stock-picking-accuracy.md5.6 KB
- 参考文档articles/driven-automotive-streaming-platform-jenson-button-ben-collins.md7.6 KB
- 参考文档articles/dublin-engineer-builds-personal-brand-tech-writing-advocacy.md5.8 KB
- 参考文档articles/effective-strategies-to-revamp-humanitarian-aid-for-crisis-support.md6.7 KB
- 参考文档articles/effortlessly-switch-to-apple-music-with-new-transfer-tool.md4.9 KB
- 参考文档articles/emotional-privacy-ai-ethics-debate.md5.3 KB
- 参考文档articles/empowering-climate-narratives-shifting-from-fear-to-action.md5.5 KB
- 参考文档articles/european-defense-trends-capturing-global-attention.md5.7 KB
- 参考文档articles/exercise-perimenopause-symptoms-low-pressure-plan.md6.3 KB
- 参考文档articles/exploring-kenyas-carbon-valley-innovative-climate-change-solution.md5.5 KB
- 参考文档articles/exploring-the-quantum-roots-of-reality-with-brian-cox.md4.0 KB
- 参考文档articles/first-personalized-gene-editing-drug-saves-baby-boy.md6.3 KB
- 参考文档articles/fortnite-ios-unavailability-global-impact-explained.md5.9 KB
- 参考文档articles/fujifilm-x-half-camera-embraces-analog-with-no-raw-shooting.md5.3 KB
- 参考文档articles/future-of-chinese-open-source-ai-innovations-and-trends.md6.0 KB
- 参考文档articles/future-of-ev-batteries-innovations-and-trends-by-2026.md1.8 KB
- 参考文档articles/google-allows-experienced-users-to-continue-sideloading-android-apps.md5.3 KB
- 参考文档articles/google-gemini-delay-ai-investor-trust.md5.2 KB
- 参考文档articles/google-i-o-2025-guide-watch-live-and-key-highlights.md5.4 KB
- 参考文档articles/grieving-old-body-chronic-illness.md5.3 KB
- 参考文档articles/groks-white-genocide-obsession-linked-to-unauthorized-alterations.md5.6 KB
- 参考文档articles/hidden-ai-systems-guide-hospital-care-without-fda-oversight.md5.9 KB
- 参考文档articles/hidden-geometry-kernel-methods-data-separation.md5.2 KB
- 参考文档articles/hong-kong-scientists-paint-powers-buildings-cheap-hydrogen.md5.8 KB
- 参考文档articles/how-ai-agents-transform-business-administration-efficiency.md6.1 KB
- 参考文档articles/how-companies-are-adapting-growth-strategies-amid-global-risks.md6.5 KB
- 参考文档articles/huawei-watch-unveils-innovative-fingertip-sensor-technology.md5.2 KB
- 参考文档articles/human-centered-ai-principles-guide.md4.8 KB
- 参考文档articles/hummer-evs-king-crab-rear-steering-enhances-maneuverability.md5.6 KB
- 参考文档articles/inside-tescos-birthday-cake-sandwich-a-unique-celebration-treat.md5.6 KB
- 参考文档articles/instagram-chief-warns-dont-trust-your-eyes-for-reality.md4.9 KB
- 参考文档articles/is-europe-ready-for-a-surge-in-private-credit.md5.7 KB
- 参考文档articles/jade-raymond-departs-playstation-studio-she-established.md5.1 KB
- 参考文档articles/jeff-bezos-joins-ai-startup-project-prometheus-as-co-ceo.md4.2 KB
- 参考文档articles/living-with-a-u-s-ban-for-combatting-online-hate.md5.7 KB
- 参考文档articles/long-term-impacts-of-britains-quantitative-tightening-explained.md5.4 KB
- 参考文档articles/medium-app-distraction-free-expert-content-hub.md5.1 KB
- 参考文档articles/metas-strategic-ai-investments-playing-with-house-money.md5.5 KB
- 参考文档articles/micron-prioritizes-ai-market-shuts-down-crucial-ram-and-ssds.md6.3 KB
- 参考文档articles/microscopic-noise-fools-cancer-ai-models.md5.0 KB
- 参考文档articles/microsoft-dismisses-two-employees-after-office-protest.md5.4 KB
- 参考文档articles/microsoft-shifts-surface-manufacturing-away-from-china.md4.1 KB
- 参考文档articles/mit-startup-nuclear-reactor-tech-data-center-cooling.md5.9 KB
- 参考文档articles/nasa-completes-roman-space-telescope-mirror-next-space-era.md5.2 KB
- 参考文档articles/nasa-roman-space-telescope-mirror-inspection-complete.md4.6 KB
- 参考文档articles/navigating-founder-conflicts-building-stronger-startup-teams.md3.7 KB
- 参考文档articles/netflix-to-use-ai-for-seamless-ad-break-experience.md5.4 KB
- 参考文档articles/newsguard-exposes-uncensored-ai-chatbot-promoting-conspiracies.md5.7 KB
- 参考文档articles/nuclear-inspired-cooling-tech-ai-data-centers.md6.8 KB
- 参考文档articles/overcoming-barriers-to-strategic-foresight-essential-steps-forward.md5.4 KB
- 参考文档articles/peloton-acquires-pilates-platform-skop-engagement-surge.md5.4 KB
- 参考文档articles/peloton-acquires-skop-pilates-reformer-strategic-pivot.md4.9 KB
- 参考文档articles/pension-funds-and-gilts-understanding-the-impact.md5.3 KB
- 参考文档articles/pinterest-explains-mass-account-bans-due-to-internal-error.md4.8 KB
- 参考文档articles/puckipuppy-fat-tire-ebikes-urban-riders-dog-names.md5.5 KB
- 参考文档articles/rainbow-six-siege-servers-closed-after-ubisoft-hack.md5.8 KB
- 参考文档articles/regulatory-shortcuts-peptides-need-to-know.md5.1 KB
- 参考文档articles/science-flags-ai-chatbot-conspiracy-theory-research.md4.9 KB
- 参考文档articles/smartwatch-tracks-blood-pressure-continuously-without-cuffs.md5.3 KB
- 参考文档articles/starlink-vs-chinese-satellites-near-collision-incident-explained.md5.9 KB
- 参考文档articles/strategies-to-transform-the-5-trillion-green-economy-for-growth.md5.4 KB
- 参考文档articles/targets-halloween-costume-controversy.md4.7 KB
- 参考文档articles/teen-bedroom-coders-created-developer-culture-2.md5.9 KB
- 参考文档articles/teen-bedroom-coders-created-developer-culture.md5.9 KB
- 参考文档articles/teslas-graphics-upgrade-unreal-engine-integration-explained.md5.7 KB
- 参考文档articles/the-evolution-of-language-uncovering-its-origins.md5.4 KB
- 参考文档articles/the-future-of-ivf-innovations-access-and-new-possibilities.md12.4 KB
- 参考文档articles/the-most-misunderstood-ai-graph-explained.md5.2 KB
- 参考文档articles/threads-enhances-profiles-with-expanded-bio-link-options.md5.1 KB
- 参考文档articles/three-person-ivf-trial-successfully-results-in-births.md5.5 KB
- 参考文档articles/tiktok-go-expands-travel-booking-us-japan.md5.0 KB
- 参考文档articles/tiktok-go-travel-booking-expansion-us-japan.md5.4 KB
- 参考文档articles/tiktok-introduces-guided-meditation-for-teens-after-10pm.md5.0 KB
- 参考文档articles/tiktoks-explosive-us-debut-record-breaking-first-weekend.md5.0 KB
- 参考文档articles/tim-sweeney-criticizes-apple-for-allowing-fortnite-clones.md5.3 KB
- 参考文档articles/tinder-ai-enhances-matches-by-analyzing-camera-roll-photos.md5.6 KB
- 参考文档articles/top-6-announcements-from-meta-connect-2025.md4.6 KB
- 参考文档articles/trump-fundraisers-sought-microsoft-white-house-ballroom-donation.md5.1 KB
- 参考文档articles/trump-urges-apple-to-halt-iphone-production-in-india.md5.8 KB
- 参考文档articles/us-to-resume-nuclear-weapons-testing-trump-announces.md6.1 KB
- 参考文档articles/use-ai-as-tutor-not-crutch.md6.6 KB
- 参考文档articles/using-ai-well-takes-skill.md5.9 KB
- 参考文档articles/valve-steam-machine-vulkan-certification-database.md6.0 KB
- 参考文档articles/volvo-seatbelts-adapt-using-real-time-data-for-body-types.md5.5 KB
- 参考文档articles/walmart-cfo-forecasts-imminent-price-increases-this-month.md6.1 KB
- 参考文档articles/warner-bros-discovery-unveils-cinematic-universe-for-brand-collaborations.md6.1 KB
- 参考文档articles/why-companies-relocate-to-dallas-mayor-johnson.md5.3 KB
- 参考文档articles/windows-on-arm-transforms-gaming-experience-with-major-updates.md4.7 KB
- 参考文档articles/wooting-60he-v2-enhanced-speed-and-sound-for-gamers.md4.9 KB
- 参考文档articles/xbox-ceo-weighs-exclusivity-strategy-shift-platform-criticism.md5.4 KB
- 参考文档articles/yann-lecuns-bold-move-against-large-language-models.md5.2 KB
- 参考文档articles/youtube-launches-podcast-chart-joe-rogan-ranks-top.md6.0 KB
- 参考文档articles/zoom-text-on-chrome-android-without-changing-webpage-layout.md6.1 KB
- 资产文件assets/.gitkeep—
- 参考文档dedup-index.json19.9 KB
- 脚本scripts/check_docs.ts15.2 KB
- 参考文档site.yaml4.9 KB
03 SKILL.md 正文
Documentation Coverage
Detect missing documentation across code and project files with coverage metrics.
Triggers
check documentation coveragefind missing docsvalidate API documentationcheck XML doc commentsrun doc coverage scan
Quick Start
# Check all files in current directory
bun run ${CLAUDE_SKILL_DIR}/scripts/check_docs.ts --target .
# Check only changed files (CI mode)
bun run ${CLAUDE_SKILL_DIR}/scripts/check_docs.ts --git-staged
# Check specific files
bun run ${CLAUDE_SKILL_DIR}/scripts/check_docs.ts src/models/user.cs src/services/auth.py
# JSON output for automation
bun run ${CLAUDE_SKILL_DIR}/scripts/check_docs.ts --target . --format json --output coverage.json
# Set minimum threshold
bun run ${CLAUDE_SKILL_DIR}/scripts/check_docs.ts --target . --min-coverage 80
Evidence
Created based on analysis of moq.analyzers closed PR reviewer patterns:
- 8.9% of human reviewer feedback (10 of 112 comments) addressed documentation gaps
- Common patterns: Missing XML doc comments, CHANGELOG not updated, undocumented public APIs
- Examples: "Missing XML doc comments", "Update CHANGELOG.md", "Public API needs documentation"
Source: Analysis of closed PR reviewer patterns.
Documentation Types Checked
C# XML Documentation
| Element | Check | Example |
|---|---|---|
<summary> |
Required on public types, methods, properties | /// <summary>Description</summary> |
<param> |
Required for each parameter | /// <param name="id">The ID</param> |
<returns> |
Required for non-void methods | /// <returns>Result description</returns> |
<exception> |
Recommended for thrown exceptions | /// <exception cref="ArgumentNullException"> |
Python Docstrings
| Element | Check | Example |
|---|---|---|
| Module docstring | Required at top of file | """Module description.""" |
| Function docstring | Required for public functions | """Function description.""" |
| Class docstring | Required for public classes | """Class description.""" |
| Args section | Recommended (Google style) | Args:\n param: Description |
JavaScript/TypeScript JSDoc
| Element | Check | Example |
|---|---|---|
| Function JSDoc | Required for exported functions | /** @description ... */ |
| Class JSDoc | Required for exported classes | /** @class ... */ |
@param |
Required for each parameter | @param {string} name |
@returns |
Required for non-void functions | @returns {number} |
CHANGELOG Coverage
| Check | Description |
|---|---|
| Entry exists | PRs with breaking changes have CHANGELOG entry |
| Version section | Current version has section in CHANGELOG.md |
| Date format | Entries follow consistent date format |
When to Use
Use this skill when:
- Preparing code for PR submission (catch documentation gaps before review)
- Setting up CI gates for documentation quality
- Auditing existing codebase documentation coverage
- Enforcing documentation standards on public APIs
Use doc-sync instead when:
- Syncing CLAUDE.md navigation files
- Updating architecture documentation in README files
- Not checking code-level documentation
Output Formats
Text (default)
Documentation Coverage Report
=============================
Overall Coverage: 73.2% (below 80% threshold)
Gaps Found: 12
src/services/auth.cs:45:AuthenticateUser
- Missing: <summary> on public method
- Missing: <param name="credentials">
src/models/user.py:12:User
- Missing: class docstring
CHANGELOG.md
- Missing: entry for breaking change in v2.1.0
JSON
{
"coverage_percent": 73.2,
"threshold": 80,
"passed": false,
"total_symbols": 156,
"documented_symbols": 114,
"gaps": [
{
"file": "src/services/auth.cs",
"line": 45,
"symbol": "AuthenticateUser",
"type": "method",
"missing": ["summary", "param:credentials"]
}
]
}
Markdown
Produces a markdown report suitable for PR comments or documentation.
Configuration
Create .doccoveragerc.json in project root:
{
"min_coverage_percent": 80,
"check_public_only": true,
"check_changelog": true,
"exclude_patterns": [
"**/tests/**",
"**/test_*.py",
"**/*.Tests.cs",
"**/dist/**",
"**/node_modules/**"
],
"languages": {
"csharp": {
"require_summary": true,
"require_param": true,
"require_returns": true,
"require_exception": false
},
"python": {
"style": "google",
"require_module_docstring": true,
"require_args_section": false
},
"javascript": {
"require_jsdoc": true,
"require_param": true,
"require_returns": true
}
}
}
Exit Codes
| Code | Meaning | Action |
|---|---|---|
| 0 | Coverage meets threshold | Proceed with PR |
| 10 | Coverage below threshold | Add documentation |
| 1 | Error (file not found, parse error) | Fix error |
Integration
Pre-commit Hook
# .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: doc-coverage
name: Documentation Coverage
entry: bun run .claude/skills/doc-coverage/scripts/check_docs.ts --git-staged --min-coverage 80
language: system
pass_filenames: false
GitHub Actions
# .github/workflows/docs.yml
name: Documentation Coverage
on: [pull_request]
jobs:
doc-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check documentation coverage
run: |
bun run .claude/skills/doc-coverage/scripts/check_docs.ts \
--target . \
--min-coverage 80 \
--format json \
--output coverage.json
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: doc-coverage
path: coverage.json
Anti-Patterns
| Avoid | Why | Instead |
|---|---|---|
| Requiring 100% coverage | Leads to low-quality filler docs | Set realistic threshold (80%) |
| Checking test files | Test docs are less critical | Exclude test patterns |
| Ignoring CHANGELOG | Breaking changes need documentation | Enable changelog checks |
| No configuration | One size doesn't fit all | Use .doccoveragerc.json |
Verification
After running:
- [ ] Coverage percentage reported
- [ ] All gaps have file:line:symbol location
- [ ] Exit code matches coverage status
- [ ] Configuration file respected (if present)
Scripts
| Script | Purpose | Exit Codes |
|---|---|---|
scripts/check_docs.ts |
Main documentation coverage scanner | 0=pass, 10=below threshold, 1=error |
Extension Points
- New languages: Add parser in
check_docs.tsfor additional languages - Custom checks: Add project-specific documentation requirements
- Report formats: Add SARIF or other CI-friendly formats
- Threshold by type: Different thresholds for classes vs methods
Related Skills
| Skill | Relationship |
|---|---|
| style-enforcement | Complements with code style checks |
| code-qualities-assessment | Broader quality assessment including docs |
| analyze | Deep codebase analysis including doc patterns |
04 同仓库更多 Skills
validation-authority
Treat upstream validators as authoritative. Align local config to them. Use when validation fails unexpectedly, before modifying validator behavior, or when tempted to change upstream tool code.
using-brain-memory
Guidance for using Brain semantic memory effectively. Applies Zettelkasten atomic note principles with observations and relations. Use when deciding whether to query or create notes, structuring note content, or understanding the semantic knowledge graph.
threat-modeling
Structured security analysis using OWASP Four-Question Framework and STRIDE methodology. Generates threat matrices with risk ratings, mitigations, and prioritization. Use for attack surface analysis, security architecture review, or when asking what can go wrong.
taste-lints
Custom lints with agent-readable remediation instructions. Enforces taste invariants (file size, naming conventions, structured logging, complexity) and surfaces errors that agents can act on directly. Use when writing or reviewing code to catch style violations early.
style-enforcement
Validate code against style rules from .editorconfig, StyleCop.json, and Directory.Build.props. Detects line ending violations, naming convention issues, indentation problems, and charset mismatches across C#, Python, TypeScript, and JavaScript. Produces JSON reports for pre-commit hooks and CI pipelines.
steering-matcher
Match file paths against steering file glob patterns to determine applicable steering guidance. Use when orchestrator needs to inject context-aware guidance based on files being modified.