image-replicator

A workflow for rebuilding an object from a reference photo by repeatedly rendering a 3D model and comparing its views with the photo.

In plain words
What is it for?
Use it to render four standard views, score them against reference images, inspect silhouette and image-similarity results, and decide whether to continue refining.
Why use it?
It replaces guesswork with measurements that show which part of the model differs most from the reference and what to adjust next.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/w1ne/kernelcad-web/image-replicator
Any agent
npx skills add w1ne/kernelCAD-web --skill image-replicator
Clone the repo
git clone --depth 1 https://github.com/w1ne/kernelCAD-web

Made for: Claude Code, Codex.

Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,548 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00043 $0.01548
Opus 5 $0.00022 $0.00774
Sonnet 5 $0.00009 $0.00310
Haiku 4.5 $0.00004 $0.00155

Measured 2d ago against content hash c7004cec110c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

image-replicator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/agent/skills/kernelcad-from-reference/image-replicator/SKILL.md · 157 lines

How it starts

The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.

image-replicator

Purpose

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.

Inputs

  • The .kcad.ts file with a clean blockout.
  • The reference photo path.
  • Current scorer output (or "not yet run" on the first pass).

The iteration loop

Step 1 — Render

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.

Step 2 — Score

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

Step 3 — Diagnose which gate to chase next

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.

Read the full file on GitHub · 157 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 157 lines · 43 tokens per session scan A c7004cec110c

Subscribe to this mod's changes

image-replicator is a skill published in the GitHub repository w1ne/kernelCAD-web (17 stars, last pushed 4d ago), licensed MIT. It adds 43 tokens to every session and 1,548 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

simplecadapi

Thin SimpleCAD SDK reference skill focused on the public API surface, core types, and current modeling workflows.

NiJingzhe/SimpleCADAPI · 25 tokens

maya-scripting

Bootstrap stage — escape hatch for Maya work that has no packaged skill yet. Agents should prefer searchskills / dcccapabilitymanifest → loadskill → typed tools (inputSchema + annotations) from domain skills; use executepython or executemel only when no skill matches, for bulk in-process loops, or for API…

dcc-mcp/dcc-mcp-maya · 100 tokens

cad

Use when doing parametric 3D modeling, 2D drafting, geometric kernel development, BIM/IFC processing, PCB design, or AutoCAD .NET development. Index of 19 skills: FreeCAD, OpenSCAD, OCCT, CadQuery, KiCad, SolveSpace, QCAD, xBIM, Clipper2, TongWen and more.

znlgis/opengis-skills · 79 tokens

maya-asset-source

Pipeline stage — asset discovery and resolution. Search local asset libraries, resolve paths to structured AssetDescriptor records, and surface candidate assets for downstream import. Use before maya-import-to-scene to locate what to import.

dcc-mcp/dcc-mcp-maya · 50 tokens

cadquery-modeling

Generate CAD models with CadQuery using an adaptive CAD Compiler workflow: plan-mode skill constraint handoff, focused iteration scopes, fail-first challenge review, compact review packets, real-product reference fidelity, visual/functional audits, source-first repair, and STEP/STL export. Use for CadQuery, CQ, 建模…

armpro24-blip/cad-cae-copilot · 97 tokens

maya-geometry

Interchange stage — FBX / OBJ geometry interchange. Round-trip geometry through FBX or OBJ; scene save is owned by maya-scene. The FBX export tool drives every FBXExport option through the FBX plugin's MEL globals, bakes animation by default, and verifies the output file. Use for cross-DCC handoff. Not for primitive…

dcc-mcp/dcc-mcp-maya · 95 tokens