An AI agent skill that turns any subject into a 3D film or app
Learn the style from a reference and learn from every correction: style card, side-by-side review each round, a lessons file in the work folder; prototypes use ready models and measured quality gates; release 0.9.0
Nguyen Xuan An330a8e5a18bf
diff --git a/plugins/visualize-in-3d/.claude-plugin/plugin.json b/plugins/visualize-in-3d/.claude-plugin/plugin.jsonindex 855f08d..1bea809 100644--- a/plugins/visualize-in-3d/.claude-plugin/plugin.json+++ b/plugins/visualize-in-3d/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "visualize-in-3d",- "version": "0.8.1",+ "version": "0.9.0","description": "Visualize anything in 3D: places, systems, objects, products, creatures, stories and events, as a documentary or action film, a showcase, a live three.js app with a dashboard, a lesson, an illustrated cutaway book or a playable game, in twelve looks across four families, built from real layouts and models made from real references.","author": {"name": "CodePawl",diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/SKILL.md b/plugins/visualize-in-3d/skills/visualize-in-3d/SKILL.mdindex 47ed17a..a815a3a 100644--- a/plugins/visualize-in-3d/skills/visualize-in-3d/SKILL.md+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/SKILL.md@@ -6,7 +6,8 @@ license: MIT# Visualize in 3D (Dựng mọi thứ thành 3D)-If `references/local.md` exists, read it first: it sets the folders and house rules for this machine.+If `references/local.md` exists, read it first: it sets the folders and house rules for this machine. Then read+`{{WORK_DIR}}/viz3d-lessons.md` if it exists: rules learned from this user's past corrections (`references/learning.md`).Take any subject and make it 3D: models from real references, a seeded simulation or a scripted timelinedriving them, a look chosen for the subject, and a film checked frame by frame. The user can also start it with@@ -43,11 +44,12 @@ Read what the user wants people to see, then pick one shape (or combine two) and| One object cut open or exploded | Cutaway film, or an app with a section view | `references/film.md`, `references/looks.md`, `references/67js.md` || One big object or building with many rooms, as a page or a book | Book: interactive illustrated cutaway plate, with quizzes | `references/book.md`, `references/looks.md` || A game people play in the browser (steer a creature, survive, grow) | Playable web game, bot-balanced | `references/game.md` |-| A demo for leaders in about an hour | Quick prototype from three.js primitives | `references/live-embed.md` |+| A demo for leaders in about an hour | Quick prototype from ready models, no Blender | `references/live-embed.md` || A live view inside an existing dashboard or product | Embed (web component or iframe) on real data | `references/live-embed.md`, `scripts/mock-feed.mjs` |-Pick the look in `references/looks.md` (Choosing: four families, a default per shape; a named look wins). Study a look the user shows from-a reference video with frame sheets (`scripts/contact-sheet.sh <video> <folder> <fps>`) and add it to `looks.md`.+Pick the look in `references/looks.md` (Choosing: four families, a default per shape; a named look wins). Then pick a+style reference, never build from words alone: the user's image, video or page, else two or three you find and show+(`references/style-reference.md`). Its style card goes in the plan file, and every review round compares against it.## 2. Write the plan file@@ -76,8 +78,8 @@ mode's fault list. Run the two passes separately; one pass doing both runs too lOpen the final sheets and peak stills yourself (`scripts/contact-sheet.sh`, sheets newer than the video). Look forwhat the loop can miss: a subject wrong for the real thing, a dull beat, broken UI rules, toys or programmer art.-Every fault the user or you find that the loop missed goes into the fault lists the same turn-(`self-review.md`, Growing the lists).+Learn the same turn (`references/learning.md`): every user correction and every fault you caught becomes a dated+rule with a check in `{{WORK_DIR}}/viz3d-lessons.md`, applied to this piece before you report.## 6. Polish@@ -86,8 +88,7 @@ on the user's word.## Rules-- Every round, fixes included: a fast low-quality preview of the whole cut to the user first; full render only after- the user signs off.+- Every round, fixes included: a fast low-quality preview of the whole cut first; full render after the user's OK.- Original names and designs by default. Real brands, liveries and known characters only when the user asks, withlicensed models and a credit line.- Every main asset matches a reference of the real thing. Models from memory read as toys.@@ -95,6 +96,5 @@ on the user's word.order. Real clicks on that clock drive an app's film, not a camera moved in code.- Render and encode at low priority, one heavy job at a time, and stop every server you start.- Real people and real harm: facts from sources, victims named with respect, no gore (`references/documentary.md`).-- Reference images and videos are for study only: never ship them in the app or the film.- The public copy of this skill is mirrored from this folder. Edit only this folder; never put personal paths, namesor tools outside `references/local.md`. A nightly sync script mirrors the rest.diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/learning.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/learning.mdnew file mode 100644index 0000000..6eb9fff--- /dev/null+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/learning.md@@ -0,0 +1,48 @@+# Learn from every mistake and every correction++The skill gets better only if each lesson is written down where the next run will read it. Reading map: What+becomes a lesson, Where lessons live, How to write one, Use them, When rules disagree.++## What becomes a lesson++- **A user correction or taste note.** "Too bright", "the boat slides", "I hate the dark theme", a picked option+ and its reason. Record it the same turn, before the next build step, without asking first.+- **A fault you caught yourself.** A review round fixed it, a check failed, or a tool cost time. Record the cause, not only the symptom.+- **A user request about how to work.** "Always send a preview first", "use real models". It is a rule from now on.++A one-off choice for this piece only ("make this boat red") stays in the plan file, not in the lessons.++## Where lessons live++1. **`{{WORK_DIR}}/viz3d-lessons.md`** for every lesson. It belongs to the user, survives plugin updates and is+ read at the start of every run.+2. **The skill's own lists**, but only in the user's own copy of the skill. A plugin update overwrites a plugin+ cache. In an own copy, add a fault to its list in `self-review.md` ("Growing the lists"). Add a look rule to+ `looks.md`.+3. **Upstream.** Some lessons help every user of the skill. Tell the user and offer to open an issue with the case+ on the skill's repository.++## How to write one++One entry per lesson, newest at the end:++```text+## 2026-11-06 Prototype ground+Rule: the ground is never one flat colour; dress it to the style card's density.+Why: user said "trông như khối xám trơn" on the canal lock prototype.+Check: in the side-by-side, no empty single-colour area larger than a quarter of the frame.+```++The rule is a command. The why quotes the user's own words or names the failed check. The check is something a+later round can measure or see, so the lesson is tested and not only remembered.++## Use them++- Read `{{WORK_DIR}}/viz3d-lessons.md` before writing the plan file and copy the rules that apply into it.+- Fix the current piece by the new rule before reporting. A lesson recorded but not applied is not done.+- When a lesson keeps coming back, turn its check into a script or a frame-guard measurement.++## When rules disagree++The newer user word wins over an older rule, and a user rule wins over this skill's defaults. Mark the older entry+"replaced on <date> by <title>" instead of deleting it, so the history stays readable.diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/live-embed.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/live-embed.mdindex a11e886..bb0e9ba 100644--- a/plugins/visualize-in-3d/skills/visualize-in-3d/references/live-embed.md+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/live-embed.md@@ -17,11 +17,11 @@ Skip Pass 1 and do not ask about Blender. Build everything in one pass in `{{WOR1. **One site, one process.** The topic file lists one site, four KPIs and three to five stages. Leave out the siteswitcher and the film unless the user asks.-2. **A primitive kit, not an asset pack.** One file `src/kit.jsx` with the parametric parts this subject needs, at- real size. For a site with goods and vehicles that is `Box`, `Slab` (floor with a 3 cm bevel), `Rack`,- `Conveyor`, `Tank`, `Pipe`, `Vehicle` (body, cab, four wheels), `Person` (capsule, 1.75 m), `Building` (walls with- window strips, no roof so the inside shows) and `Path` (a swept strip along points); a canal lock needs walls,- gates, water and a boat instead. Each part takes dimensions and a colour. Build every main asset from the kit against its reference sheet+2. **Ready models first, a kit for the rest.** Take every prop that exists ready-made from the CC0 and CC BY packs+ in `asset-sources.md` (Kenney, Quaternius, Poly Pizza, Poly Haven), chosen to match the style card's shapes:+ boats, trees, rocks, people, vehicles, fences, plants. Build only the subject-specific parts in one file+ `src/kit.jsx`, parametric and at real size (a lock's chamber and gates, a port's quay), with bevels and real+ materials. A scene of plain boxes and capsules is a fail, not a prototype. Build every main asset from the kit against its reference sheet(`real-objects.md`): proportions and part count still matter.3. **The look carries the quality.** The look the user named, else the prototype default in `looks.md` (Choosing),Clean ops world: soft shadows, N8AO, a warm key light, a ground@@ -32,7 +32,12 @@ Skip Pass 1 and do not ask about Blender. Build everything in one pass in `{{WORThe 3/4 camera must see into the working part: if a near wall hides it, cut that wall away or raise the camera.5. **Data the leaders recognise.** Ask for a sample export (CSV or JSON) and its field names. With a sample, map itas in "Field mapping" below. Without one, seed a simulation with the real counts and rates from the topic research.-6. **Done when** the overview, a clicked unit with its card and each stage preset look right in screenshots, it runs+6. **Quality gates**, checked on screenshots against the style reference (`style-reference.md`): shadows and ambient+ occlusion on, with dark contact under every object; no single-colour ground area over a quarter of the frame;+ the surroundings dressed to the card's density; every palette colour from the card; every model the right real+ kind; the side-by-side shows no gap in camera, palette, light or density. Fix and re-shoot until all pass.+ Measure the ground rule on the screenshot: quantise colours and report the largest bucket's share of the frame.+7. **Done when** the gates pass, the overview, a clicked unit with its card and each stage preset look right in screenshots, it runsat 60 fps, the page logs no errors, and `npm run build` gives a static folder that opens from any web server.From `self-review.md` run "Each round" and the generic faults that apply to a still view; the film checks applyonly when the user asked for a film.diff --git a/plugins/visualize-in-3d/skills/visualize-in-3d/references/style-reference.md b/plugins/visualize-in-3d/skills/visualize-in-3d/references/style-reference.mdnew file mode 100644index 0000000..240eb77--- /dev/null+++ b/plugins/visualize-in-3d/skills/visualize-in-3d/references/style-reference.md@@ -0,0 +1,59 @@+# Learn the style from a reference++A look written only in words comes out generic: flat grey ground, one object in the middle, default light. Every+build starts from a real picture of the style it aims for, and every self-review round compares the render with+that picture. Reading map: Find the reference, Capture it, Write the style card, Build to the card, Compare each+round, Copy the style, not the work.++## Find the reference++1. **The user's reference wins.** Use the image, video, live page or post link that the user gives.+2. **Otherwise find two or three.** Search where people share finished 3D work: X (posts with many bookmarks),+ Dribbble, Behance, ArtStation, Awwwards, Sketchfab, YouTube. Search by the look and the shape, not only the+ subject: "isometric stylized water three.js", "cutaway diorama", "ops dashboard 3D". Prefer pieces with a live+ page or a video, so you can study the motion and interaction too.+3. **Let the user pick.** Show the candidates side by side with one line each on what each one brings. If the user+ is away, pick the piece with the most engagement. Its camera and density must fit the subject. Say why.+4. A look from `looks.md` is still chosen for its rules (camera kind, UI, traps). Where the reference and the+ look's default disagree on palette, light, materials or density, the reference wins.++## Capture it++- A page: screenshots at the size the build will run, from the default view and one or two others. Note what moves,+ what the pointer does and what the UI holds.+- A video: frame sheets with `scripts/contact-sheet.sh <video> <folder> <fps>`.+- Keep the captures in `{{WORK_DIR}}/<topic>/reference/`. They are study material and never ship.++## Write the style card++Write it into the plan file before anything is built. Each line is a value that a review checks the build against:++| Line | What to write |+|---|---|+| Camera | Angle from the ground in degrees, field of view, how much of the frame the subject fills |+| Palette | Five to eight colours sampled from the capture as hex, each with where it is used |+| Light | Direction and colour of the key light, softness and length of shadows, how dark the contact shadows are |+| Materials | How each surface reads: painted, glossy, textured, flat; the roughness range |+| Density | What fills the frame around the subject and roughly what share of it; no empty ground left over |+| Shapes | Soft or hard edges, rounded or bevelled, stylized or real proportions |+| Motion | What moves without input (water, leaves, people) and how fast |+| UI | Where it sits, its type, its corner radius, how much of the screen it takes |++## Build to the card++Turn every line into settings before the first render. That means camera values, the palette as constants, light+and shadow settings, the material list, and the set dressing list that gives the density. Pick models that already have the card's+shapes (`asset-sources.md`) instead of reshaping primitives toward them.++## Compare each round++Each self-review round renders the build from the reference's camera at the same size and puts the two side by+side in one image. Write the three biggest gaps, each tied to a card line ("ground is one flat colour, card says+grass with flowers and stones"), fix them, and render again. A round passes when no gap is about the card's camera,+palette, light or density. Show the user the side-by-side, not the render alone.++## Copy the style, not the work++Learn the camera, palette, light, density and feel. Never copy its models, textures, logos, names, layout of a+signature scene or its text. Credit the reference in the report ("style studied from <link>"). When the user asks+for a close remake of someone's piece, say whose it is and ask whether they have the right to use it.