How kunalamin/visual-explainer works
1. Repository type
- This is not a traditional app; it is an agent skill/plugin package.
- The repo ships prompt files, manifests, reference docs, HTML templates, and a small deploy script that together teach an AI agent how to generate visual explanations.
2. Top-level packaging boundary
- .claude-plugin/ contains the marketplace-facing plugin metadata.
- plugin.json identifies the plugin, and marketplace.json registers it in the catalog.
- This boundary is about distribution and discovery, not runtime behavior.
3. Primary skill boundary
- plugins/visual-explainer/ is the actual skill payload.
- Its own .claude-plugin/plugin.json acts as the skill manifest for the plugin runtime.
- Everything else in this folder is content the agent consumes to decide what to generate.
4. Command entry points
- commands/ contains the slash-command prompts, such as generate-web-diagram, diff-review, plan-review, project-recap, and share.
- These are the main user-facing orchestration endpoints.
- Each command steers the agent toward a particular output shape: diagram, review, recap, slide deck, or shareable page.
5. Behavioral guidance layer
- SKILL.md defines the core workflow and design principles for the agent.
- This file is the central behavioral contract: it explains how the skill should choose layouts, manage complexity, and present information visually.
6. Reference knowledge layer
- references/ contains reusable design and implementation guidance the agent reads before generating output.
- The docs are organized by concern:
- css-patterns.md for layout/theming/animation choices
- libraries.md for supported visualization libraries like Mermaid or Chart.js
- responsive-nav.md for long-form navigation patterns
- slide-patterns.md for slide-deck structure and presentation patterns
- This layer acts like a lightweight knowledge base for consistent output quality.
7. Template rendering layer
- templates/ contains self-contained HTML examples for the output formats:
- architecture.html
- data-table.html
- mermaid-flowchart.html
- slide-deck.html
- These templates are the presentation substrate the agent adapts when generating final pages.
- The repo’s architecture is intentionally browser-native: output is HTML, not a compiled app.
8. Sharing/deployment path
- scripts/share.sh is the only executable helper in the repo.
- It packages or deploys generated HTML to Vercel and returns a shareable URL.
- This is the external publishing boundary for turning local output into a link.
9. Execution flow
- A user invokes a command or directly asks the agent for a visualization/review.
- The agent reads SKILL.md, the relevant command file, and supporting reference docs.
- It then selects an HTML template or Mermaid-based approach, writes the result to ~/.agent/diagrams/..., and opens it in a browser.
- If sharing is requested, the script pushes the HTML to Vercel.
10. Output model
- The system favors static, self-contained HTML pages with optional embedded Mermaid/visual libraries.
- That means the main runtime dependencies are the browser and the agent environment, not a backend service or build pipeline.
- The repo is therefore best diagrammed as a content-driven generator with a browser-rendered output stage.
11. Supported host environments
- The README shows the same skill can be installed into Claude Code, Pi, and OpenAI Codex environments.
- That matters architecturally because the repo is designed to be portable across agent runtimes, with command prompts and skill files copied into each host’s expected directories.
12. Key architecture takeaway
- The repository is a plugin distribution package composed of:
- metadata/manifests for discovery,
- command prompts for entry points,
- reference docs for generation policy,
- HTML templates for rendering,
- a share script for publication.
- There is no monolithic application core; the “engine” is the agent runtime interpreting these files.
Main entry points: SKILL.md Skill guide · generate-web-diagram.md Generate diagram · generate-slides.md Generate slides · generate-visual-plan.md Visual plan
Components 21
Distribution
Marketplace-facing plugin metadata and package boundary.
- Marketplace · Registers the plugin for discovery and installation.
.claude-plugin/marketplace.json - Root manifest · Top-level plugin identity and distribution metadata.
.claude-plugin/plugin.json
Visual Explainer
Primary skill payload consumed by the agent runtime.
- Skill manifest · Plugin manifest for the visual explainer skill runtime.
plugins/visual-explainer/.claude-plugin/plugin.json - Skill guide · Core workflow, principles, and generation rules for the agent.
plugins/visual-explainer/SKILL.md
Content layer
Commands, guidance, references, templates, and publishing helper.
- Generate diagram · Primary command for producing web diagrams.
plugins/visual-explainer/commands/generate-web-diagram.md - Generate slides · Command for slide-deck output.
plugins/visual-explainer/commands/generate-slides.md - Visual plan · Command for planning visual structure and output shape.
plugins/visual-explainer/commands/generate-visual-plan.md - Diff review · Command for reviewing changes and differences visually.
plugins/visual-explainer/commands/diff-review.md - Plan review · Command for reviewing plans and proposals.
plugins/visual-explainer/commands/plan-review.md - Project recap · Command for summarizing a project into a visual recap.
plugins/visual-explainer/commands/project-recap.md - Share · Command that triggers packaging or publication of generated output.
plugins/visual-explainer/commands/share.md - Fact check · Command for validating claims and factual content.
plugins/visual-explainer/commands/fact-check.md - Libraries · Supported visualization libraries and when to use them.
plugins/visual-explainer/references/libraries.md - CSS patterns · Layout, theming, and animation guidance.
plugins/visual-explainer/references/css-patterns.md - Responsive nav · Patterns for long-form navigation and page structure.
plugins/visual-explainer/references/responsive-nav.md - Slide patterns · Presentation structure guidance for slide decks.
plugins/visual-explainer/references/slide-patterns.md - Architecture HTML · Browser-native template for architecture visualizations.
plugins/visual-explainer/templates/architecture.html - Data table · Template for tabular or structured outputs.
plugins/visual-explainer/templates/data-table.html - Mermaid flowchart · Template for Mermaid-based diagrams.
plugins/visual-explainer/templates/mermaid-flowchart.html - Slide deck · Template for slide-based presentations.
plugins/visual-explainer/templates/slide-deck.html - Share script · Packages or deploys generated HTML to Vercel and returns a shareable link.
plugins/visual-explainer/scripts/share.sh
Connections 21
- Marketplace → Root manifest: registers · Catalog entry points to the plugin package metadata.
- Root manifest → Skill manifest: installs · Distribution boundary delivers the skill payload.
- Skill manifest → Skill guide: defines · Skill metadata anchors the behavioral contract.
- Skill guide → Generate diagram: orients · Core guidance shapes the main diagram-generation command.
- Skill guide → Generate slides: orients · Core guidance shapes slide generation.
- Skill guide → Visual plan: orients · Core guidance shapes visual planning.
- Skill guide → Diff review: orients · Core guidance shapes review workflows.
- Skill guide → Plan review: orients · Core guidance shapes plan review.
- Skill guide → Project recap: orients · Core guidance shapes recap output.
- Skill guide → Fact check: orients · Core guidance shapes factual validation.
- Generate diagram → Libraries: consults · Commands rely on supported library guidance.
- Generate diagram → CSS patterns: consults · Commands use presentation and styling guidance.
- Generate slides → Slide patterns: consults · Slide generation uses slide-specific patterns.
- Visual plan → Responsive nav: consults · Planning uses navigation and structure patterns.
- Generate diagram → Architecture HTML: renders · Primary diagram command adapts the architecture template.
- Generate diagram → Mermaid flowchart: renders · Can also produce Mermaid-based diagrams.
- Generate slides → Slide deck: renders · Slide command uses the slide deck template.
- Visual plan → Data table: renders · Planning output can use structured table presentation.
- Project recap → Architecture HTML: renders · Recap output can be browser-native HTML.
- Share → Share script: executes · Share command invokes the deployment helper.
- Share script → Architecture HTML: publishes · Deployment path packages generated HTML for sharing.