From docmap
Navigate markdown, PDF, and YAML documentation structure without reading full files. Use before opening any large .md file, to locate specific constructs (code blocks, callouts, tables), to jump to a line number's context, or to see what changed in docs since a git ref.
How this skill is triggered — by the user, by Claude, or both
Slash command
/docmap:docmapThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`docmap` is a local CLI that turns a markdown file into a typed AST and surfaces every construct as a jump target. Use it as your **first read** of any documentation you haven't seen before.
docmap is a local CLI that turns a markdown file into a typed AST and surfaces every construct as a jump target. Use it as your first read of any documentation you haven't seen before.
Reach for docmap when any of these is true:
Read a markdown file larger than ~200 linesDo not invoke docmap for:
docmap .
docmap docs/
Returns a project-wide inventory header (total callouts, code blocks, tables, tasks, etc.) plus a one-line digest per file. Use this to decide which file to drill into.
docmap README.md
Returns a dense tree where each section carries an inline annotation of its notable contents. Every construct has a :line jump target.
docmap file.md --type <kind>
Valid kinds: code, callout, table, math, footnote, deflist, linkref, html, task, wiki, embed, mention, issue, sha, emoji.
Sub-filters:
docmap file.md --type code --lang python
docmap file.md --type callout --kind warning
Output lists every matching construct grouped by containing section, with exact line ranges.
docmap file.md --at 154
Returns the section breadcrumb and node type at line 154. Use this when you have a line number from anywhere (grep, diff, error, LSP) and need to know what it actually is.
docmap file.md --since HEAD~5
docmap file.md --since main
Shows only the constructs that sit on lines modified since the given git ref. Uses git diff --unified=0 under the hood.
docmap file.md --search "python"
docmap . --search "warning"
Searches section titles and content plus the typed AST: code block languages, callout variants, table headers, math TeX, footnote IDs, link labels, HTML content. Much broader than a plain grep.
docmap file.md --section "Installation" # Just that subtree
docmap file.md --expand "Installation" # Raw content of that section
docmap . --refs
Shows which docs link to which other docs — useful for understanding doc graph topology.
docmap file.md --json
docmap . --json | jq '.documents[] | select(.summary.code_blocks > 10)'
Full typed AST including per-section notables, top-level summary counts, and every node with its kind + line range. Pipe into jq or another tool.
The header box shows the file's full inventory:
╭──── file.md ────╮
│ Sections: 30 │ ~2.3k tokens │
│ 5 callouts · 4 tables · 8 code blocks · 2 math │
│ 6 tasks (3 done) · 4 wiki · 6 embeds │
╰──────────────────────────────────────────────────╯
Every section line in the tree has the shape:
├── <title> (<tokens>) · <annotation>
Where <annotation> packs every notable construct in that section:
go :142-149, python :154-156, bash :161-162 — code blocks by language and line rangenote :219, tip :222, warning :228 — callouts by variant and line4 tables :108 Name, :116 Left, :123 Field — tables with first-header identification^1 :276, ^bignote :277 — footnote definitions by ID6 tasks (3 done) — aggregate task list counts4 wiki · 6 embeds — Obsidian aggregate countsThe :NNN format is a 1-indexed source line. Same convention as grep, ripgrep, vim, and compiler errors. :154-156 means "lines 154 through 156."
Workflow: skim before read
docmap unfamiliar.md # Get the structure
docmap unfamiliar.md --at 247 # What's at the section I care about?
# Now do a targeted Read on just lines 240-280
Workflow: find every instance of a construct
docmap huge-doc.md --type code --lang go # Every Go snippet
docmap huge-doc.md --type callout --kind warning # Every warning
Workflow: understand changes
git checkout feature-branch
docmap docs/api.md --since main # What did this PR change?
Workflow: project-wide discovery
docmap . # Header shows aggregate totals
# "there are 41 code blocks and 18 callouts in this repo"
# Decide which file is worth opening based on the per-file digest
Workflow: structured consumption
docmap file.md --json | jq '.documents[0].nodes[] | select(.kind == "code_block")'
Full CommonMark + GitHub Flavored Markdown + Obsidian extensions. Block constructs: frontmatter (YAML/TOML/JSON), ATX + Setext headings, paragraphs, blockquotes, GFM callouts (5 kinds), ordered/unordered/task lists, tables with alignment, fenced + indented code blocks, math blocks, footnote definitions, definition lists, HTML blocks, thematic breaks, link reference definitions. Inline constructs: links, autolinks (angle-bracket + GFM bare + email), images, emphasis/strong/strikethrough, inline code, inline math, footnote refs, wiki links ([[…]]), wiki embeds (![[…]]), mentions (@user), issue refs (#123, user/repo#123, GH-123), commit SHAs, emoji shortcodes, HTML entities.
codemap . # code structure (filesystem + symbols)
docmap . # doc structure (sections + notables)
Together, they give an agent full spatial awareness of a repository without reading any source file first.
npx claudepluginhub jordancoin/docmap --plugin docmapSearches markdown knowledge bases via GitMark CLI (FTS5 BM25 + trigram/fuzzy matching). Use to find where something is documented instead of random file reads.
Retrieves small relevant snippets from Markdown docs via local BM25/grep search. Use for answering questions from project docs or finding headings across files when paths are unknown. Prefer over reading whole files or raw grep.
Token-optimized structural code search using tree-sitter AST parsing. Use instead of reading full files to understand code structure, find functions, or explore a codebase efficiently.