Our review
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.).
Use this skill when you need to quickly catalog all documents in a folder for easy discovery and referencing in the context.
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
SafeThe 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
Examples
/index-folder documents/prd/index-folder documents --recursive/index-folder documents --type decisionname: 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 (skippackage.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:
- Add new entries - Files not already indexed
- Update existing entries - Files that have changed (by path)
- Update topicIndex - Add document IDs to topic arrays
- Update typeIndex - Add document IDs to type arrays
- Update phaseIndex - Add document IDs to phase arrays
- 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
API Documentation Generator
Documentation
Automatically generates OpenAPI/Swagger API documentation.
Technical Writer
Documentation
Writes clear technical documentation following top style guides.
Typed Documentation Forms System
Documentation
Add typed comments, documentation, todos, and metadata to Scheme code using `(doc ...)` forms. Doc annotations are authoritative for type inference, extracted by search commands (lf-todo, lf-types), and integrated with the type checker and LSP. Useful for annotating functions, marking deprecations, or tracking localized improvements alongside the code.