/kernelcad-design-skills:image-replicatorfrom kernelCAD — Parametric CAD & MCP
The render→score→iterate loop for reference-photo reconstruction. How to invoke kernelcad render, run scoreAgainstReference, interpret per-gate numbers, and decide which gate to chase next.
Ships in kernelCAD — Parametric CAD & MCP. 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.
None: SKILL.md is the whole skill.
After the blockout is plausible, this sub-skill drives the detail pass. Each iteration produces a render, runs the scorer, and returns a concrete decision: which gate is weakest, what model change closes it, whether to continue or stop.
.kcad.ts file with a clean blockout.Always render all four canonical views at the correct resolution:
kernelcad render build.kcad.ts \
--width 1920 --height 1080 \
--views front,right,top,iso \
-o /tmp/render.png
Read the PNG back. Filenames are not evidence — you must observe the image.
kernelcad score build.kcad.ts \
--reference ./reference.jpg \
--view front \
--json
The scorer returns a JSON object with per-gate values:
{
"silhouette": 0.71,
"ssim": 0.28,
"phash": 0.62,
"overall": 0.54
}
Score all views that have a reference. If the task harness provides a
harness.ts, run it directly — it wraps scoreAgainstReference with the
correct thresholds:
npx ts-node eval/tasks/taskNN/harness.ts
Read the per-gate numbers and decide:
| Gate | Low score means |
|---|---|
silhouette | The 2D silhouette outline does not match: wrong overall shape, missing brow bumps, wrong arm angles, wrong aspect ratio. Fix: adjust params, fix the path outline. |
ssim | The rendered image is structurally different from the reference: wrong depth, wrong material (flat vs. glossy), missing lens geometry, wrong body proportion. Fix: apply PBR material (Rule 6), add depth (Rule 3), fix booleans. |
phash | Perceptual hash mismatch: high-level appearance differs. Usually a proxy for "the object reads as a different product category." Fix: re-read the brief, re-check primary mass arrangement. |
Chase the lowest gate first. A 0.20 silhouette score means the silhouette is wrong — fixing the SSIM first will not help because the silhouette mismatch dominates overall score.
If silhouette is ≥ 0.45 but SSIM is < 0.25, the outline is correct but the internal structure, depth, or material is wrong. The most common causes:
bodyDepth param.Each iteration makes ONE primary change and re-renders. Do not make multiple changes and then wonder which one moved the score. Candidates in priority order:
Continue iterating if:
Stop and report when:
SSIM and silhouette IoU are selectors and gates only — use them to pick the better of two candidates and to gate "is this even the right object," never as a quantity to iteratively maximize. They are gameable: a past run inflated body depth into a featureless slab and scored top on silhouette IoU while producing an object with no lens openings at all — geometrically not eyewear. Pixel similarity decoupled from the real goal.
Therefore:
reference.stl) exists, the deterministic 3D
geometry oracle is the primary signal (chamfer distance, bbox IoU). SSIM and
silhouette are supplementary only.The iteration loop is done when all required gates are above threshold AND
kernelcad evaluate exits clean AND kernelcad interference reports zero pairs.
Proceed to render-inspect/SKILL.md if any iteration produces diagnostic
hints that need interpretation.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub w1ne/kernelcad-skills --plugin kernelcad-design-skills28 skills in this plugin
/blockout-modelCoarse parametric blockout of the primary masses before committing to detail. Establishes the bounding envelope, canonical-view alignment, and reference-image plane, then confirms the blockout is plausible before detail work begins./kernelcadkernelCAD entry decision tree — what skill to load when, universal conventions that apply everywhere. Load this FIRST; it points at the right specialty skill for your task./kernelcad-assembliesMulti-part assemblies — assembly(), parts, connectors, 7 mate types, fixed and revolute joints, .model()/.solvedModel(). Use for any model with two or more mechanical parts that need joint metadata.Other plugins' skills for the same job