project-index
БесплатноЗапускает вложенные скриптыНе проверенGenerate and maintain project structure index for fast AI navigation. Creates docs/structure.md with optimized file index. Load this skill when starting new…
Об этом скилле
Project Index Skill
Generate optimized project structure file for fast AI context loading.
When to Use
- First time: Project has no
docs/structure.md - After changes: Added/removed files, restructured folders
- Periodic refresh: Weekly or after major features
- On demand: User says "update structure", "refresh index", "scan project"
Output File
Location: docs/structure.md
Purpose: Single source of truth for AI to understand project layout without scanning entire codebase.
Cross-Platform Scripts (Recommended)
This skill includes pre-built scripts that work on all platforms:
Node.js Script
# Basic usage (from project root)
node .codex/skills/project-index/scripts/scan-structure.js . 4
# Output to file
node .codex/skills/project-index/scripts/scan-structure.js . 4 > docs/structure.md
# JSON format
node .codex/skills/project-index/scripts/scan-structure.js . 4 json
Python Script
# Basic usage
python .codex/skills/project-index/scripts/scan_structure.py . 4
# Output to file
python .codex/skills/project-index/scripts/scan_structure.py . 4 > docs/structure.md
# JSON format
python .codex/skills/project-index/scripts/scan_structure.py . 4 json
Script Features
- ✅ Cross-platform (Windows, macOS, Linux)
- ✅ Auto-detect entry points (main., index., app., server.)
- ✅ Auto-detect config files (package.json, tsconfig.*, etc.)
- ✅ Auto-detect key files (README, CHANGELOG, LICENSE)
- ✅ File distribution by language/type
- ✅ Customizable depth and ignore patterns
- ✅ Output: Markdown or JSON
Generation Workflow
Step 1: Scan Project (Alternative Methods)
Option A: Use Built-in Scripts (Recommended)
# Node.js
node .codex/skills/project-index/scripts/scan-structure.js . 4
# Python
python .codex/skills/project-index/scripts/scan_structure.py . 4
Option B: VS Code Tools
# Use list_dir tool recursively
# Use file_search tool with glob patterns
Option C: Native Commands (Platform-specific)
# Linux/macOS
tree -L 4 -I 'node_modules|.git|dist|build' --dirsfirst
# Windows PowerShell
Get-ChildItem -Recurse -Depth 4 | Where-Object { $_.FullName -notmatch 'node_modules|\.git|dist|build' }
# Windows CMD (limited)
dir /s /b /ad
Step 2: Identify Key Files
Scan for these important files:
- Entry points:
main.*,index.*,app.*,server.* - Config:
*.config.*,*.json,*.yaml,*.toml,.env* - Docs:
README*,CHANGELOG*,docs/* - Routes/API:
**/routes/**,**/api/**,**/controllers/** - Components:
**/components/**,**/views/**,**/pages/** - Services:
**/services/**,**/lib/**,**/utils/** - Database:
**/models/**,**/schema/**,**/migrations/** - Tests:
**/*.test.*,**/*.spec.*,**/tests/**
Step 3: Generate Structure File
Create docs/structure.md with this format:
# Project Structure Index
> Auto-generated by project-index skill. Last updated: YYYY-MM-DD HH:mm
## Quick Stats
- Total files: X
- Main language: TypeScript/Python/etc
- Framework: Next.js/Angular/Express/etc
- Package manager: npm/yarn/pnpm
## Directory Tree
\`\`\`
<tree output here>
\`\`\`
## Key Entry Points
| File | Purpose |
|:---|:---|
| src/index.ts | Main entry |
| src/app.ts | App initialization |
## Config Files
| File | Purpose |
|:---|:---|
| package.json | Dependencies |
| tsconfig.json | TypeScript config |
## Feature Map
| Feature/Domain | Location | Key Files |
|:---|:---|:---|
| Authentication | src/auth/ | login.ts, session.ts, middleware.ts |
| User Management | src/users/ | user.model.ts, user.service.ts |
| API Routes | src/api/ | routes.ts, handlers/ |
| Database | src/db/ | schema.prisma, migrations/ |
| UI Components | src/components/ | Button.tsx, Modal.tsx, Layout.tsx |
## File Patterns
| Looking for | Path pattern |
|:---|:---|
| Components | src/components/**/*.tsx |
| API handlers | src/api/**/*.ts |
| Database models | src/models/**/*.ts |
| Tests | **/*.test.ts, **/*.spec.ts |
| Styles | src/styles/**/*.css |
## Recent Changes (Optional)
- 2024-01-15: Added payment module at src/payment/
- 2024-01-10: Restructured auth to src/auth/
Step 4: Validate & Save
- Ensure
docs/folder exists - Write to
docs/structure.md - Confirm file created/updated
JSON Alternative (Optional)
If project prefers JSON, create docs/structure.json:
{
"generated": "2024-01-15T10:30:00Z",
"stats": {
"totalFiles": 150,
"language": "TypeScript",
"framework": "Next.js"
},
"entryPoints": [
{"path": "src/index.ts", "purpose": "Main entry"},
{"path": "src/app.ts", "purpose": "App init"}
],
"features": {
"auth": {
"location": "src/auth/",
"files": ["login.ts", "session.ts", "middleware.ts"]
},
"api": {
"location": "src/api/",
"files": ["routes.ts", "handlers/"]
}
},
"patterns": {
Установить project-index в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл project-index?
Generate and maintain project structure index for fast AI navigation. Creates docs/structure.md with optimized file index. Load this skill when starting new project, after major changes, or when docs/structure.md is outdated.
Как установить скилл project-index?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл project-index запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic