Analyze a codebase and interactively build a presentation plan and slides
Generates a presentation from codebase analysis with interactive planning and slide creation.
/plugin marketplace add clearfunction/cf-devtools/plugin install cf-devtools@cf-devtools[path] optional path to analyze (default: current directory)slidev/Analyze the codebase, create a detailed presentation plan, then generate slides.
Target path: $ARGUMENTS (default: current directory)
Codebase Analysis → Questions → PLAN Document → Review → Slides
This command follows the plan-first approach:
Explore and understand the project thoroughly:
package.json, Cargo.toml, pyproject.toml, go.mod, pom.xml, etc.Ask the user these questions using AskUserQuestion:
Q1: Duration "How long is this presentation?"
Q2: Audience "Who is the target audience?"
Q3: Format "What's the presentation format?"
Q4: Venue "What's the occasion?"
Q5: Focus Areas (multi-select) "Which aspects should we focus on?"
Q6: Technical Depth "How deep should the technical content go?"
Q7: Code Examples "How much code should appear in slides?"
Q8: Live Demo "Will there be live demonstrations?"
Q9: Core Message "What's the ONE thing you want the audience to remember?"
Q10: Call to Action "What should the audience DO after this presentation?"
Q11: Special Requests (optional) "Any specific components, features, or aspects to highlight?"
Based on codebase analysis and user answers, create {project-name}-presentation-plan.md:
# {Project Name} - Presentation Plan
**Duration:** {X} minutes
**Audience:** {description}
**Format:** {format type}
**Venue:** {context}
---
## Core Message
> "{The ONE thing to remember}"
## Call to Action
{What audience should do after}
---
## Codebase Summary
### Technology Stack
| Category | Technology |
|----------|------------|
| Language | {from analysis} |
| Framework | {from analysis} |
| Database | {from analysis} |
| ... | ... |
### Key Statistics
- **{N}** source files
- **{M}** dependencies
- **{P}** API endpoints
- **{Q}%** test coverage
### Architecture Overview
{Brief description of architecture discovered}
---
## Time Allocation
| Section | Time | Focus |
|---------|------|-------|
| 1. Opening Hook | X min | {focus} |
| 2. Project Overview | X min | {focus} |
| 3. {Main Section 1} | X min | {focus} |
| 4. {Main Section 2} | X min | {focus} |
| 5. Demo | X min | {focus} |
| 6. Wrap-up | X min | {focus} |
---
## Section Details
### Section 1: Opening Hook ({X} min)
**Hook Options:**
**Option A - Problem Statement:**
> "{Problem this project solves}"
**Option B - Before/After:**
> "{What was life like before vs after}"
**Context to Establish:**
- {Point 1 from codebase}
- {Point 2 from codebase}
---
### Section 2: Project Overview ({X} min)
**Key Points:**
- {From codebase analysis}
- {From codebase analysis}
**Visuals Needed:**
- [ ] Architecture diagram (Mermaid)
- [ ] Tech stack table
- [ ] Directory structure
---
### Section 3: {Based on Focus Areas} ({X} min)
{Continue for each section based on user's focus area selections}
---
## Diagrams to Create
1. **System Architecture** - Overall system components
- Type: Mermaid graph TD
- Include: {components discovered}
2. **Data Flow** - How data moves through system
- Type: Mermaid sequenceDiagram
- Include: {key flows}
{Add more based on codebase analysis}
---
## Code Examples to Include
1. **{File: path/to/interesting/code.ts}**
- Purpose: {what it demonstrates}
- Lines: {X-Y}
- Highlight: {key lines}
2. **{File: another/example.py}**
- Purpose: {what it demonstrates}
...
{From codebase analysis - notable code}
---
## Demo Plan
### Option A: {Demo Name}
- What to show: {description}
- Commands:
```bash
{commands from project}
Based on the codebase, anticipate these questions:
"Why {technology choice}?"
"How does {complex feature} work?"
{Generate 3-5 based on codebase}
Plan created: {date} Based on: {codebase path} Ready for slide generation: [ ]
---
## Phase 4: Review Plan with User
1. **Present the plan summary** to the user
2. **Highlight key decisions**:
- Sections included
- Diagrams planned
- Code examples selected
3. **Ask for feedback**:
"Does this plan capture what you want? Any sections to add, remove, or adjust?"
4. **Iterate** on the plan until approved
5. **Save the final plan**
---
## Phase 5: Generate Slides from Plan
Once the plan is approved:
1. Read the plan document
2. Generate `slides.md` following the plan structure
3. Create all diagrams specified in the plan
4. Include all code examples from the plan
5. Add presenter notes from the plan
### Output Files
```text
{project-name}-presentation/
├── .markdownlint.json # Linting config (required)
├── {project-name}-presentation-plan.md # The plan (presenter reference)
└── slides.md # The slides
```
### Linting Configuration
Before writing `slides.md`, create `.markdownlint.json` in the presentation directory:
```json
{
"MD003": false,
"MD024": false,
"MD025": false,
"MD026": false,
"MD033": false,
"MD041": false
}
```
This prevents linters from corrupting Slidev's multi-frontmatter syntax.
### Final Instructions
```text
Created:
- Plan: {project-name}-presentation-plan.md
- Slides: slides.md ({N} slides)
Preview: npx slidev slides.md
The plan document serves as your presenter notes!
```