isometric-explainer
Builds an interactive isometric machine page. Each station of one invented machine stands for one step of a process. A pure, tested state model drives the motion, the readouts and the copy. The page has controls and a verification loop. Trigger phrases: "isometric explainer", "machine explainer", "explain this as a machine", "interactive isometric figure", "explorable explainer", "show how it works inside".
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 7.8w
- Forks
- 1.4w
01 前言 Front Matter
- name
- isometric-explainer
- tags
- [ "isometric", "svg", "interactive", "explainer", "simulation" ]
- version
- 1.0.0
- description
- Builds an interactive isometric machine page. Each station of one invented machine stands for one step of a process. A pure, tested state model drives the motion, the readouts and the copy. The page has controls and a verification loop. Trigger phrases: "isometric explainer", "machine explainer", "explain this as a machine", "interactive isometric figure", "explorable explainer", "show how it works inside".
02 资源文件 15
- 脚本kit/ink.mjs7.0 KB
- 脚本kit/iso-kit.mjs34.4 KB
- 脚本kit/lathe.mjs46.9 KB
- 许可证kit/LICENSE1.0 KB
- 脚本kit/tube.mjs13.9 KB
- 参考文档references/colour-and-ink.md5.9 KB
- 参考文档references/concept.md3.6 KB
- 参考文档references/geometry.md5.9 KB
- 参考文档references/live.md5.1 KB
- 参考文档references/state-model.md3.4 KB
- 参考文档references/verify.md5.5 KB
- 脚本templates/build.mjs9.9 KB
- 脚本templates/live.js11.8 KB
- 脚本templates/model.mjs1.9 KB
- 脚本templates/model.test.mjs1.4 KB
03 SKILL.md 正文
Isometric Explainer
This skill makes a single-page interactive figure. The figure is a solid isometric machine on a bench. Each station of the machine stands for one step of a process. For example, a request card moves on a carriage, a probe drops, and a press stamps the card. A pure state model decides every move, so the picture, the numbers and the words match. The templates/ folder holds a working starter, and kit/ holds the geometry library it uses.
When to use
- The concept is a process with stations, order and failure modes: a loop, a pipeline, a cache, a queue, a retry policy.
- The reader can break one part and see what fails.
- The figure is the main content of a page.
When not to use
- A static diagram explains the idea. Make a flat SVG figure instead.
- The concept has no order or state change. Make a static figure instead.
- The figure is a small diagram inside a lesson or a README. Use the sibling skill
blueprint-figure. - You cannot write a deterministic model of the behavior. Do not animate a guess.
- The job needs more than 150 parts and the user has not approved the size.
Method
-
Invent the machine. Write one sentence: "X moves through Y, and that motion means Z." If you cannot write it, pick another machine. See
references/concept.md. -
Count the parts on paper before you draw, and pick a tier.
Tier Parts Approval Figure 40 to 80 not needed Hero 80 to 150 not needed Larger more than 150 get the user's approval first -
Write the state model first. Make
model.mjspure and deterministic, with no DOM and no clock.simulate(config)returns an event list and totals. Test it before any geometry. Seereferences/state-model.md. -
Map each concept to a station. Write a table: station, concept word for its label, what it does, what fails without it.
-
Write the parts list. List each part with its assembly, size in world units, tone and whether it moves. Geometry comes after the list.
-
Set the camera. Use world units and one isometric camera. Set elevation to 30 degrees. Pick the azimuth so the working faces point at the viewer. Fit the projection over the assembled and the exploded pose.
-
Build the static geometry once. Each part becomes one SVG group with a depth key. Movers get a
data-livehook. Seereferences/geometry.md. -
Animate by translation. Move a part by changing its
transformonly. Rebuild a path only when its shape changes, such as a rod that gets longer. -
Paint from back to front. Sort groups by depth key plus the depth of their current offset. Reorder the DOM only when the order changes.
-
Paint with colour and ink. Each material has three flat tones, the main bodies have a heavy ink silhouette, and each body casts a short, flat, warm grey shadow on the bench. Exactly one accent colour marks the active part and its pill label. See
references/colour-and-ink.md. -
Add controls that change the model. Run, step, break, repair, reset and the config switches all act on a real
simulaterun. Write the config to the URL. Seereferences/live.md. -
Verify the page in a headless browser. Take screenshots at desktop and phone width in both themes. Add 4x close-ups, a line-end check, a scenario sweep with zero console errors and a contact sheet. See
references/verify.md.
Rules
Truth:
- The state model is the single source of truth. Motion, readouts, trace lines and outcome text all come from its events.
simulatewith the same config returns the same events. A test proves this for every config combination.- Never fake a real model, a real service or real metrics. A scripted part says "fixed script" in the page copy.
- Every page with simulated timing shows a sentence that starts "This is a simulation." and says that times are fixed costs, not measurements.
- Use real arithmetic in the model. Tests assert the exact numbers that the page prints.
Geometry:
- All coordinates are world units. Pixels appear only in the projection.
- Elevation is 30 degrees. The azimuth is one fixed value for the whole page. The reference page uses 60.
- Solids use
inkSolidfromkit/ink.mjs: three flat tones for each material, an ink outline, and a heavier silhouette round each main body. - Every line ends on a solid or on another line. A line with a deliberate loose end carries
data-free="start","end"or"". - Each station carries a pill label with a leader line to its working part, with its concept word in capitals, such as
CACHEorVERIFIER. The page has a Labels switch and reads?labels=0. - Status lights show the state the model gives each station: green when it finished, red when it failed or left a gap.
- Glass covers show what is inside a station: a light tint and one or two streaks.
- A part that rests on another part gets a depth bias so it paints after its support.
Motion:
- Movers change
transformonly. A path that changes shape is rebuilt from cached results where it can be. - One beat lasts 0.1 to 1.3 seconds. Travel time grows with distance.
- Explode uses a spring with stiffness 64, damping 14.2 and a 0.04 s stagger per assembly.
- Clamp the frame step to 1/20 s so a slow frame never skips a beat.
- With reduced motion, runs advance 40 times faster and explode snaps to its end pose.
- The animation loop stops when the stage is off screen and when nothing moves.
Page:
- The workbench fits one screen at desktop width: toolbar, stage and readouts in
100svh. - At phone width the page stacks and never scrolls sideways.
- Buttons are at least 44 px tall. The stage takes focus and has keyboard keys for run, step, explode, break and repair.
- The SVG has
role="img"and anaria-labelthat names every station. - An
aria-live="polite"region announces the outcome when a run ends.
Check before you finish
- [ ] The one-sentence machine statement is written in the page copy or the build notes.
- [ ] The part count matches the approved tier.
- [ ] Model tests pass, including a sweep over every config combination.
- [ ] The page is the output of the build script. Rebuilding produces no diff.
- [ ] Every config control calls
simulateand updates the URL. - [ ] Opening the URL with
?parameters restores the same config. - [ ] Exactly one accent colour shows at any moment, and it follows the active part.
- [ ] Every station shows a readable pill label in both themes and at phone width, and no pill covers a mover or another pill.
- [ ] The wobble slider, the colour swatches and the Labels switch work, and
?labels=0starts with the labels off. - [ ] A "The big idea" line under the figure says the point in plain words.
- [ ] The line-end check reports zero loose ends.
- [ ] The scenario sweep runs every config to the end with zero console errors.
- [ ] Desktop and phone screenshots in light and dark show no clipping and no horizontal scroll.
- [ ] The exploded pose stays inside the stage.
- [ ] The simulation sentence is on the page.
Files
references/concept.md: invent the machine, the one-sentence test, concept mapping, sizing.references/state-model.md: the model contract, event shape, tests, URL state.references/geometry.md: units, camera, parts list, kit functions, shading, depth keys, labels.references/colour-and-ink.md: materials, tones, ink weights, cast shadows, glass, status lights, pill labels, wobble and the dark theme.references/live.md: the beat timeline, the draw loop, sorting, accent, controls, accessibility, layout.references/verify.md: the headless verification loop with a script.templates/model.mjs,templates/model.test.mjs,templates/build.mjs,templates/live.js: a working cache machine. Runnode templates/build.mjsto writetemplates/out.html. Runnode --test templates/model.test.mjsfor the model tests.kit/iso-kit.mjs,kit/lathe.mjs,kit/tube.mjs: projection, solids, lathe bodies, tubes and the base CSS. Keepkit/LICENSEwith the kit.kit/ink.mjs: the colour and ink layer:inkSolid,silhouetteSvg,castShadowSvg,glassSvg,pillSvg,wobbleFilter,PALETTESandINK_CSS.
Inside the AI Engineering from Scratch repo, also see scripts/decompiler-machine/ and site/test_decompiler_machine.js for a full hero build in the colour and ink look, and scripts/agent-machine/ for the older grey look.
04 同仓库更多 Skills
write-manual
Writes a long technical manual that explains one subject at one pinned version, from its purpose to each request and response. Every listing comes from an offline capture, every claim traces to a ranked source, and an audit must report TOTAL 0. Use it for "write a manual", "write a 101 manual for <subject>", "manual.json", "add a manual section", "build a capture kit", "audit the manual", or "pin a spec version and document it".
start-learning
One-time onboarding for the AI Engineering from Scratch curriculum (542 lessons, 20 phases). Interviews the learner, runs the placement quiz, and writes LEARNING.md, a persistent study plan the learn skill drives. Trigger phrases: "start learning", "set up the course", "begin the curriculum", "onboard me", "create my learning plan"
motion-figure
Builds figures that move or respond to the reader, in three tiers: SMIL animations and slider widgets inside lessons, interactive mechanism figures that show the named parts of a real system with a computed verdict, and ordered dither bands in the course palette. Triggers: "animated figure", "add a slider widget", "interactive figure", "show how this system works", "make this diagram move", "dither masthead", "mechanism figure", "figure fence".
mcpa-certification
AI-native tutor and onboarding workflow for the MCPA (Model Context Protocol Associate) certification in AI Engineering from Scratch. Use when a learner wants to prepare for the MCPA, resume their certification path, learn the next lesson interactively, run and verify practical labs, take the diagnostic or a full mock, or remediate weak exam domains from GitHub with Claude Code, Codex, ChatGPT, Cursor, or another agent.
lesson-screen
Opens a lesson screen in the browser next to the terminal while a course tutor teaches. It shows the lesson's registered figures, code traces with real values, and clickable predictions. It also builds a figure for the lesson on the fly with the course figure skills and any figure skill the host has installed: a blueprint, a mechanism, an isometric machine, or a 3D model. Clicks return to the tutor as events. Trigger phrases: "open the lesson screen", "show me this visually", "show this in 3D", "draw the architecture", "visualize this lesson", "build a figure for this lesson", "lesson screen".
learn
Interactive lesson tutor for the AI Engineering from Scratch curriculum. Reads LEARNING.md, fetches the next lesson, teaches it section by section in the terminal, quizzes at the end, and records progress. Works cloned or entirely over raw.githubusercontent.com — no setup required. Trigger phrases: "next lesson", "teach me", "continue the course", "let's learn", "resume learning"