doc-indexer

Scans markdown files in docs/ and extracts YAML frontmatter into a structured documentation map.

Updated Jul 13, 2024
One-click install
npx skills add https://github.com/Reading-Advantage-Thailand/codecamp-advantage --skill doc-indexer-reading-advantage-thailand
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: doc-indexer
Source: https://github.com/Reading-Advantage-Thailand/codecamp-advantage/tree/main/.claude/skills/doc-indexer
Command: npx skills add https://github.com/Reading-Advantage-Thailand/codecamp-advantage --skill doc-indexer-reading-advantage-thailand

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Reading every project document to find relevant specs or plans wastes context window tokens. This Skill indexes all markdown files in the docs/ directory by extracting only their YAML frontmatter, giving you a lightweight map of available documentation before deciding what to read in full. ## Core Features & Use Cases - Frontmatter Scanning: Recursively finds all markdown files under docs/ and extracts YAML frontmatter metadata such as title, status, and type. - Dual Output Modes: Produces a human-readable summary by default or a JSON array with the -j flag for programmatic filtering with tools like jq. - Compliance Warnings: Flags markdown files missing YAML frontmatter so documentation standards can be enforced. - Use Case: At the start of a work session, run the scanner to list all approved specs, then read only the two or three files relevant to your current issue instead of loading the entire docs/ tree. ## Quick Start Scan the docs directory and show me a map of all available documentation with its frontmatter metadata.

Frequently Asked Questions about doc-indexer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan markdown files for YAML frontmatter?▼

Run the scan-docs.sh script from the project root with bash scripts/scan-docs.sh. It recursively finds all markdown files under docs/ and prints each file's frontmatter metadata, or warns when a file has none.

How to get JSON output from markdown frontmatter extraction?▼

Pass the -j flag to the script: bash scripts/scan-docs.sh -j. It returns a JSON array where each entry contains the file path, a compliance flag, and the parsed frontmatter fields, which you can filter with jq.

Does the frontmatter scanner require jq to be installed?▼

No, jq is not required. The script generates JSON output using only bash, awk, and sed. jq is only needed if you want to filter or query the JSON output afterward, such as selecting documents by status.

Why does the script warn about non-compliant markdown files?▼

A file is flagged as non-compliant when it has no YAML frontmatter block between --- markers at the top, or when the frontmatter section is empty. Adding frontmatter with fields like title, status, and type makes the file discoverable in the index.

What are the limitations of shell-based YAML frontmatter parsing?▼

The script parses only simple key-value pairs split on the first colon and does not support nested YAML structures, lists, or multi-line values. It is read-only and suited for flat metadata like title, status, and type fields.