Generates clear explanations for complex code at beginner, intermediate, or expert levels. Useful for onboarding, documentation, code review, or educational content.
Ships in code-intelligence. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate clear explanations for complex code to aid understanding and knowledge transfer.
| Level | Audience | Focus |
|---|---|---|
| Beginner | Junior devs, non-technical | What it does, simple terms |
| Intermediate | Mid-level devs | How it works, patterns used |
| Expert | Senior devs, architects | Why decisions made, trade-offs |
Explain this code for someone new to programming:
```[paste code]```
- Use simple, non-technical language
- Explain what the code accomplishes
- Use real-world analogies
- Avoid jargon or define terms used
Explain how this code works:
```[paste code]```
Include:
- Step-by-step execution flow
- Design patterns used
- Key functions and their purposes
- How components interact
Provide an architectural analysis of this code:
```[paste code]```
Cover:
- Design decisions and alternatives
- Performance characteristics
- Trade-offs made
- Potential improvements
- Edge cases and limitations
AI Prompt:
Add explanatory comments to each significant line of this code:
```[paste code]```
Comments should explain WHY, not WHAT (the code shows what).
Output:
// Debounce user input to prevent excessive API calls
const debouncedSearch = useMemo(
// Create a new debounced function only when delay changes
() => debounce((query: string) => {
// Skip empty queries to avoid unnecessary requests
if (!query.trim()) return;
// Trigger the actual search with the debounced value
onSearch(query);
}, delay),
[delay, onSearch] // Recreate when these dependencies change
);
AI Prompt:
Describe the flow of this code in a way that could be drawn as a flowchart:
```[paste code]```
Use this format:
1. [Start] → description
2. [Decision] condition? → Yes: action / No: action
3. [Process] what happens
4. [End] final state
Output:
1. [Start] User submits login form
2. [Process] Extract email and password from form
3. [Decision] Is email valid format?
→ No: Display email error, return to form
→ Yes: Continue
4. [Decision] Is password >= 8 characters?
→ No: Display password error, return to form
→ Yes: Continue
5. [Process] Send credentials to auth API
6. [Decision] Did API return success?
→ No: Display error message, return to form
→ Yes: Continue
7. [Process] Store auth token in secure storage
8. [Process] Redirect to dashboard
9. [End] User is logged in
AI Prompt:
Identify the key concepts in this code and how they relate:
```[paste code]```
Format as:
- Main Concept
- Related concept 1 (relationship)
- Related concept 2 (relationship)
Output:
- AuthContext (Central state management)
- User object (stores current user data)
- isAuthenticated (derived from user presence)
- login() (updates user, triggers redirect)
- logout() (clears user, clears storage)
- AuthProvider (React context provider)
- Wraps application (provides context to children)
- Manages state (useState for user)
- Handles persistence (localStorage sync)
- useAuth hook (Consumer interface)
- Accesses context (useContext internally)
- Provides type safety (typed return value)
Explain this algorithm:
```[paste algorithm code]```
Include:
1. What problem it solves
2. Time and space complexity
3. Step-by-step walkthrough with example
4. When to use vs alternatives
Explain this React component:
```[paste component]```
Cover:
1. Component purpose
2. Props and their uses
3. State management approach
4. Lifecycle (effects, cleanup)
5. Render logic
Explain this API endpoint:
```[paste route handler]```
Include:
1. What the endpoint does
2. Request format (method, body, params)
3. Response format
4. Error cases
5. Authentication/authorization
Explain this SQL/ORM query:
```[paste query]```
Cover:
1. What data it retrieves/modifies
2. Tables involved and relationships
3. Filtering and sorting logic
4. Performance considerations
5. Potential issues (N+1, etc.)
## `functionName(params)`
### Purpose
[What this function does and why it exists]
### Parameters
| Name | Type | Description |
|------|------|-------------|
| param1 | string | Description |
| param2 | number | Description |
### Returns
`ReturnType` - Description of return value
### Example
```javascript
const result = functionName('value', 42);
// result: { ... }
### Component Documentation
```markdown
## ComponentName
### Purpose
[What this component renders and its role in the app]
### Props
| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| prop1 | string | Yes | - | Description |
| prop2 | boolean | No | false | Description |
### Usage
```jsx
<ComponentName prop1="value" prop2={true} />
## Onboarding Guides
### AI Prompt for Onboarding Doc
```markdown
Create an onboarding guide for this module:
```[paste module code]```
The guide should help a new developer:
1. Understand the module's purpose
2. Know the key files and their roles
3. Understand how to make common changes
4. Know what to test after changes
After generating explanations:
What SKILL.md sets; muted values are Claude Code's defaults
/code-intelligence:code-explanation-generatorfrom code-intelligence
npx claudepluginhub latestaiagents/agent-skills --plugin code-intelligence7 skills in this plugin
/ai-code-reviewerUse this skill when reviewing AI-generated code. Activate when the user has code generated by an AI
assistant and wants to review it, validate AI output, check for common AI mistakes, ensure code quality
of generated code, or verify that AI-generated code follows best practices before merging.
/codebase-context-builderUse this skill when preparing context for AI coding assistants. Activate when the user wants to help
AI understand their codebase, provide better context for code generation, improve AI responses,
create context files, set up CLAUDE.md or similar context documents, or optimize prompts for code tasks.
/4 plugins in one repository ship this exact skill · first indexed Aug 19, 2026
Other plugins' skills for the same job