explain
1
总安装量
1
周安装量
#45131
全站排名
安装命令
npx skills add https://github.com/potatoman03/runbook --skill explain
Agent 安装分布
mcpjam
1
claude-code
1
replit
1
junie
1
zencoder
1
Skill 文档
Explain: Visual Learning
Have Claude generate a visual HTML presentation explaining unfamiliar code. It makes surprisingly good slides! Ask Claude to draw ASCII diagrams of new protocols and codebases to help you understand them. â Claude Code team tips
Activation
When user invokes /explain [topic] with optional format flags:
Output Formats
ASCII Diagrams (/explain --ascii [topic])
Generate clear ASCII art diagrams:
System Architecture
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â Load Balancer â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â
âââââââââââââââââââââââ¼ââââââââââââââââââââââ
â¼ â¼ â¼
âââââââââââââââââ âââââââââââââââââ âââââââââââââââââ
â Web Server â â Web Server â â Web Server â
â (Node.js) â â (Node.js) â â (Node.js) â
âââââââââ¬ââââââââ âââââââââ¬ââââââââ âââââââââ¬ââââââââ
â â â
âââââââââââââââââââââââ¼ââââââââââââââââââââââ
â¼
âââââââââââââââââââ
â Redis Cache â
ââââââââââ¬âââââââââ
â
ââââââââââ¼âââââââââ
â PostgreSQL â
â Database â
âââââââââââââââââââ
Data Flow
User Input ââ⺠Validation ââ⺠Transform ââ⺠Database
â â
â¼ â¼
Error ââââââââââââââââââââ Response
State Machine
ââââââââââââââââââââââââââââââââââââââââ
â â
â¼ â
âââââââââââââââââ authenticate ââââââââââââ´âââââ
â Anonymous â âââââââââââââââ⺠â Logged In â
âââââââââââââââââ âââââââââââââââââ
â² â
â logout â
ââââââââââââââââââââââââââââââââââââ
HTML Slides (/explain --slides [topic])
Generate a self-contained HTML presentation:
<!DOCTYPE html>
<html>
<head>
<title>[Topic] Explained</title>
<style>
/* Clean, readable slide styles */
.slide {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
padding: 2rem;
}
.slide h1 { font-size: 3rem; }
.slide code {
background: #f5f5f5;
padding: 1rem;
border-radius: 8px;
}
/* Navigation */
.nav { position: fixed; bottom: 1rem; right: 1rem; }
</style>
</head>
<body>
<div class="slide" id="slide1">
<h1>Understanding [Topic]</h1>
<p>A visual guide to how [topic] works</p>
</div>
<div class="slide" id="slide2">
<h2>The Core Concept</h2>
<pre><code>// Key code example</code></pre>
<p>Explanation of what this does...</p>
</div>
<!-- More slides... -->
<script>
// Simple keyboard navigation
let current = 0;
const slides = document.querySelectorAll('.slide');
document.addEventListener('keydown', (e) => {
if (e.key === 'ArrowRight') current = Math.min(current + 1, slides.length - 1);
if (e.key === 'ArrowLeft') current = Math.max(current - 1, 0);
slides[current].scrollIntoView({ behavior: 'smooth' });
});
</script>
</body>
</html>
Save to .claude/explanations/[topic].html and open in browser.
Interactive Explanation (/explain --interactive [topic])
Generate HTML with interactive elements:
- Collapsible sections
- Hover tooltips on code
- Step-through animations
- Clickable diagram elements
Default: Markdown with ASCII
If no format specified, combine markdown explanation with ASCII diagrams inline.
What to Explain
Code Files
/explain src/auth/middleware.ts
- Purpose and responsibility
- Input/output flow
- Key functions and their roles
- How it connects to rest of system
Architecture
/explain architecture
/explain --ascii system design
- High-level component diagram
- Data flow between services
- Key boundaries and interfaces
Protocols/Algorithms
/explain OAuth2 flow
/explain --ascii how rate limiting works
- Step-by-step process
- State transitions
- Edge cases and error paths
Concepts
/explain dependency injection in this codebase
- What it is
- Why it’s used here
- Examples from the actual code
Example Session
User: /explain --slides src/services/payment.ts
Claude: Creating presentation for payment service...
Generated: .claude/explanations/payment-service.html
## Payment Service Explained
**Slide 1: Overview**
The payment service handles all transaction processing...
**Slide 2: Flow Diagram**
[ASCII diagram of payment flow]
**Slide 3: Key Functions**
- `processPayment()` - Main entry point
- `validateCard()` - Card validation logic
- `settleTransaction()` - Finalization
**Slide 4: Error Handling**
[Diagram of error states and recovery]
**Slide 5: Integration Points**
[How it connects to Stripe, database, notification service]
Open .claude/explanations/payment-service.html in your browser
to view the interactive presentation.