Index Folder

VerifiedSafe

Indexes a folder's supported files (Markdown, JSON) into a context index file for fast retrieval. Extracts metadata like title, type, topics, and V2V phase. Helps quickly catalog and discover project documents.

Sby Skills Guide Bot
DocumentationIntermediate
6/2/2026
Claude Code
#folder-indexing#context-management#document-catalog#file-discovery#retrieval

Recommended for

Automated summary

This skill scans a folder and indexes its contents into the context system for fast topic-based retrieval.

Strengths

  • Automated indexing of supported files (.md, .json) with metadata extraction.
  • Smart detection of document types (PRD, decision, roadmap, etc.) and V2V phases.
  • Incremental update of the index without duplicating unchanged entries.
  • Generates a structured report with topic summary.

Limitations

  • Limited to .md and .json files; ignores other formats.
  • Requires a compatible project structure and a pre-existing context/index.json file.
  • Does not process files larger than 100 KB or in excluded directories (node_modules, .git, etc.).
When to use it

Use this skill when you need to quickly catalog all documents in a folder for easy discovery and referencing in the context.

When not to use it

Do not use it to save decisions to the context (use /context-save) or for ad-hoc search operations without need for persistent indexing.

Security analysis

Safe
Quality score90/100

The skill only reads files and writes to a local index.json within the project. It uses Read, Write, Edit, and Glob tools but does not execute any external commands or scripts. It skips sensitive directories and large files. No risk of data exfiltration or system compromise.

No concerns found

How this analysis is made

Examples

Index a folder
/index-folder documents/prd
Recursive folder indexing
/index-folder documents --recursive
Index by document type
/index-folder documents --type decision

name: index-folder description: | Index a folder's contents into the context system for fast retrieval and discovery. Activate when: "index this folder", "catalog these files", folder contents indexed, build file index, scan folder Do NOT activate for: saving decisions to context (/context-save), recalling context (/context-recall), plugin setup (/setup) model: haiku allowed-tools:

  • Read
  • Write
  • Edit
  • Glob user-invocable: true metadata: author: Product Org OS version: 3.0.0 category: context-layer compatibility: Requires Product Org OS v3+ context layer and rules

Index Folder

Scan a folder and add its contents to context/index.json for fast topic-based retrieval.

Trigger Patterns

  • /index-folder [path] - Index all supported files in path
  • /index-folder [path] --recursive - Include subfolders
  • /index-folder [path] --type [type] - Only index specific type

Behavior

1. Validate Path

Confirm the path exists and is accessible:

  • Accept relative paths from project root
  • Accept absolute paths
  • Reject paths outside the project

2. Scan for Supported Files

Supported file types:

  • .md - Markdown documents
  • .json - JSON data files (skip package.json, node_modules)

Always skip:

  • node_modules/
  • .git/
  • __pycache__/
  • .venv/, venv/
  • dist/, build/
  • Files starting with .
  • Files over 100KB (likely not documents)

3. Extract Metadata

For each file, extract:

{
  "id": "DOC-YYYY-NNN",
  "title": "[H1 or filename]",
  "type": "[detected type]",
  "path": "[relative path]",
  "topics": ["topic1", "topic2"],
  "phase": "[V2V phase if detectable]",
  "created": "[file creation date]",
  "lastAccessed": "[current date]",
  "size": "[file size]"
}

Type Detection: | Pattern | Type | |---------|------| | Contains "PRD" or in prd/ | prd | | Contains "Decision Record" or DR- | decision | | Contains "Strategic Bet" or SB- | bet | | Contains "Roadmap" | roadmap | | Contains "GTM" or "Go-to-Market" | gtm | | Contains "Analysis" | analysis | | Contains "Feedback" or FB- | feedback | | Contains "Learning" or L- | learning |

Topic Extraction:

  • Extract from document headers (H1, H2)
  • Extract from tags if present in frontmatter
  • Extract key nouns from first paragraph
  • Limit to 5-10 topics per document

Phase Detection: Look for V2V phase indicators:

  • "Strategic Foundation" → phase1
  • "Strategic Decision" → phase2
  • "Commitment" or "Roadmap" → phase3
  • "Execution" or "Launch" → phase4
  • "Outcome" or "Value" → phase5
  • "Learning" or "Retrospective" → phase6

4. Update Index

Read context/index.json and:

  1. Add new entries - Files not already indexed
  2. Update existing entries - Files that have changed (by path)
  3. Update topicIndex - Add document IDs to topic arrays
  4. Update typeIndex - Add document IDs to type arrays
  5. Update phaseIndex - Add document IDs to phase arrays
  6. Update lastUpdated - Set to current date

5. Output Report

# Folder Indexed: [path]

**Scanned**: [N] files
**Added**: [N] new entries
**Updated**: [N] existing entries
**Skipped**: [N] (already indexed, unchanged)

## New Entries

| ID | Title | Type | Topics |
|----|-------|------|--------|
| DOC-2026-015 | Authentication PRD | prd | auth, security, login |
| DOC-2026-016 | Pricing Decision | decision | pricing, enterprise |

## Topic Summary

| Topic | Documents |
|-------|-----------|
| authentication | 5 |
| pricing | 3 |
| enterprise | 3 |
| security | 2 |

---

*Index updated at context/index.json*

Index Format

The context/index.json structure:

{
  "version": "1.0",
  "lastUpdated": "2026-01-25",
  "entries": [
    {
      "id": "DOC-2026-001",
      "title": "Authentication PRD",
      "type": "prd",
      "path": "documents/prd-auth.md",
      "topics": ["authentication", "security", "login", "oauth"],
      "phase": "phase3",
      "created": "2026-01-15",
      "lastAccessed": "2026-01-25",
      "size": 4520
    }
  ],
  "topicIndex": {
    "authentication": ["DOC-2026-001", "DOC-2026-005"],
    "pricing": ["DOC-2026-003", "DOC-2026-007"]
  },
  "typeIndex": {
    "prd": ["DOC-2026-001"],
    "decision": ["DOC-2026-003"],
    "bet": ["DOC-2026-002"]
  },
  "phaseIndex": {
    "phase1": ["DOC-2026-010"],
    "phase2": ["DOC-2026-003"],
    "phase3": ["DOC-2026-001", "DOC-2026-005"]
  }
}

ID Generation

Generate unique IDs:

  • Format: DOC-YYYY-NNN
  • YYYY = current year
  • NNN = sequential number (001, 002, ...)
  • Check existing entries to avoid collisions

Notes

  • Indexing is additive - existing entries are preserved
  • To remove stale entries, use /index-cleanup
  • Large folders may take time - provide progress updates
  • Topics are normalized to lowercase
  • Duplicate entries (same path) are updated, not duplicated

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/index-folder-mm5t8bfv/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/index-folder-mm5t8bfv' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/index-folder-mm5t8bfv/download' --output '.skill-downloads/index-folder-mm5t8bfv/SKILL.md.part' && mv '.skill-downloads/index-folder-mm5t8bfv/SKILL.md.part' '.skill-downloads/index-folder-mm5t8bfv/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.

Environment declared by the author: Requires Product Org OS v3+ context layer and rules

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

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/index-folder-mm5t8bfv/SKILL.md' && test -s '.skill-downloads/index-folder-mm5t8bfv/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/index-folder' && cp -R '.skill-downloads/index-folder-mm5t8bfv' '.claude/skills/index-folder'

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/index-folder-mm5t8bfv'

openskills read 'index-folder-mm5t8bfv'

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/index-folder-mm5t8bfv/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