make-scene
Use when the user wants their data shown as an explorable 3D world (a city of towers, a forest, a galaxy or a terrain) or an existing diagram or dashboard chart lifted into 3D, as one offline HTML page with a camera tour; the agent writes a small JSON spec and scripts build the three.js page
- License 许可
- MIT
- 最近更新
- 2026-11-07
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- make-scene
- model
- haiku
- effort
- low
- description
- Use when the user wants their data shown as an explorable 3D world (a city of towers, a forest, a galaxy or a terrain) or an existing diagram or dashboard chart lifted into 3D, as one offline HTML page with a camera tour; the agent writes a small JSON spec and scripts build the three.js page
- argument-hint
- what to show, e.g. "our commits per week per module as a city, with a tour of the busiest weeks"
02 资源文件 205
- 参考文档package-lock.json17.6 KB
- 参考文档package.json419 B
- 参考文档README.md4.8 KB
- 参考文档references/examples/city.scene.json1.1 KB
- 参考文档references/examples/dashboard.json374 B
- 资产文件references/examples/data/sales.csv69 B
- 参考文档references/examples/forest.scene.json1.0 KB
- 参考文档references/examples/galaxy.scene.json1.0 KB
- 参考文档references/examples/lift-dashboard.scene.json142 B
- 参考文档references/examples/lift-diagram.scene.json103 B
- 参考文档references/examples/story.diagram.json2.9 KB
- 参考文档references/examples/terrain.scene.json1.0 KB
- 参考文档references/scene-graph.md17.9 KB
- 参考文档references/schema.md6.1 KB
- 参考文档references/worlds.md6.9 KB
- 脚本scripts/build.mjs7.5 KB
- 脚本scripts/check.mjs11.1 KB
- 脚本scripts/dev/bundle.mjs1.5 KB
- 脚本scripts/doctor.mjs519 B
- 脚本scripts/lib/api.mjs5.3 KB
- 脚本scripts/lib/browser.mjs1.4 KB
- 脚本scripts/lib/bundle.mjs3.3 KB
- 脚本scripts/lib/canvas-shot.mjs1.4 KB
- 脚本scripts/lib/checks.mjs1.1 KB
- 脚本scripts/lib/cost.mjs2.6 KB
- 脚本scripts/lib/csv.mjs1.6 KB
- 脚本scripts/lib/doctor-hint.mjs723 B
- 脚本scripts/lib/eligibility.mjs1010 B
- 脚本scripts/lib/graph.mjs8.3 KB
- 脚本scripts/lib/history-rows.mjs10.2 KB
- 脚本scripts/lib/internal-error.mjs843 B
- 脚本scripts/lib/markup.mjs2.2 KB
- 脚本scripts/lib/page-size.mjs3.7 KB
- 脚本scripts/lib/page.mjs1.5 KB
- 脚本scripts/lib/palette.mjs2.5 KB
- 脚本scripts/lib/png.mjs3.8 KB
- 脚本scripts/lib/recommend.mjs4.4 KB
- 脚本scripts/lib/requirements.mjs1.5 KB
- 脚本scripts/lib/ring.mjs525 B
- 脚本scripts/lib/row-checks.mjs3.5 KB
- 脚本scripts/lib/rows.mjs7.4 KB
- 脚本scripts/lib/scene-error.mjs353 B
- 脚本scripts/lib/schema.mjs2.2 KB
- 脚本scripts/lib/siblings.mjs3.0 KB
- 脚本scripts/lib/spec.mjs8.1 KB
- 脚本scripts/lib/theme.mjs581 B
- 脚本scripts/lib/views.mjs2.5 KB
- 脚本scripts/lifts/dashboard-bars.mjs8.2 KB
- 脚本scripts/lifts/dashboard-data.mjs5.9 KB
- 脚本scripts/lifts/dashboard-frame.mjs7.2 KB
- 脚本scripts/lifts/dashboard-series.mjs5.6 KB
- 脚本scripts/lifts/dashboard-surface.mjs6.8 KB
- 脚本scripts/lifts/dashboard.mjs11.5 KB
- 脚本scripts/lifts/diagram-flat.mjs5.1 KB
- 脚本scripts/lifts/diagram-parts.mjs6.1 KB
- 脚本scripts/lifts/diagram-sequence.mjs4.6 KB
- 脚本scripts/lifts/diagram.mjs7.2 KB
- 脚本scripts/lifts/index.mjs255 B
- 脚本scripts/rows.mjs2.6 KB
- 脚本scripts/validate.mjs1.6 KB
- 脚本scripts/worlds/city.mjs6.7 KB
- 脚本scripts/worlds/forest.mjs8.7 KB
- 脚本scripts/worlds/galaxy.mjs7.4 KB
- 脚本scripts/worlds/index.mjs302 B
- 脚本scripts/worlds/terrain.mjs8.2 KB
- 脚本shared/agents.mjs4.7 KB
- 脚本shared/art.mjs20.8 KB
- 脚本shared/cli.mjs2.3 KB
- 脚本shared/contrast.mjs3.0 KB
- 脚本shared/doctor.mjs34.4 KB
- 脚本shared/errors.mjs4.4 KB
- 资产文件shared/fonts/atkinson-hyperlegible-latin-400-normal.woff216.8 KB
- 资产文件shared/fonts/atkinson-hyperlegible-latin-700-normal.woff217.1 KB
- 资产文件shared/fonts/big-shoulders-display-latin-900-normal.woff213.7 KB
- 资产文件shared/fonts/bricolage-grotesque-latin-600-normal.woff221.9 KB
- 资产文件shared/fonts/commit-mono-latin-400-normal.woff247.0 KB
- 资产文件shared/fonts/familjen-grotesk-latin-400-normal.woff211.4 KB
- 资产文件shared/fonts/familjen-grotesk-latin-700-normal.woff211.5 KB
- 资产文件shared/fonts/funnel-display-latin-700-normal.woff210.4 KB
- 资产文件shared/fonts/geist-mono-latin-400-normal.woff29.6 KB
- 资产文件shared/fonts/geist-sans-latin-400-normal.woff232.6 KB
- 资产文件shared/fonts/geist-sans-latin-600-normal.woff234.5 KB
- 资产文件shared/fonts/host-grotesk-latin-400-normal.woff213.4 KB
- 资产文件shared/fonts/host-grotesk-latin-700-normal.woff213.6 KB
- 资产文件shared/fonts/jetbrains-mono-latin-400-normal.woff220.7 KB
- 参考文档shared/fonts/LICENSES/atkinson-hyperlegible.txt4.5 KB
- 参考文档shared/fonts/LICENSES/big-shoulders-display.txt4.3 KB
- 参考文档shared/fonts/LICENSES/bricolage-grotesque.txt4.3 KB
- 参考文档shared/fonts/LICENSES/commit-mono.txt4.3 KB
- 参考文档shared/fonts/LICENSES/familjen-grotesk.txt4.4 KB
- 参考文档shared/fonts/LICENSES/funnel-display.txt4.3 KB
- 参考文档shared/fonts/LICENSES/geist-mono.txt4.4 KB
- 参考文档shared/fonts/LICENSES/geist-sans.txt4.3 KB
- 参考文档shared/fonts/LICENSES/host-grotesk.txt4.4 KB
- 参考文档shared/fonts/LICENSES/jetbrains-mono.txt4.4 KB
- 参考文档shared/fonts/LICENSES/martian-mono.txt4.3 KB
- 参考文档shared/fonts/LICENSES/newsreader.txt4.4 KB
- 参考文档shared/fonts/LICENSES/schibsted-grotesk.txt4.4 KB
- 参考文档shared/fonts/LICENSES/young-serif.txt4.3 KB
- 资产文件shared/fonts/martian-mono-latin-400-normal.woff210.1 KB
- 参考文档shared/fonts/metrics.json65.9 KB
- 资产文件shared/fonts/newsreader-latin-600-normal.woff223.3 KB
- 资产文件shared/fonts/schibsted-grotesk-latin-400-normal.woff223.8 KB
- 资产文件shared/fonts/schibsted-grotesk-latin-700-normal.woff224.6 KB
- 参考文档shared/fonts/SOURCES.md1.4 KB
- 资产文件shared/fonts/young-serif-latin-400-normal.woff226.4 KB
- 参考文档shared/GENERATED.md167 B
- 脚本shared/icons.mjs2.8 KB
- 脚本shared/nowrap-probe.mjs2.2 KB
- 脚本shared/nowrap.mjs1.8 KB
- 脚本shared/output.mjs1.1 KB
- 脚本shared/provenance.mjs2.8 KB
- 脚本shared/stale-copy.mjs2.5 KB
- 脚本shared/text.mjs3.9 KB
- 脚本shared/theme-toggle.mjs2.5 KB
- 脚本shared/theme.mjs3.5 KB
- 参考文档shared/themes/blueprint.json2.3 KB
- 参考文档shared/themes/brief.json2.4 KB
- 参考文档shared/themes/dusk.json2.3 KB
- 参考文档shared/themes/editorial.json2.4 KB
- 参考文档shared/themes/ink.json2.3 KB
- 参考文档shared/themes/mono.json2.3 KB
- 参考文档shared/themes/paper.json2.0 KB
- 参考文档shared/themes/poster.json2.4 KB
- 参考文档shared/themes/press.json2.3 KB
- 脚本shared/type.mjs1.8 KB
- 其他template/page.css8.1 KB
- 参考文档template/page.html3.2 KB
- 脚本template/runtime/chrome/dom.js1.2 KB
- 脚本template/runtime/chrome/explore.js5.3 KB
- 脚本template/runtime/chrome/export.js1.7 KB
- 脚本template/runtime/chrome/fullscreen.js1.7 KB
- 脚本template/runtime/chrome/index.js7.8 KB
- 脚本template/runtime/chrome/labels.js5.4 KB
- 脚本template/runtime/chrome/legend.js1.0 KB
- 脚本template/runtime/chrome/overlap.js1.0 KB
- 脚本template/runtime/chrome/tooltip.js3.4 KB
- 脚本template/runtime/chrome/tour.js3.4 KB
- 脚本template/runtime/chrome/transport.js2.4 KB
- 脚本template/runtime/colour.js3.2 KB
- 脚本template/runtime/controls.js6.3 KB
- 脚本template/runtime/fit.js6.3 KB
- 脚本template/runtime/index.js19.9 KB
- 脚本template/runtime/loop.js3.0 KB
- 脚本template/runtime/render.js23.0 KB
- 脚本template/runtime/theme.js1.3 KB
- 脚本template/runtime/travel.js1.6 KB
- 脚本test/build.test.mjs12.1 KB
- 脚本test/bundle.test.mjs5.8 KB
- 脚本test/check.test.mjs10.7 KB
- 脚本test/chrome-browser.test.mjs11.5 KB
- 脚本test/cost.test.mjs3.6 KB
- 脚本test/csv.test.mjs1.6 KB
- 脚本test/docs.test.mjs2.8 KB
- 脚本test/doctor.test.mjs4.7 KB
- 脚本test/fit-unit.test.mjs7.3 KB
- 参考文档test/fixtures/architecture.diagram.json1.2 KB
- 参考文档test/fixtures/city.scene.json206 B
- 参考文档test/fixtures/dashboard.json2.9 KB
- 资产文件test/fixtures/data.csv89 B
- 资产文件test/fixtures/data/sales.csv1.3 KB
- 参考文档test/fixtures/flow.diagram.json962 B
- 参考文档test/fixtures/rows.json309 B
- 参考文档test/fixtures/sequence.diagram.json2.1 KB
- 参考文档test/fixtures/state.diagram.json938 B
- 参考文档test/fixtures/story.diagram.json2.9 KB
- 参考文档test/golden/city.json15.1 KB
- 参考文档test/golden/forest.json17.2 KB
- 参考文档test/golden/galaxy.json10.2 KB
- 参考文档test/golden/lift-architecture.json3.7 KB
- 参考文档test/golden/lift-bar.json2.1 KB
- 参考文档test/golden/lift-donut.json2.6 KB
- 参考文档test/golden/lift-sequence.json5.7 KB
- 参考文档test/golden/terrain.json23.7 KB
- 脚本test/graph.test.mjs10.3 KB
- 脚本test/helpers/browser.mjs2.1 KB
- 脚本test/helpers/scene-fixtures.mjs1.5 KB
- 脚本test/helpers/webgl.mjs1.8 KB
- 脚本test/lift-browser.test.mjs8.5 KB
- 脚本test/lift-dashboard-fallback.test.mjs9.0 KB
- 脚本test/lift-dashboard-limits.test.mjs9.7 KB
- 脚本test/lift-dashboard-order.test.mjs5.9 KB
- 脚本test/lift-dashboard.test.mjs24.6 KB
- 脚本test/lift-diagram.test.mjs19.7 KB
- 脚本test/overlap-unit.test.mjs1.9 KB
- 脚本test/page-cap.test.mjs11.2 KB
- 脚本test/page.test.mjs7.8 KB
- 脚本test/png.test.mjs4.2 KB
- 脚本test/recommend.test.mjs7.1 KB
- 脚本test/rows-history.test.mjs21.7 KB
- 脚本test/runtime-colour.test.mjs2.6 KB
- 脚本test/runtime-fixes-browser.test.mjs20.1 KB
- 脚本test/runtime-fixes.test.mjs3.6 KB
- 脚本test/runtime-loop.test.mjs5.2 KB
- 脚本test/runtime-mount.test.mjs10.6 KB
- 脚本test/scene-browser.test.mjs17.8 KB
- 脚本test/siblings.test.mjs2.9 KB
- 脚本test/spec.test.mjs20.7 KB
- 脚本test/tour-unit.test.mjs4.2 KB
- 脚本test/travel-unit.test.mjs2.7 KB
- 脚本test/validate-cli.test.mjs3.9 KB
- 脚本test/views.test.mjs2.8 KB
- 脚本test/worlds-city-terrain.test.mjs17.6 KB
- 脚本test/worlds-forest-galaxy.test.mjs21.5 KB
- 参考文档THIRD_PARTY_NOTICES.md1.3 KB
03 SKILL.md 正文
make-scene
You write one JSON file, scene.json: a title, then either data (rows that become a city, forest, galaxy or terrain) or lift (an existing diagram or one dashboard chart redrawn in 3D), and usually a short tour of camera stops. Scripts check it and build one offline three.js page with orbit, hover, an Explore list and a tour bar. You never write three.js, coordinates, CSS or HTML. Only make a 3D scene when the user asks for 3D or a scene; do not turn a plain chart or diagram request into one.
Run every command from the project folder (where scene.json lives), using the full path to the scripts. If the request is empty, ask what to show.
Run every step yourself (or hand off as the Cheaper model section says), in this same turn. Do not end your reply after showing the JSON: keep going until validate prints valid and the HTML exists.
Cheaper model
Skip this section if you are running in Claude Code (it already runs this skill on the model named in the frontmatter), or if artifact-builder is not in your list of available agents. Otherwise, if you can start another agent, start the artifact-builder agent to do the work, unless you are already artifact-builder. If you are already artifact-builder, skip the rest of this section and do the work yourself.
Give it a self-contained brief. It has no memory of this conversation, so the brief must say:
- What to build, and every fact and choice from this conversation that affects it (data, names, wording, theme, what the user asked for and what they ruled out).
- This skill directory: the full path of the folder that holds this SKILL.md.
- The spec path: where it should write the JSON spec.
- Optionally, an output folder for the build (it passes this to the build script as
--out).
Relay only the output path it returns. Do not repeat its work.
If the artifact-builder agent is not installed, or you cannot start another agent, continue with the steps below yourself.
Before the first build
<skill-dir> is the folder containing this SKILL.md.
Run node <skill-dir>/scripts/doctor.mjs --json (add --for <spec.json> once the spec exists: a lift needs make-diagram or make-dashboard installed beside this skill; --for check before check.mjs). It needs only Node.
If it reports anything missing, tell the user in one message: each item, why it is needed, its size and the command, plus every notes and info entry from the output (they disclose downloads and the files an install writes). Ask once per set of missing items. On yes, run node <skill-dir>/scripts/doctor.mjs --fix <ids> with the ids it reported, and the same --for you diagnosed with. Hand the user the exact command to run themselves for anything the doctor reports as refused, skipped, installed elsewhere, still missing, or failed; in Claude Code suggest prefixing it with !. On no, do what you can without it and give the user the remaining commands.
Workflow
- Get the data. Rows you already have go in
data.rows. A CSV goes indata.csvwithcolumns. Commits per top-level folder per week come fromnode <skill-dir>/scripts/rows.mjs git --weeks 12(options--depth N,--repo DIR,--out FILE; run from a subfolder of a repository, it counts that folder alone), which writesscene-rows.json: use it as"data": { "file": "scene-rows.json" }. Never retype or reshape generated rows. - Write
scene.json. Copy the closest file in<skill-dir>/references/examples/(city,forest,galaxy,terrain,lift-diagram,lift-dashboard). Every field is in<skill-dir>/references/schema.md; what each world does is in<skill-dir>/references/worlds.md. Setworldto your pick, or leave it out and the build picks the best fit. node <skill-dir>/scripts/validate.mjs scene.json. Fix every line it prints (a JSON path, the problem, the fix) and rerun until it saysvalid. Exit 0 ok, 1 spec errors, 2 usage error. Add--allow-outside(to validate and to build) only if the user wants data from outside the project folder.- Set
generatedByto the model you are running as, your effort level if you know it, and your host (for example Claude Code, Codex, Copilot CLI, Gemini CLI). Never guess; leave out any field you do not know.--model,--effortand--agenton the build override it.node <skill-dir>/scripts/build.mjs scene.jsonprints the HTML path and an alternatives table. Default folder is~/.agent/scenes/(or the folder in thePA_OUTPUT_DIRenvironment variable);--out <file.html|dir>picks another (inside a project pass--out ./<name>.htmlso the page lands there);--theme dusk|press|poster|paper|blueprint|ink|editorial|mono|briefoverrides the theme (defaultdusk). - First run
node <skill-dir>/scripts/doctor.mjs --json --for check, thennode <skill-dir>/scripts/check.mjs <printed path>opens the page at desktop and phone width and fails on console errors, overflow, a blank canvas or a tour that cannot finish. It needs Playwright and a browser (doctor --for checkreports and installs them, after the user agrees); without them it skips cleanly (exit 0). - Report: the HTML path, one line on what the scene shows, the alternatives table, and "drag to orbit, hover for exact values, Play (or Space) runs the tour,
Fis full screen".
For a change ("rename the title", "add a beat for the spike"), edit only those fields of scene.json, then validate and build again.
Recommend, build, then offer
The build prints an alternatives table: each world, why it fits (or "not available: needs ..." / "not available: over the page limit"), the page size, a render weight and the exact command to switch. Show the table the build printed to the user verbatim, unchanged, then ask if they want another world. Switching is free of model tokens: run the printed command, which is the same build (same --out, --theme and --allow-outside) with --world <world>. It rewrites world in scene.json and builds again. A lift has no alternatives.
Data rules
Each row is { "group", "t", "value", "label", "parent" }; only group and value are required.
- Exactly one source:
data.rows,data.file(a JSON file{ "rows": [...], "links": [...] }) ordata.csvwithcolumnsmapping CSV headers togroup,t,value,label,parent. Local files only, no URLs. groupis free display text, at most 48 characters.valueis a number, never negative. At most 2000 rows and 24 groups: aggregate or drop the rest.torders things. Use sortable values: numbers, ISO dates (2026-07-14), ISO weeks (2026-W09, zero-padded) or months (2026-07). A stringtsorts as text, soW9lands afterW10.parent(forest) names anothergroup.links(galaxy) are{ "from", "to", "value" }between two different groups: top-level inscene.jsonor insidedata.file, never in a CSV. A self-link is an error.- Terrain needs
ton every row and exactly one row per group andt. Duplicate pairs are never summed.
Worlds
city: a district per group, buildings byt, height is value. Picked first for dates and weeks, and for anything else that does not fit another world.forest: a tree per group, branches byt, leaf size is value. Fitsparenthierarchies.galaxy: a star per group, planets bytrank, size is value. Fitslinks.terrain: a group bytgrid as a landscape, height is value. Picked first only for a mostly full grid (60% or more of group bytfilled) whosetis a plain number, not a date or week; a dated grid still lists it as an alternative.
If an explicit world cannot show the data, validate names the worlds that can.
Lifts
"lift": { "diagram": "flow.diagram.json" }: a path to a make-diagram file, or the diagram object inline. Any diagram type works."lift": { "dashboard": "dashboard.json", "chart": "<chart id>" }: one chart. Bar, stacked-bar, grouped-bar, histogram, line, area, scatter, bubble, heatmap and donut lift; boxplot andvegaLitecharts do not.- A lift has no
data,worldor top-levellinks. Paths stay inside the project folder. A diagram lift with notourreplays the diagram's own stories along its edges.
Tour
tour is up to 12 beats { "title", "caption", "focus" }: title up to 48 characters, caption up to 160, focus a list of group names or row labels (case-insensitive), or for a diagram lift a node, group or participant id. A dashboard lift focuses an x value, colour value or label. Write 3 to 6 beats that point at the real story in the data. Set autoplay to true to start the tour on open (ignored under reduced motion).
Degraded mode
If you cannot run shell commands, write scene.json and give the user the exact commands from steps 3, 4 and 5 with the real <skill-dir> path.
Security
Labels, captions and group names are escaped in the page, never read as markup. Specs accept no URLs, CSS, SVG or HTML. The page makes no network requests, and its CSP blocks them. Keep secrets out of labels and captions.
04 同仓库更多 Skills
second-wind
Orchestrate long unattended Claude Code runs across multiple repos with the wind CLI. Use when the user wants to run Claude Code overnight, resume sessions after the 5-hour usage limit, run Claude in many repos at once via tmux, or says "set up second wind", "wind up", "overnight run", "resume after limit", "usage limit orchestrator".
structured-output-adaptive-thinking-token-bloat
A Claude API call using output_config.format (json_schema structured outputs) with thinking:{type:"adaptive"} burns most of its output budget on thinking (observed ~21k of ~24k tokens) without improving JSON quality, making the run up to ~5x more expensive than the same call with thinking omitted — use when calling the Messages API with a json_schema output format for extraction, ranking, classification, or summarization tasks, or when a schema-constrained call's usage.output_tokens is far larger than the returned JSON.
review
Apply a code-review lens to a diff, branch, or file — find correctness bugs, security issues, and quality problems, ranked by severity, with a concrete fix for each. Use when the user says "review this", "review my diff", "check this PR", "look this over before I commit", or "is this safe". Skip when the user wants the code written, not reviewed.
refresh
Rebuild the prompt-craft command registry and usage profile, and print a summary of installed commands and your personalized recommendations. Use when you install or update plugins and want the advisor to pick them up immediately, or say "refresh prompt-craft", "rebuild the command registry".
refactor
Apply a refactoring lens — restructure code without changing behavior, guarded by tests that pass before and after. Use when the user says "refactor", "clean this up", "extract this", "simplify this", "reduce duplication", or "make this readable" on existing working code. Skip when the change is meant to alter behavior (that's a feature or a fix).
plan
Decompose a non-trivial task into an explicit, tracked plan with goals and per-step acceptance criteria before writing code. Use when the user says "plan this", "break this down", "what's the plan", or asks for a multi-step feature/refactor that touches more than one file. Pairs with plan mode. Skip for single-edit changes that need no decomposition.