Help us improve
Share bugs, ideas, or general feedback.
From docs-guardian
Maps source code files to documentation counterparts using config, framework conventions (MkDocs, VitePress, etc.), naming patterns, or inline docs. Detects coverage gaps.
npx claudepluginhub xiaolai/claude-plugin-marketplace --plugin docs-guardianHow this skill is triggered — by the user, by Claude, or both
Slash command
/docs-guardian:mappingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A **mapping** is a pair: `(source_file, doc_file)`. The audit pipeline resolves all mappings before dispatching to agents. Four strategies are applied in priority order.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
Share bugs, ideas, or general feedback.
A mapping is a pair: (source_file, doc_file). The audit pipeline resolves all mappings before dispatching to agents. Four strategies are applied in priority order.
User-defined mappings in .claude/docs-guardian/config.json:
{
"mappings": [
{ "source": "src/auth/**/*.ts", "doc": "docs/api/auth.md" },
{ "source": "src/db/models/*.py", "doc": "docs/models/${name}.md" }
]
}
The ${name} placeholder expands to the source file's basename without extension.
Glob patterns are supported in source. The doc field can be a literal path or use ${name}.
Each framework adapter knows its own mapping convention:
| Framework | Convention |
|---|---|
| MkDocs | mkdocs.yml nav entries → doc paths under docs_dir |
| VitePress | .vitepress/config sidebar entries → doc paths |
| Docusaurus | sidebars.js entries → doc paths under docs/ |
| Sphinx | toctree directives → .rst files under source/ |
| Plain Markdown | Convention-based (see Strategy 3) |
When no config or framework mapping exists, use naming conventions:
| Source Path | Doc Path |
|---|---|
src/foo/bar.ts | docs/foo/bar.md |
src/foo/bar.ts | docs/api/foo/bar.md |
lib/foo.py | docs/foo.md |
pkg/foo/bar.go | docs/foo/bar.md |
src/foo/mod.rs | docs/foo.md |
Try each candidate in order. First existing file wins.
If no doc file exists for a source file, record it as unmapped (potential coverage gap).
Some symbols are documented inline (docstrings, JSDoc, godoc comments) rather than in separate doc files. When a source file has no external doc mapping but contains inline documentation:
INFO that docs are inline-only (not necessarily a problem)MEDIUM coverage gapReturn an array of resolved mappings:
[
{
"source": "src/auth/login.ts",
"doc": "docs/api/auth.md",
"strategy": "config",
"confidence": "high"
},
{
"source": "src/utils/hash.ts",
"doc": null,
"strategy": "unmapped",
"confidence": "none"
}
]