index — команда для Claude Code: что делает и как установить
Команда index для Claude Code автоматически сканирует архитектуру проекта и создаёт базу знаний, API-документацию или README с перекрёстными ссылками.
MIT ★ 23 950 обновлён 2026-09-27
.claude/commands/index.mdЧто делает index
Анализирует кодовую базу через инструменты Read, Grep и Glob, после чего структурирует документацию по типам: общая база знаний, описание API, архитектура или README. Процесс распределяется по трём ролям: архитектор выстраивает структуру, писатель (scribe) готовит текст, а контролёр качества (quality) проверяет полноту описания.
Для глубокого поэтапного анализа задействует MCP-сервер Sequential, а шаблоны фреймворков подтягивает через Context7. При этом серверы MCP не обязательны. Если они не установлены, команда просто переключается на встроенные рассуждения Claude Code и поиск документации в сети.
Существующие ручные правки в файлах сохраняются. Команда не перезаписывает пользовательские разделы без прямого разрешения.
Какие задачи решает
- составить карту архитектуры проекта с перекрёстными ссылками
- сгенерировать документацию API в формате Markdown или JSON
- собрать интерактивную базу знаний по кодовой базе
- обновить технические документы без потери ручных правок
Примеры запросов агенту
- /sc:index
project-root --type structure --format md - /sc:index src/api --type
api --format json - /sc:index . --type docs
Как установить index
Вручную: положить файлы
.claude/commands/index.mdВызов — /index. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/index.mdВызов — /prompts:index. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/index.prompt.mdВручную: положить файлы
.gemini/commands/index.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы об index
Как установить index в Claude Code?
Сохраните файл команды по пути .claude/commands/index.md.
Что делает команда /sc:index?
Она исследует файлы проекта, распределяет задачи между ролями архитектора, писателя и тестировщика, а затем создаёт документацию структуры, API или базу знаний в форматах Markdown, JSON или YAML.
Обязательно ли подключать MCP-серверы Sequential и Context7?
Нет, эти серверы желательны, но не обязательны. Если они не установлены, команда автоматически переходит на стандартные рассуждения Claude Code и веб-поиск.
Исходный текст
index.md · MIT
--- name: index description: "Generate comprehensive project documentation and knowledge base with intelligent organization" category: special complexity: standard mcp-servers: [sequential, context7] personas: [architect, scribe, quality] --- # /sc:index - Project Documentation ## Triggers - Project documentation creation and maintenance requirements - Knowledge base generation and organization needs - API documentation and structure analysis requirements - Cross-referencing and navigation enhancement requests ## Usage ``` /sc:index [target] [--type docs|api|structure|readme] [--format md|json|yaml] ``` ## Behavioral Flow 1. **Analyze**: Examine project structure and identify key documentation components 2. **Organize**: Apply intelligent organization patterns and cross-referencing strategies 3. **Generate**: Create comprehensive documentation with framework-specific patterns 4. **Validate**: Ensure documentation completeness and quality standards 5. **Maintain**: Update existing documentation while preserving manual additions and customizations Key behaviors: - Multi-persona coordination (architect, scribe, quality) based on documentation scope and complexity - Sequential MCP integration for systematic analysis and comprehensive documentation workflows - Context7 MCP integration for framework-specific patterns and documentation standards - Intelligent organization with cross-referencing capabilities and automated maintenance ## MCP Integration - **Sequential MCP**: Complex multi-step project analysis and systematic documentation generation - **Context7 MCP**: Framework-specific documentation patterns and established standards - **Persona Coordination**: Architect (structure), Scribe (content), Quality (validation) - **Availability fallback**: The MCP servers named here are preferred tooling, not hard requirements — when one is not installed, degrade gracefully (native reasoning in place of Sequential, official docs via web lookup in place of Context7, native tools otherwise) instead of routing work to absent servers. ## Tool Coordination - **Read/Grep/Glob**: Project structure analysis and content extraction for documentation generation - **Write**: Documentation creation with intelligent organization and cross-referencing - **TodoWrite**: Progress tracking for complex multi-component documentation workflows - **Task**: Advanced delegation for large-scale documentation requiring systematic coordination ## Key Patterns - **Structure Analysis**: Project examination → component identification → logical organization → cross-referencing - **Documentation Types**: API docs → Structure docs → README → Knowledge base approaches - **Quality Validation**: Completeness assessment → accuracy verification → standard compliance → maintenance planning - **Framework Integration**: Context7 patterns → official standards → best practices → consistency validation ## Examples ### Project Structure Documentation ``` /sc:index project-root --type structure --format md # Comprehensive project structure documentation with intelligent organization # Creates navigable structure with cross-references and component relationships ``` ### API Documentation Generation ``` /sc:index src/api --type api --format json # API documentation with systematic analysis and validation # Scribe and quality personas ensure completeness and accuracy ``` ### Knowledge Base Creation ``` /sc:index . --type docs # Interactive knowledge base generation with project-specific patterns # Architect persona provides structural organization and cross-referencing ``` ## Boundaries **Will:** - Generate comprehensive project documentation with intelligent organization and cross-referencing - Apply multi-persona coordination for systematic analysis and quality validation - Provide framework-specific patterns and established documentation standards **Will Not:** - Override existing manual documentation without explicit update permission - Generate documentation without appropriate project structure analysis and validation - Bypass established documentation standards or quality requirements
© SuperClaude-Org · MIT · SuperClaude-Org/SuperClaude_Framework