/moonshine:moonshinefrom moonshine
Creates interactive, web-based technical explanations inspired by Distill.pub. Helps turn complex ideas into explorable visual articles with prose-driven narratives and interactive figures.
Ships in moonshine. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Moonshine helps create interactive, web-based explanations of technical concepts. Inspired by Distill.pub's argument that research distillation is valuable creative work, it provides scaffolding to turn complex ideas into explorable, visual, interactive articles.
AI tools generate complexity faster than people can consume it. Moonshine is for bridging that gap: helping people digest and communicate technical concepts clearly.
Reference files:
STILL.md the structured Vite + React project flavor: markdown directives, figure registry, in-place editing, publishingARTICLE.md the shine substrate: single-file HTML scaffold, CSS foundation, layout patterns, series structure (shine's hand-built kind)VISUALS.md visualization patterns, interaction, rendering technology, iteration (both substrates; see its preamble for still differences)skills/diagram/SKILL.md system, relationship and process diagrams in a still article: what gets a node, what a link means, when the built-in diagram fits and when a board of glyph tiles does, and how to match the diagrams an article already hasFEEDBACK.md the authorship-feedback protocol: comments from the rendered still article flow back to the agent, and suggestions flow from the agent to the author, who accepts, edits or rejects each one in the pageThis is the central principle. Everything else follows from it.
Moonshine makes explanatory articles where prose drives understanding and interactive figures serve the narrative. We are not making dashboards, data products, or slide decks. The difference matters because it shapes every decision:
When in doubt about a design choice, ask: "Would this feel at home in a Distill.pub article, or in a Grafana dashboard?" If the answer is dashboard, reconsider.
We are also not making coding tutorials. Equations and their connection to behavior should be shown through interactive visualizations, not code listings. If pseudocode helps connect math to implementation, keep it minimal and pair it with the equation. Never show implementation code (framework boilerplate, shader code, API calls) unless the article is specifically about programming.
Moonshine renders articles on one of two substrates. Decide early, during story discovery, and confirm the choice at the Phase 1 checkpoint:
If the user invoked a specific skill (/moonshine:shine or /moonshine:still), the choice is made. If they invoked moonshine generically, default to still — nearly every real article keeps being edited after first publication, and still is where the authoring affordances live (in-place editing, the knob panel, authorship feedback). Offer shine when the user wants one file they can email or host anywhere with no build step. Everything still-specific lives in STILL.md; the authorship-feedback loop (FEEDBACK.md) is still-only.
Do not skip to code. The most common failure mode is jumping straight to scaffolding without understanding what the user is trying to explain and who they're explaining it to. The second most common failure mode is asking a few questions upfront and then writing the entire article in one shot.
Moonshine is a conversation, not a generation pipeline. The process has natural checkpoints where you stop and check in with the user before continuing.
Before writing any code, have a conversation with the user. Ask questions and listen. You need to understand:
Ask these questions one or two at a time. Start with "What are you trying to explain?" and follow the thread. Wait for answers before moving on. If the user gives you all the context upfront, you can move faster, but if they give a brief prompt, slow down and ask.
Checkpoint: Before moving to Phase 2, confirm the concept, audience, insight, and progression with the user. "Here's what I think we're building..." This is the single most important moment in the process. Get it wrong and everything downstream is wasted effort.
Now design the article at a high level. Present the user with a proposed structure:
Write this as a short outline, not code. For each figure, describe it in prose: what it shows, what the reader can do with it, and what they should learn from it. This prose description is the spec. Something like:
1. Opening: what gradient descent is trying to do
Prose + static diagram of a loss landscape as a 3D surface
2. The naive approach: why random search fails
Interactive: click to place random guesses on the surface, watch them miss the minimum
3. Following the slope: the gradient points downhill
Interactive: drag a point on the surface, an arrow shows the gradient direction and magnitude
4. Step size matters: too big overshoots, too small stalls
Explorable: slider controls learning rate, animation shows convergence path on the surface
5. Putting it together: watch gradient descent solve a real problem
Scroll-driven: each scroll step reveals the next iteration, building the path incrementally
Checkpoint: Share this outline with the user. Ask if the progression makes sense. Are there concepts missing? Is the order right? Should any section be interactive that isn't, or static that is? Do the prose descriptions of the figures capture what the user has in mind? This is cheap to change now and expensive to change after building.
Pick the most important interactive section and build it first. Not the whole article. One section.
Open it in the browser. Show the user. Ask:
Iterate on this section until it works before building the rest.
Build the remaining sections, following the structure from Phase 2. After each major section, open in the browser to verify. Prose should be written alongside the figures, not after, because the prose frames what the reader should notice in each figure.
Checkpoint: Before delivering, verify the article. None of these steps is optional, and "it built" is not one of them. The shipped examples in this repo were delivered without them and were later found with blank figures, frozen simulations and captions describing behaviour the figure did not have.
STILL.md, "Suggestions").prefers-color-scheme). At 360px: no text under 13px, no horizontal page scroll, and a one-finger swipe that starts on a figure still scrolls the page. See "Phones and touch" in VISUALS.md.If no browser is available, say so in the delivery message and list which of steps 3 to 6 were not done. Do not report them as checked.
Create projects in ~/.agent/moonshine/project-name/. On the shine substrate each explanation is a self-contained HTML file; see ARTICLE.md for the scaffold template, layout patterns, and series structure. On the still substrate the project is a Vite + React app; see STILL.md for the bootstrap procedure and project structure.
After building, open the result in the browser (shine) or report the dev server URL to the user (still).
Moonshine articles should have clear and humble prose. We are helping people digest, not force-feeding them. The writing should feel like a knowledgeable colleague explaining something at a whiteboard, not a keynote presentation.
The one-line rule: remove the performance, keep the explanation. Authorial performance is anything that draws attention to the writing instead of the thing being explained — the dramatic reveal, the quotable maxim, the teaser heading, the clever construction. The patterns below were extracted from a human author's line edits of drafted moonshine prose; each shows the move with a real before/after.
Flatten the two-sentence reveal. A punchy short sentence that "lands" a point reads as written, not spoken. Merge it into the prior sentence unless the punch is doing real work.
Cut the maxim. Delete any sentence that restates the point as a quotable principle or design slogan ("That is the property a good design should lean on: build for the shape, let the specifics be data." / "That is one word per field, not new machinery."). State the concrete fact and trust the reader to extract the lesson; don't hand them the moral.
Headings describe or ask; they never tease. Two reliable shapes: a gerund naming the activity, or the reader's literal question.
A metaphor may name a chapter in a kicker line, never in the h1 or <title>, and it must name the same thing in every chapter. A series whose parts are titled "The Lens", "The Projector" and "The Filter" tells a reader scanning the index nothing, and "projector" drifted between two different tools by part five.
Ground in the real artifact. Link or point to the concrete thing — the page, the file, the running demo — and start there. Cut abstract scene-setting that delays arrival; start at the point, not one sentence before it. "The reviews page shows all the reviews with minimal context and a quick approve button, how do we determine what to show in that list?" beats two sentences of conceptual framing about what the system can and cannot infer.
Hedge the absolutes. Final-sounding claims become partial and forward-looking: "not just a matter of styling" over "not styling"; "percent is a reasonable starting point" over "the cheapest way"; "in the future we can explore min/max hints" over closing the question.
Plain subjects, plain verbs. Make "we" (or the system) the subject instead of a nominalized abstraction. "We can't group into context, proposal, and evidence via inference alone" beats "The grouping into context, proposal, and evidence is the other thing inference cannot do."
Asides must earn their length. A vivid illustrative example survives only if it teaches faster than the literal mechanism stated plainly ("extending the format hint in the schema by introducing percent" needed no inventory of temperatures and row counts).
And the standing rules:
The target register is deliberately relaxed — conversational comma-joins, "Let's", "Currently" are on-voice. Relaxed is not unproofed: this register invites comma splices that don't scan and dropped words ("what it is important"), so proofreading is its own pass.
After drafting prose, and again before delivering, walk each section against this checklist. It is the patterns above in executable order:
These rules come from Gopen's reader-expectation theory, adapted for explanatory articles. Readers receive meaning from structure, not from the writer's intention.
Topic position. The beginning of a sentence tells the reader whose story is being told. Keep the continuing subject in topic position across a paragraph. If every sentence starts with a different actor, the reader can't track the thread.
Stress position. The end of a sentence carries emphasis. Put the new concept, the causal turn, or the surprising detail near the end. Don't waste the stress position on filler ("basically", "in a sense", "overall").
Old to new. Begin sentences with material the reader already knows. Add new information after the familiar anchor. This lets the reader absorb each step without backtracking.
Subject-verb proximity. Don't let the grammatical subject and verb drift apart. Long sentences are fine. Buried verbs are not.
Action in verbs. "The creation of alignment occurred through implementation of a review process" hides the action in nouns. "The review process aligned the teams" puts it where it belongs.
Ban the machinery, not just the vocabulary. These structural patterns signal AI prose regardless of word choice.
Negation pivot: "It is not X. It is Y." / "This is not about X; it is about Y." Only use this shape to correct a real false premise the reader holds. Otherwise, state the mechanism directly.
False elevation: "More than just X..." / "This is more than a tool..." / "Beyond being X..." If something is important, show what it does. Don't announce that it transcends its category.
Dramatic reveal punctuation: "The real issue: Y." / "The result? Z." / "One thing is clear: Y." Use punctuation for syntax, not as a drumroll.
Triadic adjective stacks: "clear, concise, and compelling" / "robust, scalable, and intuitive." If three adjectives can be swapped with three others and the sentence still works, the sentence says nothing.
Aphoristic mirror sentences: "X is the artifact; Y is the product." / "X is the surface; Y is the substrate." Symmetry is not insight. These sound smart because they are balanced, not because they are true.
Grand openers: "In today's fast-paced world..." / "In an ever-evolving landscape..." / "In the realm of..." Start inside the subject.
Meta signposting: "In this article, we'll explore..." / "Let's dive in." / "Here are the key takeaways." The reader is already reading. Don't narrate the experience of reading.
When a sentence smells like AI prose, don't just swap words. Rebuild the claim using this diagnostic scaffold:
Under [condition], [actor] does [behavior] because [mechanism]. The pattern breaks when [boundary].
This scaffold is a repair tool, not always final prose. But it forces you to find the actor, mechanism, and boundary that the slop sentence was hiding.
Bad: "The visualization unlocks deeper understanding." Repair direction: What does the reader do with the visualization? What changes in their mental model? When does the visualization fail to help?
Prose can obey every rule above and still fail. Watch for:
Repair by adding pressure, not ornament: a stranger but accurate concrete detail, a real countercase, a boundary where the model breaks, or a sentence that admits uncertainty without surrendering the claim.
AI coding tools have strong defaults that produce generic, recognizable output. Moonshine articles should not look like AI made them. They should look like a thoughtful person made them.
The test is simple: does this look like an article, or does it look like a dashboard? Every rule below is a specific case of that question.
Dashboard patterns to avoid:
Generic AI visual patterns to avoid:
Prose patterns to avoid:
The check: Before delivering, scan the output. If you swapped the content for a different topic and nothing else needed to change, the design is too generic. The visual choices should relate to what's being explained.
Adapted from the anti-slop patterns in visual-explainer by nicobailon.
These principles come from Distill.pub and the broader tradition of explanatory writing:
Information hierarchy. Three levels, always distinguishable. Primary: the key insight and its argument. Secondary: context, definitions, related concepts. Tertiary: technical details, proofs, edge cases (margin notes or expandable sections). Typography, spacing, and visual weight make this hierarchy clear without the reader having to read a word.
Visual encoding. Position and length are the most accurate channels; use them for the most important data. Color encodes categories or highlights, not quantitative information alone. Redundant encoding (color + position) improves accessibility. Consistent visual language across all figures.
Typography. Large readable body (18-20px), generous line height (1.5-1.6), constrained line length (60-75 chars), clear heading hierarchy. Monospace for code, KaTeX for math. Margin notes over footnotes. Nothing a reader is meant to read, in a figure or around it, renders under 13px at any width: axis ticks, legends, hints, readouts, inline code in captions.
Interaction patterns.
| Pattern | Use When |
|---|---|
| Details-on-demand | Supplementary info would clutter the narrative |
| Explorable explanation | The concept involves a parameter space to explore |
| Linked views | The same data has multiple meaningful representations |
| Scroll-driven narrative | The explanation has a natural sequence of reveals |
| Animated transition | The path between two states is meaningful |
These principles come from building real moonshine articles and noticing what gets corrected most often.
Exaggerate for clarity. Default parameter values should make phenomena dramatically visible. If you're showing viscosity, crank it up so the effect is obvious. If you're showing divergence between two methods, pick parameters where they clearly disagree. Pedagogical clarity trumps physical realism. The reader can always dial things down; they can't learn from effects too subtle to see.
Sensible defaults. Every interactive figure must show something interesting before the reader touches anything. No blank canvases, no "click a particle to start", no grids of dots waiting to settle. Pre-select a default element, pre-populate with data, start the simulation in a state that already demonstrates the concept.
Slow enough to follow. Animated demonstrations should move slowly enough that the reader can track cause and effect. When a particle moves through a field, the reader needs to see the field respond. When in doubt, go slower. The reader can always speed things up.
Consistent conventions across figures. If you show a radius as a dotted circle in one figure, show it the same way in every figure. If you color-code a variable blue in an equation, use that same blue everywhere it appears. Inconsistency forces the reader to re-learn the visual language in each figure.
Looping animations reset cleanly. If a demonstration loops, it should reset to its initial state, not carry over physics or accumulated values from the previous iteration.
Each figure opens in its own state. Two consecutive figures that look identical on load teach the reader that the second one is a repeat. Give each figure a default that differs from the figure before it, and never open on an instruction ("Click a joke on the map"): pre-select the example the prose discusses.
A comparison must be able to show a difference. Before building a side-by-side, check that the two things can differ on the chosen data. Embedding 2-D data into 2-D makes every method look perfect. Views being compared share one scale: a difference strip normalised to its own maximum looks the same for every pair.
A reader trusts an interactive figure more than a sentence, because it appears to be the thing itself running. These rules keep that trust earned. Every one of them was broken in an example this repo shipped.
A figure may generate its inputs, never its results. Synthetic points, a made-up corpus, a toy graph: fine, and say so. But what the figure shows happening to that input has to be computed by the method the figure names. A recall curve drawn from a formula, a "product quantizer" that adds noise to true distances, or a "trained" autoencoder that plots the generating function are illustrations of what the author expects, and they are wrong in the cases where the expectation is wrong.
A figure named after a method runs that method. If the real algorithm is too heavy for the page, run a reduced version and state the reduction in the caption ("exact t-SNE on 300 points, no Barnes-Hut"). Never label a panel "UMAP-like" or "PHATE-like". If it is a cartoon of the idea, call it a cartoon in the caption.
A model is labelled as a model. A cost model, a hand-rated comparison matrix and a schematic are all legitimate, as long as the caption says which one the reader is looking at. Do not print model output in the style of a measurement.
Prose is checked against the page. For each number, named example, offered control and "watch it do X" sentence, find what makes it true: a line of code, a row of the shipped data, a screenshot. Typical failures: the prose says four methods and the code has three; a dropdown offers nine combinations and five exist; the prose invites the reader to "type your own query" and there is no input; an example cluster ("bicycles, transportation") that is not in the data.
Numbers about the article's own data are recomputed at delivery. File sizes, counts, hosts, timings and percentages drift as the project changes. Recompute them from the files, and leave a comment next to each constant in the figure source naming where it came from. Report a range when the mean hides the case the reader will hit ("0.2 to 18 MB per chunk", not "about 7 MB").
Facts recalled from memory are marked for the author. Published benchmark figures, library defaults and paper results that you did not look up go in the delivery message as a list for the author to check, not silently into the prose.
A simulation of a feature says it is one. When an article about a tool reproduces a piece of that tool's interface (a dev-only editor, a panel), the caption says it is a reproduction, and it behaves like the real thing in the respects the prose mentions.
ARTICLE.md (opens in a new tab)FEEDBACK.md (opens in a new tab)STILL.md (opens in a new tab)VISUALS.md (opens in a new tab)template/README.md (opens in a new tab)template/content/diagrams.md (opens in a new tab)template/content/example.md (opens in a new tab)template/content/figures/flow-diagram.json (opens in a new tab)template/content/figures/training-system.json (opens in a new tab)template/content/series/01-gradient-descent.md (opens in a new tab)template/content/series/02-momentum.md (opens in a new tab)template/content/series/index.md (opens in a new tab)template/index.html (opens in a new tab)template/moonshine.config.json (opens in a new tab)template/package-lock.json (opens in a new tab)template/package.json (opens in a new tab)template/src/App.tsx (opens in a new tab)template/src/components/Article.tsx (opens in a new tab)template/src/components/AuthorshipHUD.tsx (opens in a new tab)template/src/components/BlockReorderLayer.tsx (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub enjalot/moonshine --plugin moonshine6 skills in this plugin
/critiqueAdversarial critique of a moonshine article (still or shine) against the skill's editorial, visual, and pedagogy standards. Use when the user wants a moonshine article reviewed, graded, or checked for slop before publishing. Invoked as `$critique` or `$critique <path>`./diagramDesign and build a system, relationship, or process diagram for a moonshine still article so it reads right the first time, matching the diagrams the article already has. Use when the user asks for a diagram, an architecture or flow figure, "nice icons", or to make one figure look like the diagrams in another article. Invoked as `$diagram` or `$diagram <what to draw>`./moonshine-listenListen for moonshine authorship feedback and address comments on an interval. Invoke when the author asks you to watch for feedback from the article HUD, or when prompted to start the listener. Best run under /loop (e.g. `/loop $moonshine-listen`) so it keeps ticking while the session is idle.Other plugins' skills for the same job