Document Indexer

VerifiedSafe

Scans markdown files in docs/ and extracts YAML frontmatter to provide just-in-time context without loading full file content.

Sby Skills Guide Bot
DocumentationBeginner
7/23/2026
Claude CodeCursorWindsurf
#documentation-indexing#frontmatter#yaml-metadata#project-docs#context-discovery

Recommended for

Automated summary

Scans all markdown files in a docs/ directory, extracts YAML frontmatter metadata, and returns a structured map for efficient documentation discovery without loading full content.

Strengths

  • Minimizes token usage by only scanning metadata
  • Provides quick overview of documentation structure
  • Flags missing frontmatter for compliance
  • Supports both human-readable and JSON output

Limitations

  • Requires consistent YAML frontmatter across docs
  • Does not index content outside frontmatter
  • Only works if docs/ directory exists
When to use it

At the start of a session or when beginning work on a new issue to quickly identify relevant specs, plans, or retrospectives.

When not to use it

When you already know exactly which document you need, or when the project has no markdown documentation with frontmatter.

Security analysis

Safe
Quality score95/100

The skill runs a bash script that scans local documentation files, extracts YAML frontmatter, and outputs structured information. It does not involve any network calls, destructive actions, or exfiltration. The script is read-only and non-invasive. No security concerns.

No concerns found

How this analysis is made

Examples

Scan project documentation index
Run the doc-indexer to get an overview of all available documentation in the docs/ folder.
Find approved specs for implementation
Scan documentation to find all approved specs that are ready for implementation.
Check for non-compliant docs
Scan the docs/ directory and list any markdown files missing YAML frontmatter.

name: doc-indexer description: Use this skill at the beginning of any session or when needing to understand available project documentation. Provides just-in-time context by scanning YAML frontmatter from all markdown files in the docs/ directory without loading full content.

Document Indexer Skill

Purpose

Provide just-in-time context about available project documentation without loading full file content into the context window. The doc-indexer scans all markdown files in the docs/ directory, extracts their YAML frontmatter metadata, and returns a structured map of available documentation. This enables efficient discovery of specs, plans, retrospectives, and other documentation while minimizing token usage.

When to Use

Use this skill in the following situations:

  • At the beginning of any work session to understand the current state of documentation
  • When starting work on a new issue to identify relevant specs and context
  • Before proposing changes to understand existing specifications
  • When planning a sprint to review available approved specs
  • Anytime you need an overview of project documentation without reading full files

Prerequisites

  • The project must have a docs/ directory
  • Documentation files should follow the convention of including YAML frontmatter
  • The jq tool is NOT required (script works without it)

Workflow

Step 1: Run the Documentation Scanner

Execute the helper script to scan all markdown files in the docs/ directory:

bash scripts/scan-docs.sh

This will output a human-readable summary showing each document's frontmatter metadata.

For machine-readable JSON output (useful for programmatic processing):

bash scripts/scan-docs.sh -j

Step 2: Review the Documentation Map

The scanner returns information about all markdown files found in docs/, including:

  • File path: Location of the documentation file
  • Frontmatter metadata: Key-value pairs from YAML frontmatter (title, status, type, etc.)
  • Compliance warnings: Files missing YAML frontmatter are flagged

Example human-readable output:

---
file: docs/specs/001-synthesis-flow.md
title: SynthesisFlow Methodology
status: approved
type: spec
---
file: docs/changes/my-feature/proposal.md
title: My Feature Proposal
status: in-review
type: proposal
[WARNING] Non-compliant file (no frontmatter): docs/README.md

Example JSON output:

[
  {
    "file": "docs/specs/001-synthesis-flow.md",
    "compliant": true,
    "frontmatter": {
      "title": "SynthesisFlow Methodology",
      "status": "approved",
      "type": "spec"
    }
  },
  {
    "file": "docs/README.md",
    "compliant": false,
    "frontmatter": null
  }
]

Step 3: Use the Map to Identify Relevant Documentation

Based on the documentation map, identify which specific files to read for your current task:

  • For implementation work: Look for approved specs related to your issue
  • For spec proposals: Review existing specs to understand the current state
  • For sprint planning: Identify approved specs ready for implementation
  • For learning context: Find retrospectives and design docs

Step 4: Read Specific Documentation Files

Once you've identified relevant files from the map, use the Read tool to load their full content:

# Example: Read a specific spec identified from the map
Read docs/specs/001-synthesis-flow.md

This two-step approach (scan first, then read selectively) minimizes token usage while ensuring you have access to all necessary context.

Error Handling

No docs/ Directory

Symptom: Script reports "No such file or directory"

Solution:

  • Verify you're in the project root directory
  • Check if the project has been initialized with project-init skill
  • Create docs/ directory structure if needed

Files Missing Frontmatter

Symptom: Script outputs "[WARNING] Non-compliant file (no frontmatter): ..."

Impact: These files won't have structured metadata in the output

Solution:

  • Add YAML frontmatter to documentation files for better discoverability
  • Frontmatter should be at the top of the file between --- markers
  • Example format:
    ---
    title: My Document
    status: draft
    type: design
    ---
    
    # Document content starts here
    

Script Permission Errors

Symptom: "Permission denied" when running the script

Solution:

chmod +x scripts/scan-docs.sh

Output Interpretation Guide

Frontmatter Fields

Common frontmatter fields you'll encounter:

  • title: Human-readable document title
  • status: Document state (draft, in-review, approved, archived)
  • type: Document category (spec, proposal, design, retrospective, plan)
  • epic: Associated epic issue number
  • sprint: Sprint identifier
  • author: Document author
  • created: Creation date
  • updated: Last update date

Using JSON Output Programmatically

The JSON output mode is particularly useful when:

  • Filtering documents by specific criteria (e.g., only approved specs)
  • Counting documents by type or status
  • Building automated workflows
  • Integrating with other tools

Example using jq to filter approved specs:

bash scripts/scan-docs.sh -j | jq '.[] | select(.frontmatter.status == "approved")'

Notes

  • The scanner is non-invasive and read-only - it never modifies files
  • Large projects with many docs benefit most from this just-in-time approach
  • The script scans recursively through all subdirectories in docs/
  • Empty frontmatter sections are treated as non-compliant
  • The scan is fast and can be run frequently without performance concerns
  • Consider running this at the start of each work session to stay current with documentation changes

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/document-indexer-mrwak9oq/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/document-indexer-mrwak9oq' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/document-indexer-mrwak9oq/download' --output '.skill-downloads/document-indexer-mrwak9oq/SKILL.md.part' && mv '.skill-downloads/document-indexer-mrwak9oq/SKILL.md.part' '.skill-downloads/document-indexer-mrwak9oq/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Original excerpt: Prerequisites
  • The project must have a docs/ directory
  • Documentation files should follow the convention of including YAML frontmatter
  • The jq tool is NOT required (script works without it)

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/document-indexer-mrwak9oq/SKILL.md' && test -s '.skill-downloads/document-indexer-mrwak9oq/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/doc-indexer' && cp -R '.skill-downloads/document-indexer-mrwak9oq' '.claude/skills/doc-indexer'

Cursor
test -f '.skill-downloads/document-indexer-mrwak9oq/SKILL.md' && test -s '.skill-downloads/document-indexer-mrwak9oq/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/doc-indexer' && cp -R '.skill-downloads/document-indexer-mrwak9oq' '.cursor/skills/doc-indexer'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/document-indexer-mrwak9oq'

openskills read 'document-indexer-mrwak9oq'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/document-indexer-mrwak9oq/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills