agentsclimarketplace

Mapping

Skill xiaolai/docs-guardian-for-claude/skills/docs-guardian/mapping

Use when mapping source code files to their documentation counterparts — find which docs cover which code, detect gaps, and resolve doc-to-code relationships.From its SKILL.md

Install
npx -y skills add xiaolai/docs-guardian-for-claude --skill mapping

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.5 KB, as published. Nobody here has run it

Code-to-Doc Mapping

Overview

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.

Strategy 1: Config-Based (Highest Priority)

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}.

Strategy 2: Framework-Derived

Each framework adapter knows its own mapping convention:

FrameworkConvention
MkDocsmkdocs.yml nav entries → doc paths under docs_dir
VitePress.vitepress/config sidebar entries → doc paths
Docusaurussidebars.js entries → doc paths under docs/
Sphinxtoctree directives → .rst files under source/
Plain MarkdownConvention-based (see Strategy 3)

Strategy 3: Convention-Based

When no config or framework mapping exists, use naming conventions:

Source PathDoc Path
src/foo/bar.tsdocs/foo/bar.md
src/foo/bar.tsdocs/api/foo/bar.md
lib/foo.pydocs/foo.md
pkg/foo/bar.godocs/foo/bar.md
src/foo/mod.rsdocs/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).

Strategy 4: Inline-Doc (Lowest Priority)

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:

  • Still count the inline docs toward coverage
  • Flag as INFO that docs are inline-only (not necessarily a problem)
  • If the framework expects external docs, flag as MEDIUM coverage gap

Mapping Output

Return 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"
  }
]

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.