From bf00b3adea657db8a2d08f396a9fc9d868d6d409 Mon Sep 17 00:00:00 2001 From: mkucharski17 Date: Fri, 12 Jun 2026 08:27:41 +0200 Subject: [PATCH] lean-interactive-html: add plugin for generating interactive HTML artifacts Codifies the recurring ask for single-file interactive HTML deliverables (reports, architecture diagrams, plans, questionnaires, proposals) into a reusable skill with a copy-first skeleton and per-archetype recipes, so artifacts share one house style instead of being reinvented per session. --- .claude-plugin/marketplace.json | 9 + README.md | 4 + .../.claude-plugin/plugin.json | 21 ++ plugins/lean-interactive-html/CHANGELOG.md | 7 + plugins/lean-interactive-html/README.md | 45 ++++ .../skills/interactive-html/SKILL.md | 64 +++++ .../interactive-html/references/archetypes.md | 176 +++++++++++++ .../interactive-html/references/skeleton.html | 241 ++++++++++++++++++ .../lean-interactive-html-usage/SKILL.md | 30 +++ 9 files changed, 597 insertions(+) create mode 100644 plugins/lean-interactive-html/.claude-plugin/plugin.json create mode 100644 plugins/lean-interactive-html/CHANGELOG.md create mode 100644 plugins/lean-interactive-html/README.md create mode 100644 plugins/lean-interactive-html/skills/interactive-html/SKILL.md create mode 100644 plugins/lean-interactive-html/skills/interactive-html/references/archetypes.md create mode 100644 plugins/lean-interactive-html/skills/interactive-html/references/skeleton.html create mode 100644 plugins/lean-interactive-html/skills/lean-interactive-html-usage/SKILL.md diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 8ccadea..00bfef3 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -130,6 +130,15 @@ "./skills/flutter-read-logs-usage", "./skills/read-logs" ] + }, + { + "name": "lean-interactive-html", + "source": "./plugins/lean-interactive-html", + "description": "Generate single-file interactive HTML reports, dashboards, plans, architecture diagrams, and decision forms — self-contained, no CDN, no build step, via /interactive-html.", + "skills": [ + "./skills/lean-interactive-html-usage", + "./skills/interactive-html" + ] } ] } diff --git a/README.md b/README.md index 9733f55..111729d 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,10 @@ Most plugins are pure rules and skills with no setup. A few need one-time toolin - [`flutter-marionette`](plugins/flutter-marionette/) - runtime interaction with a live debug app through Marionette MCP for exploration, smoke checks, and UI debugging - [`flutter-read-logs`](plugins/flutter-read-logs/) - read the running app's latest `flutter run` logs as on-demand context via `/read-logs` +### Docs and reporting + +- [`lean-interactive-html`](plugins/lean-interactive-html/) - single-file interactive HTML artifacts (reports, dashboards, plans, architecture diagrams, decision forms) via `/interactive-html` — not Flutter-specific + ### Every plugin has a `-usage` skill Once a plugin is installed, it exposes a `/-usage` skill — for example `/flutter-bloc-usage`, `/flutter-cqrs-usage`, `/flutter-ui-usage`. Run it to see what the plugin covers, its conventions, and example prompts to try next. It's the fastest way to learn a plugin without reading its full `README.md`. If you're not sure where to begin, run `/lean-core-usage` for a tour of the whole marketplace. diff --git a/plugins/lean-interactive-html/.claude-plugin/plugin.json b/plugins/lean-interactive-html/.claude-plugin/plugin.json new file mode 100644 index 0000000..3e10a7c --- /dev/null +++ b/plugins/lean-interactive-html/.claude-plugin/plugin.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", + "name": "lean-interactive-html", + "displayName": "Interactive HTML Artifacts", + "description": "Generate single-file interactive HTML reports, dashboards, plans, architecture diagrams, and decision forms.", + "version": "0.1.0", + "stability": "experimental", + "author": { + "name": "LeanCode" + }, + "homepage": "https://github.com/leancodepl/ai-plugins", + "repository": "https://github.com/leancodepl/ai-plugins", + "keywords": [ + "html", + "report", + "dashboard", + "visualization", + "docs" + ], + "skills": "./skills/" +} diff --git a/plugins/lean-interactive-html/CHANGELOG.md b/plugins/lean-interactive-html/CHANGELOG.md new file mode 100644 index 0000000..d51e9ba --- /dev/null +++ b/plugins/lean-interactive-html/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +## 0.1.0 + +- Initial `lean-interactive-html` plugin. +- `skills/interactive-html/SKILL.md` — generate single-file interactive HTML artifacts via `/interactive-html`, with five archetypes (report, architecture, plan, questionnaire, proposal), a copy-first `skeleton.html`, and per-archetype recipes in `references/archetypes.md`. +- `skills/lean-interactive-html-usage/SKILL.md` — explain what the plugin does and when to reach for it. diff --git a/plugins/lean-interactive-html/README.md b/plugins/lean-interactive-html/README.md new file mode 100644 index 0000000..7f88bac --- /dev/null +++ b/plugins/lean-interactive-html/README.md @@ -0,0 +1,45 @@ +# lean-interactive-html + +LeanCode plugin that turns analysis into a single-file interactive HTML artifact you can +open, click through, and send to someone. Instead of a wall of markdown, you ask: + +``` +/interactive-html report summarize this security audit +``` + +Claude gathers the real data, builds a self-contained HTML file in the house style, and +opens it in your browser. Not Flutter-specific — it works in any repo. + +## Archetypes + +| Archetype | What you get | +|---|---| +| `report` | audit / PR-review / stats dashboard: stat cards, status badges, filterable findings, copy-draft button | +| `architecture` | clickable system diagram: entity boxes, runtime-drawn SVG connectors, detail side panel | +| `plan` | migration/feature briefing: tabs, phase checklists persisted across reloads, evidence-from-code collapsibles | +| `questionnaire` | decision form: clickable options, live progress bar, copy-answers button to paste back into the chat | +| `proposal` | process proposal: current-vs-proposed toggle plus a step-through simulator of the new flow | + +The archetype is optional — Claude infers it from the request when omitted. + +## Included assets + +- `skills/interactive-html/SKILL.md` — the `/interactive-html` workhorse: classifies the + request, gathers real data, adapts the skeleton, and opens the result. +- `skills/interactive-html/references/skeleton.html` — the copy-first base page: design + tokens, dark mode, tabs with keyboard shortcuts, stat cards, badges, pure-CSS bar charts, + filterable tables, localStorage persistence, and clipboard helpers. +- `skills/interactive-html/references/archetypes.md` — per-archetype structure and the + nontrivial JS recipes (SVG connectors, step-through simulator, sticky answer bar). +- `skills/lean-interactive-html-usage/SKILL.md` — explains the plugin and routes here. + +## Design rules the skill enforces + +- **One file, zero dependencies.** No CDN, no frameworks, no fonts from the network, no + build step. Recipients open these offline, behind VPNs, from Slack — every external + dependency is a way for the file to break on someone else's machine. +- **Real numbers only.** Every stat must trace to a command Claude actually ran. Invented + numbers are the #1 rejection reason for these artifacts. +- **Audience-aware.** English for anything with an audience beyond the requester; forced + dark theme for files sent to other people; no secrets or internal hostnames ever — these + files get forwarded. diff --git a/plugins/lean-interactive-html/skills/interactive-html/SKILL.md b/plugins/lean-interactive-html/skills/interactive-html/SKILL.md new file mode 100644 index 0000000..e96de61 --- /dev/null +++ b/plugins/lean-interactive-html/skills/interactive-html/SKILL.md @@ -0,0 +1,64 @@ +--- +name: interactive-html +description: Generates a polished single-file interactive HTML artifact — report, stats dashboard, architecture diagram, migration or feature plan, decision questionnaire, process proposal, PR-review or audit summary. Use whenever the user asks for an "interactive html", an HTML report/doc/dashboard/plan, says "show me this in html" or "summarize this as html", or wants a clickable, browsable artifact to review or send to a PO, teammate, or auditor. Always self-contained — no CDN, no frameworks, no build step. +argument-hint: "[report|architecture|plan|questionnaire|proposal] " +--- + +# Interactive HTML Artifacts + +Produce a single self-contained HTML file the user can open, click through, and send to someone. The artifact is a deliverable, not scratch — people forward these to POs, teammates, and auditors. + +## Workflow + +1. Classify the request into an archetype (table below) from `$ARGUMENTS`; if no archetype is given, infer it from intent and proceed — don't ask. +2. Decide audience, language, and destination (rules below). If the file will be committed next to existing HTML docs in the target repo, read one of them first and match its style — new repo docs are expected to match the house style. +3. Gather REAL data: run the `git`/`gh`/`grep` commands that produce every number and claim you will display. Keep the command list — each stat must survive a "where did you take this from?" challenge. +4. Copy `${CLAUDE_PLUGIN_ROOT}/skills/interactive-html/references/skeleton.html` and adapt — never write the boilerplate from scratch. Read the matching section of [references/archetypes.md](references/archetypes.md) for the chosen archetype. +5. Embed data as an inline ` + + + + diff --git a/plugins/lean-interactive-html/skills/lean-interactive-html-usage/SKILL.md b/plugins/lean-interactive-html/skills/lean-interactive-html-usage/SKILL.md new file mode 100644 index 0000000..4cbb727 --- /dev/null +++ b/plugins/lean-interactive-html/skills/lean-interactive-html-usage/SKILL.md @@ -0,0 +1,30 @@ +--- +name: lean-interactive-html-usage +description: Explain what the `lean-interactive-html` plugin does and how to use it. Use when the user invokes `/lean-interactive-html-usage`, asks what this plugin covers, or needs help generating interactive HTML reports, dashboards, plans, or architecture docs. +--- + +# Interactive HTML Usage + +## How to respond + +- If the user invoked this skill without a concrete task, explain what the plugin does and when to reach for `/interactive-html`. +- If they already have something to visualize — a plan, an audit, an architecture, stats — briefly explain the fit, then run `/interactive-html`. +- Do not reply with filler like "skill loaded" or "ready for the task" before explaining the plugin. + +## What this plugin does + +- Generates polished, single-file interactive HTML artifacts: reports, stats dashboards, architecture diagrams, migration/feature plans, decision questionnaires, and process proposals — via `/interactive-html [archetype] `. +- Every artifact is fully self-contained (no CDN, no frameworks, no build step), so it opens offline, behind VPNs, and from Slack on anyone's machine. +- Ships a copy-first `skeleton.html` (design tokens, tabs, stat cards, badges, filterable tables, localStorage persistence, copy-to-clipboard) plus per-archetype recipes, so artifacts share a consistent house style instead of being reinvented each time. + +## When to use it + +- "Summarize this audit / PR review as an interactive HTML report." +- "Draw the architecture of this system as a clickable diagram." +- "Turn this migration plan into a browsable briefing with progress checkboxes." +- "Give me an HTML questionnaire for these decisions so I can click through and paste answers back." +- "Make an interactive proposal of this process change for the team." + +## Heads-up + +These files get forwarded beyond their original audience — the skill enforces English for any shared artifact and forbids embedding secrets, internal hostnames, or credentials. Every displayed number must trace to a command that was actually run.