Skip to main content
command CX Codex

index — Claude Code command: what it does, how to install

index scans project architecture to build structured knowledge bases, API references, or README files with cross-references.

MIT ★ 23,950 updated 2026-09-27

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/index.md
Open on GitHub

What index does

Inspects the codebase using Read, Grep, and Glob tools, then organizes project documentation into architecture guides, API references, README files, or a general knowledge base. Work is divided among three personas: architect outlines structure, scribe drafts content, and quality checks completeness.

The workflow integrates Sequential MCP for step-by-step project analysis and Context7 MCP for framework standards. Neither server is strictly required. If they are missing, Claude Code falls back to native reasoning and web lookups.

Existing manual documentation remains safe. The /sc:index command does not overwrite custom sections without explicit approval.

What it helps with

  • map project architecture with cross-references
  • generate API documentation in Markdown or JSON format
  • build an organized knowledge base across the codebase
  • update technical documentation without overwriting manual edits

Example prompts for the agent

  • /sc:index project-root --type structure --format md
  • /sc:index src/api --type api --format json
  • /sc:index . --type docs

How to install index

Manually: put the files in place

.claude/commands/index.md

Call it with /index. For all projects use ~/.claude/commands/

Questions about index

How to install index in Claude Code?

Place the command definition file at .claude/commands/index.md.

What does the /sc:index command do?

It inspects code files, coordinates architect, scribe, and quality personas, and outputs structured documentation in Markdown, JSON, or YAML.

Are Sequential and Context7 MCP servers required?

No, they are optional tooling. When absent, the command gracefully falls back to native Claude Code tools and standard web lookups.

Source text

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

Similar slash commands

All slash commands for Writing and docs →

From the same set56

The whole set →
business-panel business-panel runs document analysis through a panel of simulated business thinkers to deliver structured strategic synthesis. CX Codex +1 ★ 23,950repo stars research research — a command for investigating complex questions beyond your knowledge cutoff. It breaks down the task automatically, runs parallel searches, and collects evidence with source attribution. CX Codex +1 ★ 23,950repo stars reflect reflect evaluates task adherence and session progress using Serena MCP analysis tools. Useful for quality checks before marking tasks as complete. CX Codex +1 ★ 23,950repo stars explain A command to explain code, system architecture, and concepts at the right level of depth. Helps you understand unfamiliar code or teach concepts to others. CX Codex +1 ★ 23,950repo stars troubleshoot troubleshoot diagnoses runtime errors, build failures, performance bottlenecks, and deployment bugs. It inspects the system state and never modifies files unless passed --fix. CX Codex +1 ★ 23,950repo stars spawn spawn — a command that breaks down large multi-domain operations into hierarchical task plans with dependencies and delegation. Analyzes scope, decomposes work, and assigns executors—it plans rather than implements. CX Codex +1 ★ 23,950repo stars cleanup The cleanup command for Claude Code finds dead code, removes unused imports, and tidies project structure without breaking public APIs. CX Codex +1 ★ 23,950repo stars deep-research-agent The deep-research-agent subagent investigates complex questions, checks sources, and turns findings into a cited report. Use it for current topics or when information needs careful synthesis. CX Codex ★ 23,950repo stars

Project sponsors

Companies that keep this analytics open