Skip to content

elithril/blender-kiln / plugin

Makes and fixes 3D assets in Blender, for games, the web and AR. Use when the user wants a 3D model, prop, character or GLB/glTF/FBX/USDZ file made — from a text brief, a reference image, a free marketplace (PolyHaven, Sketchfab) or AI generation — AND when they bring an existing 3D file to fix: too heavy or too many polygons (optimize, compress, LODs), broken normals, scale or origin, materials lost on glTF export, conversion between GLB, FBX and USDZ, texturing, rigging for animation, animating it (walk and idle cycles, text-to-motion, looping clips, articulated props), or inspection. Drives Blender through a Blender MCP server (ahujasid's or the official Blender Lab one). Batch mode produces many consistent assets unattended. Kiln Studio (`/kiln studio`) opens the project's models in the browser, where the user reviews them and pins notes for Claude to act on.

FileKindSize
.claude-plugin/plugin.jsonconfig1.2 KB
.mcp.jsonconfig236 B
LICENSEother1.0 KB
NOTICEother2.5 KB
SKILL.mdskill md29.0 KB
references/ai-generation.mdmarkdown21.0 KB
references/animation.mdmarkdown21.6 KB
references/batch-mode.mdmarkdown19.5 KB
references/blender-mcp.mdmarkdown9.4 KB
references/characters.mdmarkdown52.8 KB
references/cli-tools.mdmarkdown6.5 KB
references/commands.mdmarkdown10.7 KB
references/export-targets.mdmarkdown14.3 KB
references/log-format.mdmarkdown2.2 KB
references/naming-conventions.mdmarkdown5.8 KB
references/photo-projection.mdmarkdown6.3 KB
references/pipeline-brief.mdmarkdown4.2 KB
references/pipeline-import-cleanup.mdmarkdown6.3 KB
references/pipeline-optimize-export.mdmarkdown6.4 KB
references/pipeline-rig-animate.mdmarkdown5.8 KB
references/pipeline-source.mdmarkdown9.7 KB
references/print.mdmarkdown41.5 KB
references/reference-fidelity.mdmarkdown31.8 KB
references/review-rounds.mdmarkdown10.4 KB
references/setup-install.mdmarkdown2.8 KB
references/setup.mdmarkdown9.2 KB
references/sourcing-strategy.mdmarkdown6.1 KB
references/studio.mdmarkdown38.9 KB
references/texturing-strategy.mdmarkdown14.4 KB
references/topology-rules.mdmarkdown3.9 KB
references/uv-materials.mdmarkdown6.8 KB
references/validation-checklist.mdmarkdown10.5 KB
studio/approval_hook.pyscript14.2 KB
studio/blender_live.pyscript2.3 KB
studio/checks.pyscript38.1 KB
studio/estimate.pyscript4.2 KB
studio/example/barrel/barrel_final.glbbinary111.9 KB
studio/example/barrel/barrel_log.mdmarkdown445 B
studio/handoff.pyscript17.8 KB
studio/mcp_server.pyscript32.7 KB
studio/phoneshare.pyscript17.1 KB
studio/server.pyscript47.9 KB
studio/setup_status.pyscript7.5 KB
studio/static/app.jsscript241.4 KB
studio/static/apple-touch-icon.pngbinary20.6 KB
studio/static/fonts/OFL-JetBrainsMono.txtmarkdown4.3 KB
studio/static/fonts/OFL-Sora.txtmarkdown4.3 KB
studio/static/fonts/jetbrains-mono-latin-ext.woff2binary11.3 KB
studio/static/fonts/jetbrains-mono-latin.woff2binary30.6 KB
studio/static/fonts/sora-latin-ext.woff2binary11.8 KB
studio/static/fonts/sora-latin.woff2binary24.6 KB
studio/static/i18n.jsscript6.2 KB
studio/static/i18n/fr.jsonconfig101.2 KB
studio/static/icon-32.pngbinary2.6 KB
studio/static/icon-64.pngbinary6.6 KB
studio/static/icon-96.pngbinary12.8 KB
studio/static/index.htmlother39.5 KB
studio/static/style.cssother114.5 KB
studio/static/tutorial.jsscript49.0 KB
studio/static/tutorial/barrel_after.glbbinary117.3 KB
studio/static/tutorial/barrel_before.glbbinary111.9 KB
studio/static/tutorial/fixtures.jsonconfig13.5 KB
studio/static/tutorial/lantern_1_blockout.glbbinary83.1 KB
studio/static/tutorial/lantern_2_details.glbbinary101.8 KB
studio/static/tutorial/lantern_3_materials.glbbinary102.0 KB
studio/static/tutorial/lantern_4_final.glbbinary141.1 KB
studio/static/tutorial/make_tutorial.pyscript4.9 KB
studio/static/viewer.jsscript41.4 KB
studio/studio.pyscript29.2 KB
studio/studiolib.pyscript77.8 KB
studio/test_studio.pyscript90.2 KB
studio/test_worker.pyscript31.5 KB
studio/worker.pyscript56.8 KB
studio/worker_blender.pyscript2.7 KB
tools/autorig.pyscript44.1 KB
tools/bind_rigid_parts.pyscript3.6 KB
tools/blender_mcp_start.pyscript1.5 KB
tools/check_usdz.pyscript1004 B
tools/cutout.swiftscript2.0 KB
tools/export_outputs.pyscript5.2 KB
tools/fidelity_check.pyscript39.0 KB
tools/fit_coupon.pyscript11.3 KB
tools/fixtures/skintokens_raw_child.glbbinary88.8 KB
tools/fixtures/skintokens_skeletons.jsonconfig6.5 KB
tools/flatten.pyscript14.9 KB
tools/glb_to_fbx.pyscript2.1 KB
tools/glb_to_usdz.pyscript6.2 KB
tools/motion_loop.pyscript5.9 KB
tools/motion_measure.pyscript15.2 KB
tools/motions/LICENSE-image-to-3dlab.txtmarkdown11.1 KB
tools/motions/cheer.npzbinary48.4 KB
tools/motions/cheer_b.npzbinary48.1 KB
tools/motions/dance.npzbinary78.2 KB
tools/motions/dance_b.npzbinary78.9 KB
tools/motions/death.npzbinary45.9 KB
tools/motions/death_b.npzbinary46.5 KB
tools/motions/fight_stance.npzbinary60.3 KB
tools/motions/fight_stance_b.npzbinary61.3 KB
tools/motions/flying_kick.npzbinary39.7 KB
tools/motions/flying_kick_b.npzbinary39.9 KB
tools/motions/hit_react.npzbinary31.9 KB
tools/motions/hit_react_b.npzbinary31.8 KB
tools/motions/idle.npzbinary51.8 KB
tools/motions/idle_b.npzbinary57.7 KB
tools/motions/jump.npzbinary39.8 KB
tools/motions/jump_b.npzbinary39.9 KB
tools/motions/kata.npzbinary77.4 KB
tools/motions/kata_b.npzbinary75.3 KB
tools/motions/kick.npzbinary32.4 KB
tools/motions/kick_b.npzbinary32.5 KB
tools/motions/presets.jsonconfig9.6 KB
tools/motions/punch.npzbinary32.0 KB
tools/motions/punch_b.npzbinary32.1 KB
tools/motions/punch_combo.npzbinary47.4 KB
tools/motions/punch_combo_b.npzbinary47.5 KB
tools/motions/roll.npzbinary46.7 KB
tools/motions/roll_b.npzbinary47.5 KB
tools/motions/roundhouse.npzbinary39.7 KB
tools/motions/roundhouse_b.npzbinary39.9 KB
tools/motions/run.npzbinary47.2 KB
tools/motions/run_b.npzbinary47.7 KB
tools/motions/sit.npzbinary47.2 KB
tools/motions/sit_b.npzbinary47.2 KB
tools/motions/sneak.npzbinary61.6 KB
tools/motions/sneak_b.npzbinary61.8 KB
tools/motions/strafe_left.npzbinary45.9 KB
tools/motions/strafe_left_b.npzbinary47.1 KB
tools/motions/sword_swing.npzbinary39.7 KB
tools/motions/sword_swing_b.npzbinary39.4 KB
tools/motions/walk.npzbinary62.8 KB
tools/motions/walk_b.npzbinary62.6 KB
tools/motions/walk_woman.npzbinary62.9 KB
tools/motions/wave.npzbinary46.3 KB
tools/motions/wave_b.npzbinary46.3 KB
tools/open_blender.pyscript5.0 KB
tools/photo_project.pyscript37.8 KB
tools/presets.pyscript16.3 KB
tools/print_check.pyscript47.2 KB
tools/quadruped.pyscript19.4 KB
tools/retarget.pyscript46.9 KB
tools/review_renders.pyscript13.8 KB
tools/review_sheet.pyscript11.0 KB
tools/skintokens-requirements.txtmarkdown2.4 KB
tools/skintokens.patchother9.2 KB
tools/template_profile.pyscript5.8 KB
tools/test_autorig.pyscript15.9 KB
tools/test_fidelity_check.pyscript20.7 KB
tools/test_fit_coupon.pyscript6.4 KB
tools/test_flatten.pyscript15.0 KB
tools/test_open_blender.pyscript1.3 KB
tools/test_photo_project.pyscript12.6 KB
tools/test_presets.pyscript17.6 KB
tools/test_print_check.pyscript33.1 KB
tools/test_review_renders.pyscript11.4 KB
tools/test_review_sheet.pyscript4.0 KB
tools/test_template_profile.pyscript3.6 KB
tools/test_uv_check.pyscript5.0 KB
tools/test_verify_docs.pyexecutablescript7.9 KB
tools/unimate.patchother3.5 KB
tools/unimate.pyscript17.5 KB
tools/uv_check.pyscript8.4 KB
tools/verify_blender.pyexecutablescript29.2 KB
tools/verify_docs.pyexecutablescript16.6 KB

tools/test_autorig.py

View on GitHub
#!/usr/bin/env python3
"""Check autorig.py names SkinTokens' raw skeletons the way kiln does, cleans their weights,
and refuses what it cannot name — all without SkinTokens installed.

    python3 tools/test_autorig.py      # mapping and cleaning: standard library only
                                       # + the Blender stage when Blender is at $BLENDER or the macOS default

Mapping, on the four raw skeletons the measurements in characters.md § Learned auto-rig were
made with (fixtures/skintokens_skeletons.json):
- each maps to the names given by hand for the measured cells (the kiln child, the
  generated humanoid, kiln's cat, a generated cat), body type found;
- the generated humanoid, whose hand is fused to its hip, FAILS naming RightHand — and
  passes with --allow-missing RightHand, saying so;
- seeded: a leg removed, the model turned to face +Y, a second root: each FAILS, by name;
- seeded: the bones renumbered, the joints moved by up to 5 mm (two runs on one mesh moved
  them 8 mm): same names.
Cleaning, on a seeded strip: 6 influences become 4, normalised; a far island of a bone is
dropped; an eye held by its bone alone is kept; an unweighted vertex takes its neighbour's.
Blender stage, on a decimated raw output (fixtures/skintokens_raw_child.glb, 1,843 vertices):
the named rig is written, passes its checks; lid shells get their bones and nothing of the
skin; ear cones get their bones' weights; a raw skeleton with an arm deleted exits 1 naming it.
"""
import json, os, random, subprocess, sys, tempfile
from pathlib import Path

HERE = Path(__file__).resolve().parent
sys.path.insert(0, str(HERE))
import autorig  # noqa: E402

FIX = json.loads((HERE / "fixtures" / "skintokens_skeletons.json").read_text())
checks = []


def check(what, ok, detail=""):
    checks.append(bool(ok))
    print(f"  {'ok  ' if ok else 'FAIL'} {what}" + ("" if ok else f"  {detail}"))


def mapped(sk, **kw):
    return autorig.map_skeleton(sk["heads"], sk["tails"], sk["parents"], sk.get("mass"), **kw)


def fails(sk, **kw):
    try:
        mapped(sk, **kw)
        return None
    except autorig.MappingError as e:
        return str(e)


def drop(sk, gone):
    """The skeleton without the bones in `gone` (and their subtrees), renumbered."""
    kids = autorig._children(sk["parents"])
    gone = {j for g in gone for j in autorig._subtree(g, kids)}
    keep = [i for i in range(len(sk["parents"])) if i not in gone]
    new = {o: k for k, o in enumerate(keep)}
    return {"heads": [sk["heads"][i] for i in keep], "tails": [sk["tails"][i] for i in keep],
            "parents": [None if sk["parents"][i] is None else new[sk["parents"][i]] for i in keep],
            "mass": [sk["mass"][i] for i in keep]}


# Names given by hand to the measured cells (index: name), where the hierarchy agrees.
EXPECT = {
    "kiln_child": ("humanoid", {0: "Hips", 3: "Spine2", 4: "Neck", 5: "Head", 6: "LeftShoulder", 7: "LeftArm",
                                9: "LeftHand", 13: "RightShoulder", 16: "RightHand", 20: "LeftUpLeg",
                                22: "LeftFoot", 23: "LeftToeBase", 27: "RightToeBase"}),
    "generated_humanoid": ("humanoid", {0: "Hips", 3: "Spine2", 4: "Neck", 5: "Head", 6: "LeftShoulder",
                                        9: "LeftHand", 10: "RightShoulder", 12: "RightForeArm", 13: "LeftUpLeg"}),
    "kiln_cat": ("quadruped", {0: "Hips", 1: "Spine", 2: "Spine1", 3: "Neck", 4: "Head", 5: "LeftShoulder",
                               6: "LeftArm", 8: "LeftHand", 12: "RightHand", 14: "Tail1", 17: "Tail4",
                               19: "LeftUpLeg", 23: "RightHipConn", 24: "RightUpLeg", 27: "RightToeBase"}),
    "generated_cat": ("quadruped", {0: "Hips", 2: "Spine1", 3: "Neck", 4: "Head", 5: "HeadX1", 7: "LeftArm",
                                    9: "LeftHand", 10: "LeftFingers", 15: "LeftUpLeg", 19: "Tail1",
                                    23: "Tail5", 24: "RightUpLeg"}),
}

print("── mapping")
for key, (body, want) in EXPECT.items():
    r = mapped(FIX[key], allow_missing=["RightHand"] if key == "generated_humanoid" else ())
    wrong = {i: (r["names"][i], n) for i, n in want.items() if r["names"][i] != n}
    check(f"{key}: {body}, named as by hand ({len(want)} joints checked)", r["body"] == body and not wrong,
          (r["body"], wrong))

msg = fails(FIX["generated_humanoid"])
check("generated humanoid (hand fused to the hip): FAILS naming RightHand and the way out",
      msg and "RightHand" in msg and "--allow-missing RightHand" in msg, msg)
r = mapped(FIX["generated_humanoid"], allow_missing=["RightHand"])
check("... with --allow-missing RightHand: named, and the warning says quadruped.py will refuse it",
      any("RightHand" in w for w in r["warnings"]) and r["missing"] == ["RightHand"], r["warnings"])

msg = fails(drop(FIX["kiln_child"], [20]))
check("seeded: kiln child without its left leg FAILS naming LeftUpLeg, LeftLeg, LeftFoot",
      msg and all(b in msg for b in ("LeftUpLeg", "LeftLeg", "LeftFoot")), msg)
msg = fails(drop(FIX["generated_cat"], [11]))
check("seeded: generated cat without its right foreleg FAILS naming RightArm", msg and "RightArm" in msg, msg)
for key in ("kiln_child", "generated_cat"):
    sk = dict(FIX[key])
    sk["heads"] = [[-x, -y, z] for x, y, z in sk["heads"]]
    sk["tails"] = [[-x, -y, z] for x, y, z in sk["tails"]]
    msg = fails(sk)
    check(f"seeded: {key} turned to face +Y FAILS, not mirrored", msg and "+Y" in msg, msg)
sk = dict(FIX["kiln_cat"]); sk["parents"] = list(sk["parents"]); sk["parents"][13] = None
msg = fails(sk)
check("seeded: a second root bone FAILS", msg and "root" in msg, msg)

rng = random.Random(0)
for key in EXPECT:
    sk = FIX[key]
    base = mapped(sk, allow_missing=["RightHand"])["names"]
    perm = list(range(len(base))); rng.shuffle(perm)            # perm[new] = old
    inv = {o: n for n, o in enumerate(perm)}
    shuf = {"heads": [sk["heads"][o] for o in perm], "tails": [sk["tails"][o] for o in perm],
            "parents": [None if sk["parents"][o] is None else inv[sk["parents"][o]] for o in perm],
            "mass": [sk["mass"][o] for o in perm]}
    names = mapped(shuf, allow_missing=["RightHand"])["names"]
    same = all(names[inv[o]] == base[o] for o in range(len(base)))
    jit = 0.005 if "child" in key or "humanoid" in key else 0.002
    moved = []
    for _ in range(20):
        noise = {i: [rng.uniform(-jit, jit) for _ in range(3)] for i in range(len(base))}
        j = {"heads": [[a + b for a, b in zip(h, noise[i])] for i, h in enumerate(sk["heads"])],
             "tails": [[a + b for a, b in zip(t, noise[i])] for i, t in enumerate(sk["tails"])],
             "parents": sk["parents"], "mass": sk["mass"]}
        try:
            moved.append(mapped(j, allow_missing=["RightHand"])["names"] == base)
        except autorig.MappingError:
            moved.append(False)
    check(f"{key}: renumbered → same names; joints moved ±{jit * 1000:.0f} mm, 20 seeds → same names",
          same and all(moved), (same, moved.count(False)))

print("── cleaning")
# a strip of 200 vertices, 0-1-…-199, plus an eye (200-203) not connected to it
edges = [(i, i + 1) for i in range(199)] + [(200, 201), (201, 202), (202, 203)]
W = [{0: 1.0} for _ in range(200)] + [{5: 1.0} for _ in range(4)]
W[3] = {0: 0.3, 2: 0.2, 3: 0.2, 4: 0.15, 6: 0.1, 7: 0.05}        # 6 influences
for i in range(50, 200):
    W[i] = {1: 0.9, 0: 0.1}                                       # bone 1's region: 50..199
W[10] = {0: 0.7, 1: 0.3}                                          # bone 1 on vertex 10: a speck off its region
W[100] = {}                                                       # unweighted
C, st = autorig.clean_weights(W, edges)
check("6 influences → the 4 largest, normalised", len(C[3]) == 4 and abs(sum(C[3].values()) - 1) < 1e-9
      and set(C[3]) == {0, 2, 3, 4}, C[3])
check("bone 1 on a 1-vertex island away from its 150-vertex region: dropped",
      1 not in C[10] and abs(C[10][0] - 1) < 1e-9, C[10])
check("an eye held by bone 5 alone, disconnected: kept", all(C[i] == {5: 1.0} for i in range(200, 204)), C[200:])
check("an unweighted vertex takes its neighbour's weights", C[100] and abs(sum(C[100].values()) - 1) < 1e-9, C[100])
check("every vertex sums to 1", all(abs(sum(w.values()) - 1) < 1e-9 for w in C), st)
C2, st2 = autorig.clean_weights([{0: 0.6, 1: 0.4}, {0: 0.5, 1: 0.5}], [(0, 1)])
check("clean weights stay as they are (none dropped, no speck)",
      C2 == [{0: 0.6, 1: 0.4}, {0: 0.5, 1: 0.5}] and st2["speck_islands"] == 0, (C2, st2))

print("── install")
def cli(*args, home):
    r = subprocess.run([sys.executable, str(HERE / "autorig.py"), *args], capture_output=True, text=True,
                       env=dict(os.environ, KILN_SKINTOKENS_HOME=home, BLENDER=sys.executable))
    return r.returncode, r.stdout + r.stderr
with tempfile.TemporaryDirectory() as home:
    rc, log = cli("status", "--quick", home=home)
    check("status, nothing installed: exit 2, says to ask first", rc == 2 and "ask the user" in log, (rc, log[-200:]))
    rc, log = cli("setup", home=home)
    check("setup without --yes: installs nothing, exit 3, says the size and the licence",
          rc == 3 and "5.6 GB" in log and "MIT" in log and not os.listdir(home), (rc, log[-200:]))
    rc, log = cli("rig", "--asset", "x.glb", "--out", home + "/o", home=home)
    check("rig, nothing installed: exit 2 before touching Blender", rc == 2 and "not ready" in log, (rc, log[-200:]))

# ── Blender stage
BLENDER = os.environ.get("BLENDER") or "/Applications/Blender.app/Contents/MacOS/Blender"
if not os.environ.get("BLENDER") and not os.path.exists(BLENDER):
    print("── Blender stage skipped: no Blender at $BLENDER or the macOS default")
else:
    print("── Blender stage")
    RAW = HERE / "fixtures" / "skintokens_raw_child.glb"
    MAKE = r"""
import bpy, sys
raw, out, kind = sys.argv[sys.argv.index("--") + 1:]
bpy.ops.wm.read_factory_settings(use_empty=True)
bpy.ops.import_scene.gltf(filepath=raw)
arm = next(o for o in bpy.data.objects if o.type == 'ARMATURE')
if kind == "noarm":                       # SkinTokens without the left arm: bones 6..12 gone
    bpy.context.view_layer.objects.active = arm; bpy.ops.object.mode_set(mode='EDIT')
    for i in range(6, 13):
        arm.data.edit_bones.remove(arm.data.edit_bones[f"bone_{i}"])
    bpy.ops.object.mode_set(mode='OBJECT')
if kind == "lids":                        # the skin with two ear cones, two lid shells, no rig
    skin = max((o for o in bpy.data.objects if o.type == 'MESH'), key=lambda o: len(o.data.vertices))
    from mathutils import Vector
    for sx in (1, -1):
        a, b = Vector((0.20 * sx, 0, 0.86)), Vector((0.30 * sx, 0, 0.98))
        bpy.ops.mesh.primitive_cone_add(vertices=12, radius1=0.05, depth=(b - a).length, location=(a + b) / 2)
        c = bpy.context.object; c.rotation_euler = (b - a).to_track_quat('Z', 'Y').to_euler()
        bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
        bpy.ops.object.select_all(action='DESELECT'); c.select_set(True); skin.select_set(True)
        bpy.context.view_layer.objects.active = skin; bpy.ops.object.join()
    for x, n in ((0.045, "SK_Child_LidL"), (-0.045, "SK_Child_LidR")):
        bpy.ops.mesh.primitive_uv_sphere_add(segments=16, ring_count=8, radius=0.03, location=(x, -0.14, 0.74))
        o = bpy.context.object; o.name = n
        bpy.ops.object.mode_set(mode='EDIT'); bpy.ops.mesh.select_all(action='DESELECT')
        bpy.ops.object.mode_set(mode='OBJECT')
        for v in o.data.vertices:
            v.select = v.co.z < 0.0       # keep the upper cap
        bpy.ops.object.mode_set(mode='EDIT'); bpy.ops.mesh.delete(type='VERT'); bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.export_scene.gltf(filepath=out, export_format='GLB', export_animations=False)
"""

    def blender(script, *args):
        with tempfile.NamedTemporaryFile("w", suffix=".py", delete=False) as f:
            f.write(script)
        r = subprocess.run([BLENDER, "--background", "--factory-startup", "--python-exit-code", "1",
                            "--python", f.name, "--", *map(str, args)], capture_output=True, text=True)
        os.unlink(f.name)
        return r.returncode

    def rig(*args):
        r = subprocess.run([sys.executable, str(HERE / "autorig.py"), "rig", *map(str, args)],
                           capture_output=True, text=True, env=dict(os.environ, BLENDER=BLENDER))
        rep = [json.loads(l.split("autorig: ", 1)[1]) for l in r.stdout.splitlines() if l.startswith("autorig: {")]
        return r.returncode, r.stdout + r.stderr, rep[-1] if rep else {}

    def glb_joints(path):
        import struct
        b = Path(path).read_bytes(); n = struct.unpack("<I", b[12:16])[0]
        j = json.loads(b[20:20 + n])
        skins = j.get("skins", [])
        meshes = {nd.get("name"): nd.get("skin") for nd in j["nodes"] if "mesh" in nd}
        return [{j["nodes"][k]["name"] for k in s["joints"]} for s in skins], meshes, skins

    with tempfile.TemporaryDirectory() as d:
        rc, log, rep = rig("--asset", RAW, "--raw", RAW, "--out", d)
        joints, _, _ = glb_joints(f"{d}/skintokens_raw_child_rigged.glb") if rc == 0 else ([set()], {}, [])
        check("raw child → named rig written: every bone quadruped.py needs is a joint of the GLB",
              rc == 0 and set(autorig.REQUIRED) <= joints[0], (rc, log[-400:]))
        check("... and it passes its checks: ≤ 4 influences, nothing unweighted, no dead bone",
              rep.get("max_influences", 9) <= 4 and rep.get("unweighted") == 0 and rep.get("dead_bones") == [], rep)

        blender(MAKE, RAW, f"{d}/noarm.glb", "noarm")
        rc, log, _ = rig("--asset", RAW, "--raw", f"{d}/noarm.glb", "--out", f"{d}/noarm")
        check("seeded: raw skeleton without its left arm → exit 1 naming LeftArm, no traceback",
              rc == 1 and "LeftArm" in log and "Traceback" not in log, (rc, log[-400:]))

        blender(MAKE, RAW, f"{d}/lids.glb", "lids")
        rc, log, rep = rig("--asset", f"{d}/lids.glb", "--raw", RAW, "--out", f"{d}/lids",
                           "--ears", "200,0,860,300,0,980")
        joints, meshes, skins = glb_joints(f"{d}/lids/lids_rigged.glb") if rc == 0 else ([set()], {}, [])
        check("lid shells found by name → LeftEyelid / RightEyelid, the skin 0 vertices on them",
              rc == 0 and rep.get("lids") == ["LeftEyelid", "RightEyelid"] and rep.get("skin_on_lids") == 0
              and {"LeftEyelid", "RightEyelid"} <= joints[0], (rc, rep, log[-300:]))
        check("... each shell skinned in the GLB (100% to its bone, Armature modifier)",
              rc == 0 and meshes.get("SK_Child_LidL") is not None and meshes.get("SK_Child_LidR") is not None, meshes)
        check("--ears → LeftEar / RightEar with skin weights, no dead bone",
              rc == 0 and rep.get("ears") == ["LeftEar", "RightEar"] and rep.get("ear_vertices", 0) > 0
              and rep.get("dead_bones") == [], rep)
        EARS = r"""
import bpy, json, sys
bpy.ops.wm.open_mainfile(filepath=sys.argv[sys.argv.index("--") + 1])
sk = bpy.data.objects["SK_KilnChild"]; gi = {g.index: g.name for g in sk.vertex_groups}
out = {}
for e, sx in (("LeftEar", 1), ("RightEar", -1)):
    w = lambda v: sum(g.weight for g in v.groups if gi[g.group] == e)
    tip = max(sk.data.vertices, key=lambda v: sx * v.co.x + v.co.z)
    out[e] = dict(tip=round(w(tip), 3), middle=sum(1 for v in sk.data.vertices if sx * v.co.x < 0.1 and w(v) > 0.01))
print("EARS " + json.dumps(out))
"""
        with tempfile.NamedTemporaryFile("w", suffix=".py", delete=False) as f:
            f.write(EARS)
        r = subprocess.run([BLENDER, "--background", "--factory-startup", "--python-exit-code", "1", "--python",
                            f.name, "--", f"{d}/lids/lids_rigged.blend"], capture_output=True, text=True)
        os.unlink(f.name)
        ea = next((json.loads(l[5:]) for l in r.stdout.splitlines() if l.startswith("EARS ")), {})
        check("... local: each ear's tip 100% on its bone, no vertex near the head's middle on an ear",
              ea and all(x["tip"] > 0.99 and x["middle"] == 0 for x in ea.values()), ea)

print(f"\n{sum(checks)}/{len(checks)}")
sys.exit(0 if all(checks) else 1)
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall