Get the FREE Ultimate OpenClaw Setup Guide →

Doc Navigator

npx machina-cli add skill georgekhananaev/claude-skills-vault/doc-navigator --openclaw
Files (1)
SKILL.md
4.4 KB

Doc Navigator

Navigate codebase documentation efficiently by checking known doc locations first, before resorting to grep/glob searches.

When to Use

  • Finding architectural decisions (ADRs)
  • Locating feature specs or API docs
  • Researching codebase before implementation
  • Suggesting documentation structure for new projects
  • Alternative to grep/glob for doc discovery

Quick Start

  1. Check for docs directory at project root
  2. Scan for common doc file patterns
  3. If docs exist → map topics to locations
  4. If no docs → suggest documentation structure (see references/doc-patterns.md)

Common Documentation Locations

Check these locations in order:

project-root/
├── docs/                    # Primary documentation
│   ├── architecture/        # System design, ADRs
│   ├── features/            # Feature specs
│   ├── api/                 # API documentation
│   └── guides/              # How-to guides
├── .github/                 # GitHub-specific docs
│   └── docs/
├── README.md                # Project overview
├── ARCHITECTURE.md          # High-level architecture
├── CONTRIBUTING.md          # Contribution guidelines
└── doc/ or documentation/   # Alternative doc folders

Topic-to-Location Mapping

Looking for...Check first
Project overviewREADME.md
Architecture/designdocs/architecture/, ARCHITECTURE.md, docs/adr/
Feature specsdocs/features/, docs/specs/
API referencedocs/api/, api-docs/, OpenAPI/Swagger files
Setup/installationdocs/guides/setup.md, INSTALL.md
Database schemadocs/database/, docs/schema/, prisma/schema.prisma
Data types/modelsdocs/types/, docs/models/, src/types/, src/models/
Style guidedocs/style-guide.md, docs/conventions.md, .eslintrc, STYLE.md
Environment configdocs/config/, .env.example, docs/environment.md
Testing strategydocs/testing/, tests/README.md
Deploymentdocs/deployment/, docs/infrastructure/
ADRs (decisions)docs/adr/, docs/decisions/, architecture/decisions/
ADRs (fallback)CHANGELOG.md, git log, PR descriptions, code comments

Discovery Workflow

1. ls docs/ (or doc/, documentation/)
   ↓ exists?
   YES → scan structure, build topic map
   NO  → check for standalone doc files (*.md in root)
         ↓ found?
         YES → use available docs
         NO  → suggest creating docs structure
               (see references/doc-patterns.md)

Automated Discovery

Run the scanner script to map available documentation:

python3 scripts/scan_docs.py [project-path]

Output: JSON map of topics → file locations

When Docs Don't Exist

If the codebase lacks documentation:

  1. Inform user: "No documentation structure found"
  2. Offer to create starter docs: view references/doc-patterns.md
  3. Suggest minimal viable structure based on project type

Finding Decisions Without ADRs

If no formal ADRs exist, extract architectural context from:

CHANGELOG.md        → Breaking changes, migration rationale
git log             → Commits w/ "migrate", "refactor", "replace"
PR/MR descriptions  → Discussion threads on major changes
Issue tracker       → Closed RFCs, architecture proposals
Code comments       → // DECISION:, // WHY:, // HACK:

See references/doc-patterns.md → "Fallback: When No ADRs Exist" for git commands & reconstruction templates.

Integration with Research Phase

Use doc-navigator BEFORE grep/glob when:

  • Starting work on unfamiliar codebase
  • Looking for architectural context
  • Understanding feature implementations
  • Finding API contracts or schemas

Fall back to grep/glob when:

  • Docs don't cover the specific topic
  • Need to find implementation details in code
  • Searching for specific function/class usage

Ref: references/doc-patterns.md for documentation templates when establishing new docs.

Source

git clone https://github.com/georgekhananaev/claude-skills-vault/blob/main/.claude/skills/doc-navigator/SKILL.mdView on GitHub

Overview

Doc Navigator helps you quickly locate architectural decisions, feature specs, and technical docs by checking known locations first before resorting to grep or glob searches. It maps topics to doc locations for fast context retrieval during the Research phase. If the project lacks documentation structure, it provides patterns to establish one.

How This Skill Works

It starts at the project root and looks for docs/ or doc/ or documentation/. If found, it scans the structure and builds a topic-to-location map, prioritizing ADRs and API docs. If not found, it suggests a documentation structure from references/doc-patterns.md. For automation, run the discovery script to generate a JSON map of topics to file locations: python3 scripts/scan_docs.py [project-path].

When to Use It

  • Finding architectural decisions (ADRs)
  • Locating feature specs or API docs
  • Researching codebase before implementation
  • Suggesting documentation structure for new projects
  • Alternative to grep/glob for doc discovery

Quick Start

  1. Step 1: Check for a docs directory at the project root (docs/, doc/, or documentation/).
  2. Step 2: Scan for common doc file patterns (architecture, features, api, guides) to build a topic map.
  3. Step 3: If docs exist, map topics to locations; if not, refer to references/doc-patterns.md to bootstrap structure.

Best Practices

  • Start at project root and check docs/, doc/, or documentation/ before searching with grep
  • Leverage the topic-to-location mapping to jump to the right file quickly
  • Keep ADRs in docs/adr/ or ARCHITECTURE.md and ensure mapping stays up to date
  • If no docs exist, use references/doc-patterns.md to bootstrap structure
  • Regularly run the automated discovery to refresh the topic map (python3 scripts/scan_docs.py [project-path])

Example Use Cases

  • A new ADR is needed for a design decision; locate ADRs in docs/adr/ or ARCHITECTURE.md first.
  • Onboarding a feature: map to docs/features/ and read related specs in docs/features.
  • Review API surface before implementation by checking docs/api/ and api-docs/.
  • No docs exist; run scan_docs.py to generate starter patterns.
  • Suggest doc structure per project type using references/doc-patterns.md.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers