Skip to main content
command CX Codex

explain · superclaude-org — Claude Code command: break down code and concepts

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.

MIT ★ 23,950 updated 2026-09-27

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

What explain does

The /sc:explain command breaks down a code snippet or concept in stages: analyzes what you're asking about, assesses your knowledge level, sequences the explanation from fundamentals to details, then validates clarity. It offers three depth modes — basic, intermediate, advanced — and picks a delivery format: plain text, code examples, or interactive exploration.

Three roles handle different angles. An educator structures it for learning, an architect explains system design, a security specialist covers best practices. For intricate topics, Sequential MCP does structured reasoning and Context7 pulls official framework docs. When either server is not installed, the command falls back to native reasoning and web search.

Try explain authentication.js --level basic for a beginner take on auth flows, explain react-hooks --level intermediate --context react to ground it in React's official patterns, or explain microservices-system --level advanced --format interactive to explore architecture design interactively.

What it helps with

  • understand legacy code without reading every line
  • explain system architecture at the right level of detail
  • convert a tricky concept into teachable form
  • verify security practices align with framework patterns

Example prompts for the agent

  • Explain how middleware works in Express at an intermediate level
  • /sc:explain JWT-authentication --level basic --context security
  • Break down microservices architecture in interactive mode

How to install explain

Manually: put the files in place

.claude/commands/explain.md

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

Questions about explain

How do I install explain in Claude Code?

Place the file at .claude/commands/explain.md in your project root. Claude Code auto-loads it; run /sc:explain with your code or topic and pick your depth.

What does explain do?

It walks through code and architecture concepts step by step, tuning depth (basic, intermediate, advanced) and format (text, examples, interactive). It pulls official framework patterns and documentation where relevant.

Does explain work without MCP servers?

Yes. Sequential and Context7 are preferred but optional. Without them, explain falls back to built-in code analysis and web search for official docs.

Source text

explain.md · MIT
---
name: explain
description: "Provide clear explanations of code, concepts, and system behavior with educational clarity"
category: workflow
complexity: standard
mcp-servers: [sequential, context7]
personas: [educator, architect, security]
---

# /sc:explain - Code and Concept Explanation

## Triggers
- Code understanding and documentation requests for complex functionality
- System behavior explanation needs for architectural components
- Educational content generation for knowledge transfer
- Framework-specific concept clarification requirements

## Usage
```
/sc:explain [target] [--level basic|intermediate|advanced] [--format text|examples|interactive] [--context domain]
```

## Behavioral Flow
1. **Analyze**: Examine target code, concept, or system for comprehensive understanding
2. **Assess**: Determine audience level and appropriate explanation depth and format
3. **Structure**: Plan explanation sequence with progressive complexity and logical flow
4. **Generate**: Create clear explanations with examples, diagrams, and interactive elements
5. **Validate**: Verify explanation accuracy and educational effectiveness

Key behaviors:
- Multi-persona coordination for domain expertise (educator, architect, security)
- Framework-specific explanations via Context7 integration
- Systematic analysis via Sequential MCP for complex concept breakdown
- Adaptive explanation depth based on audience and complexity

## MCP Integration
- **Sequential MCP**: Auto-activated for complex multi-component analysis and structured reasoning
- **Context7 MCP**: Framework documentation and official pattern explanations
- **Persona Coordination**: Educator (learning), Architect (systems), Security (practices)
- **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**: Code analysis and pattern identification for explanation content
- **TodoWrite**: Progress tracking for complex multi-part explanations
- **Task**: Delegation for comprehensive explanation workflows requiring systematic breakdown

## Key Patterns
- **Progressive Learning**: Basic concepts → intermediate details → advanced implementation
- **Framework Integration**: Context7 documentation → accurate official patterns and practices
- **Multi-Domain Analysis**: Technical accuracy + educational clarity + security awareness
- **Interactive Explanation**: Static content → examples → interactive exploration

## Examples

### Basic Code Explanation
```
/sc:explain authentication.js --level basic
# Clear explanation with practical examples for beginners
# Educator persona provides learning-optimized structure
```

### Framework Concept Explanation
```
/sc:explain react-hooks --level intermediate --context react
# Context7 integration for official React documentation patterns
# Structured explanation with progressive complexity
```

### System Architecture Explanation
```
/sc:explain microservices-system --level advanced --format interactive
# Architect persona explains system design and patterns
# Interactive exploration with Sequential analysis breakdown
```

### Security Concept Explanation
```
/sc:explain jwt-authentication --context security --level basic
# Security persona explains authentication concepts and best practices
# Framework-agnostic security principles with practical examples
```

## Boundaries

**Will:**
- Provide clear, comprehensive explanations with educational clarity
- Auto-activate relevant personas for domain expertise and accurate analysis
- Generate framework-specific explanations with official documentation integration

**Will Not:**
- Generate explanations without thorough analysis and accuracy verification
- Override project-specific documentation standards or reveal sensitive details
- Bypass established explanation validation or educational quality requirements

© SuperClaude-Org · MIT · SuperClaude-Org/SuperClaude_Framework

Similar slash commands

All slash commands for Code review and refactoring →

explain by other authors comes first.

explain INDX explain — a command for Claude Code that runs the jevlint tool against a single file. It reports every finding with its score and highlights what actually needs fixing. CX Codex +1 ★ 113repo stars code-documentation-code-explain sickn33 code-documentation-code-explain — a skill that transforms tangled code into clear explanations with diagrams and step-by-step walkthroughs. Use it to understand unfamiliar code fast or prepare learning materials. CX Codex +1 1,000installs ce-explain EveryInc ce-explain is a Claude Code skill that traces how code behaves and why a project changed, using evidence from its sources and history. It activates for requests about behavior, rationale, or a span of work. CX Codex +1 1,100installs code-explainer CuriousLearner code-explainer — a skill for Claude Code, Cursor, GitHub Copilot and other platforms that walks through code step-by-step, explaining algorithms, patterns, risks and dependencies at the right level for each developer. CX Codex +1 7installs spec-miner https://github.com/Jeffallan spec-miner — a skill for Claude Code, Codex, Cursor and other agents that reads undocumented code and produces a written specification. Runs on inherited or legacy projects where there is no documentation to start from. CX Codex +1 4,900installs c4-architecture Seth Hobson c4-architecture runs a bottom-up codebase analysis and writes complete C4 model architecture documentation into C4-Documentation/. CX Codex +1 ★ 42,780repo stars obsidian-architect Eugeniu Ghelbur obsidian-architect scans a project and generates architecture notes in your vault: overview with diagram, per-module notes, key decisions. Re-run to refresh docs without losing your edits. CX Codex +1 ★ 5,412repo stars

From the same set56

The whole set →
select-tool select-tool is a Claude Code command that routes operations to Serena or Morphllm based on complexity, balancing accuracy and speed. CX Codex +1 ★ 23,950repo stars 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 index index scans project architecture to build structured knowledge bases, API references, or README files with cross-references. 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

Project sponsors

Companies that keep this analytics open