4/5 Anatomy of a Plugin: Inside Marp Magic

· 6 min read

Previous: Skills That Solve Real Problems

Posts 2 and 3 showed individual skills — single files handling single tasks. That’s powerful, but some workflows need a team. A presentation isn’t just writing slides. It’s research, audience analysis, narrative structure, visual design, content writing, speaker notes, and quality review.

Marp Magic is a Claude Code plugin that does all of this. 10 specialized agents, 3 commands, 3 proactive skills, and hooks that trigger validation automatically. One command turns a topic and audience into a finished Marp presentation.

This post opens the hood.

What’s a Plugin?

A plugin is a distributable package containing:

ComponentWhat it doesExample
AgentsSpecialized AI roles with focused instructions”You are a topic researcher”
CommandsEntry points the user invokes (slash commands)/start-new
SkillsProactive validators that run automaticallySlide density checker
HooksTriggers that fire on events (file edits, tool calls)“On file save, validate syntax”

Install a plugin with /plugin in Claude Code. It adds capabilities without you writing any of the components yourself.

The Agent Roster

Marp Magic has 10 agents. Each is a Markdown file defining a role, responsibilities, and constraints:

AgentRole
presentation-orchestratorCentral coordinator — manages workflow, tracks progress, gets user approval
topic-researcherGathers facts, statistics, case studies via web search
audience-profilerAnalyzes target audience: knowledge level, motivations, attention span
narrative-architectBuilds the presentation structure using frameworks (SCQA, Problem-Solution)
slide-content-writerWrites on-screen text — concise, scannable, 6x8 Rule compliant
speaker-note-crafterCreates detailed notes with timing cues, transitions, emphasis points
visual-theme-designerRecommends Marp themes, color palettes, fonts, layout directives
content-editorReviews tone, flow, clarity, grammar — the editor-in-chief
syntax-checkerValidates Marp Markdown syntax (frontmatter, delimiters, directives)
marp-final-checkerQA for design consistency (heading sizes, layouts, visual rhythm)

Each agent only does its job. The researcher doesn’t write slides. The designer doesn’t edit content. The orchestrator coordinates them.

The Workflow

When you run /marp-magic:start-new, here’s what happens:

graph TD A["User: topic + audience"] --> B["topic-researcher"] B --> C["audience-profiler"] C --> D["narrative-architect"] D --> E["slide-content-writer"] E --> F["speaker-note-crafter"] F --> G["visual-theme-designer"] G --> H["/format-as-marp"] H --> I["syntax-checker"] I --> J["marp-final-checker"] J --> K["presentation.md"]

After each step, the orchestrator saves the output to a numbered file and asks for your approval:

  • Approve — proceed to next agent
  • Request changes — specify what to adjust
  • Regenerate — try again with a different approach
  • Pause — save progress and stop

You’re always in control. The agents do the work; you make the decisions.

File-Based Progress

Every presentation gets its own folder with numbered outputs:

my-presentation/
├── _progress.md           ← workflow status tracker
├── 00-config.md           ← topic, audience, duration, goal
├── 01-research.md         ← topic-researcher output
├── 02-audience.md         ← audience-profiler output
├── 03-outline.md          ← narrative-architect output
├── 04-slides.md           ← slide-content-writer output
├── 05-notes.md            ← speaker-note-crafter output
├── 06-theme.md            ← visual-theme-designer output
├── 07-review.md           ← content-editor output
├── 08-syntax.md           ← syntax-checker output
├── 09-final.md            ← marp-final-checker output
└── presentation.md        ← FINAL — ready to present

Every intermediate step is saved. You can go back to any point, review what the audience profiler found, or see what the editor flagged. It’s version control for the creative process.

Commands: Three Entry Points

CommandWhen to use
/marp-magic:start-newStart from scratch — topic idea to finished deck
/marp-magic:review-existingReview and improve an existing presentation
/marp-magic:format-as-marpConvert prepared content into valid Marp Markdown

Commands are how users interact with the plugin. Each command triggers a different workflow path through the agents.

Skills: Proactive Validators

Unlike commands (which you invoke manually), skills run proactively — they watch for issues as you work:

SkillWhat it checks
marp-slide-density-checkerWarns about text-heavy slides (6x8 Rule: max 6 bullets, 6-8 words each)
marp-directive-validatorValidates Marp directive syntax in real-time
marp-note-length-checkerEnsures speaker notes are 75-200 words per content slide

These catch problems before they compound. A slide with 12 bullet points gets flagged immediately, not after the entire deck is written.

Hooks: Automatic Triggers

The plugin includes a hook that fires whenever a file is edited:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "echo \"[MARP MAGIC]: File edit detected. Consider running syntax-checker...\""
          }
        ]
      }
    ]
  }
}

Every time Claude Code edits a file, the hook reminds you to validate. It’s a safety net that prevents broken syntax from accumulating.

What It Produced

This plugin created the actual workshop presentation that inspired this series — 36 slides with full speaker notes, audience-specific messaging, visual theming, and Marp syntax. The entire process:

  1. User provides: “Claude Code skills workshop for non-technical business users, 5 hours”
  2. Researcher gathers Claude Code stats, skills ecosystem data, workshop best practices
  3. Audience profiler creates CFO/HR/Account Manager personas with pain points and motivations
  4. Narrative architect builds a 9-segment workshop flow with emotional journey mapping
  5. Slide writer creates 36 slides following the 6x8 Rule
  6. Note crafter adds 42KB of speaker notes with timing cues and transitions
  7. Theme designer recommends warm colors (not intimidating), readable fonts, recipe-card code blocks
  8. Editor and QA review everything

One command. Ten agents. A production-ready presentation.

For deep dives on Marp itself, see Marp Presentations: Markdown Becomes Slides. For Mermaid diagrams used in the slides, see Mermaid Diagrams: When Text Becomes Visual.

The Plugin Manifest

Every plugin has a plugin.json:

{
  "name": "marp magic",
  "description": "From Idea to Presentation - AI-powered MARP presentation workflow",
  "version": "1.2.0",
  "author": "Dalibor Kubis"
}

Install any plugin in Claude Code with /plugin. Pin versions for reproducibility. The 12+ official Anthropic plugins plus community plugins cover everything from code review to deployment.

Next: From Skills to Agents: What Comes Next