Skip to content

BumpyClock/agent-templates / skills/anatomy

anatomy

Unverified

Build crafted, highly detailed, interactive isometric SVG figures that explain a technical idea as a real physical object (a test rig, a dial gauge, a cabinet of drawers, a plotter, a lock), with many small precise solid parts, four-tone shading, correct painter's order, a framed card with title, hint and live readout, and calm eased motion. Use this whenever someone wants an isometric illustration, an explanatory diagram or figure for docs, a blog post, a landing page or an article, a "Linear-style" or "premium" technical drawing, an interactive explainer, or an SVG that shows how a system, algorithm or component works, even if they never say "isometric". Works framework-free (TypeScript/JS that writes SVG and HTML) and in React/Next.js, and can add realistic WebGL shaders (fire, exhaust, water, caustics, lamp light) that live inside the drawing in the same isometric perspective. Also publishes a finished figure to the Anatomy community gallery when asked.

FileKindSize
.gitattributesother89 B
.github/ISSUE_TEMPLATE/bug_report.ymlconfig2.7 KB
.github/ISSUE_TEMPLATE/config.ymlconfig213 B
.github/ISSUE_TEMPLATE/figure_request.ymlconfig1.9 KB
.github/PULL_REQUEST_TEMPLATE.mdmarkdown1005 B
.github/assets/dial-indicator.webpbinary17.0 KB
.github/assets/raptor-engine-apart.webpbinary34.3 KB
.github/assets/raptor-engine-firing.webpbinary36.9 KB
.github/assets/ripple-tank.webpbinary33.9 KB
.github/assets/turning-dial.webpbinary29.3 KB
.github/workflows/ci.ymlconfig1.9 KB
.gitignoreother102 B
CHANGELOG.mdmarkdown10.7 KB
CODE_OF_CONDUCT.mdmarkdown5.5 KB
CONTRIBUTING.mdmarkdown8.7 KB
LICENSEother1.0 KB
README.mdmarkdown24.1 KB
SECURITY.mdmarkdown1.2 KB
SKILL.mdskill md30.9 KB
agents/openai.yamlconfig163 B
evals/evals.jsonconfig8.0 KB
examples/arcade-cabinet/arcade-cabinet-light.htmlother984.3 KB
examples/arcade-cabinet/arcade-cabinet.cssother3.1 KB
examples/arcade-cabinet/arcade-cabinet.htmlother984.3 KB
examples/arcade-cabinet/build.mjsscript50.3 KB
examples/arcade-cabinet/live.jsscript20.8 KB
examples/arcade-cabinet/parts.mjsscript4.2 KB
examples/arcade-cabinet/screen.mjsscript6.5 KB
examples/desk-computer/build.mjsscript22.5 KB
examples/desk-computer/desk-computer-light.htmlother231.8 KB
examples/desk-computer/desk-computer.htmlother231.8 KB
examples/dial-indicator/build.mjsscript14.6 KB
examples/dial-indicator/dial-indicator-light.htmlother133.3 KB
examples/dial-indicator/dial-indicator.htmlother133.3 KB
examples/raptor-engine/build.mjsscript69.0 KB
examples/raptor-engine/live.jsscript30.0 KB
examples/raptor-engine/raptor-engine-light.htmlother1.5 MB
examples/raptor-engine/raptor-engine.htmlother1.5 MB
examples/raptor-engine/raptor.cssother6.6 KB
examples/ripple-tank/build.mjsscript31.3 KB
examples/ripple-tank/live.jsscript21.2 KB
examples/ripple-tank/model.mjsscript4.9 KB
examples/ripple-tank/ripple-tank-light.htmlother493.6 KB
examples/ripple-tank/ripple-tank.htmlother493.6 KB
examples/ripple-tank/ripple.cssother1.6 KB
examples/spot-plate/art.tsxother4.4 KB
examples/spot-plate/drops.tsscript18.7 KB
examples/spot-plate/fan.tsscript2.7 KB
examples/spot-plate/figure.tsxother1.1 KB
examples/spot-plate/geometry.tsscript10.7 KB
examples/spot-plate/live.tsxother11.4 KB
examples/spot-plate/rig.tsscript8.0 KB
examples/spot-plate/spot-plate.cssother1.5 KB
examples/test-rig/art.tsxother7.2 KB
examples/test-rig/figure.tsxother850 B
examples/test-rig/geometry.tsscript12.8 KB
examples/test-rig/live.tsxother17.1 KB
examples/test-rig/pose.tsscript3.8 KB
examples/test-rig/rig.tsscript5.5 KB
examples/test-rig/stretch.cssother1.2 KB
examples/test-rig/view.tsscript3.0 KB
examples/turning-dial/build.mjsscript31.3 KB
examples/turning-dial/dial.cssother509 B
examples/turning-dial/live.jsscript12.2 KB
examples/turning-dial/stress.mjsscript19.0 KB
examples/turning-dial/turning-dial-light.htmlother658.1 KB
examples/turning-dial/turning-dial-verify-light.htmlother685.3 KB
examples/turning-dial/turning-dial.htmlother658.1 KB
examples/turning-dial/turning-stress-light.htmlother1.2 MB
kit/audit.mjsscript90.5 KB
kit/canvas-painter.mjsscript26.9 KB
kit/gl-shared.mjsscript8.7 KB
kit/gl.mjsscript8.6 KB
kit/iso-kit.mjsscript34.4 KB
kit/iso-kit.tsscript37.7 KB
kit/iso.cssother7.5 KB
kit/lathe.mjsscript46.9 KB
kit/react/draw.tsxother6.4 KB
kit/react/live.tsxother4.3 KB
kit/tube.mjsscript13.9 KB
kit/turn-audit.mjsscript55.8 KB
kit/turn-build.mjsscript63.7 KB
kit/turn-fixed.mjsscript143.6 KB
kit/turn.mjsscript136.5 KB
references/3d.mdmarkdown43.6 KB
references/craft.mdmarkdown49.1 KB
references/kit.mdmarkdown66.3 KB
references/motion.mdmarkdown22.1 KB
references/publish.mdmarkdown4.0 KB
references/react.mdmarkdown3.5 KB
references/verify.mdmarkdown42.6 KB
references/walkthrough.mdmarkdown5.2 KB
references/webgl.mdmarkdown59.7 KB
scripts/audit-affine-bounds.test.mjsscript4.1 KB
scripts/audit-cache.test.mjsscript1.6 KB
scripts/audit-clearance-envelope.test.mjsscript2.4 KB
scripts/audit-empty-clipping.test.mjsscript3.8 KB
scripts/audit-order-convergence.test.mjsscript2.8 KB
scripts/audit-path-origin.test.mjsscript1.6 KB
scripts/audit-profile.test.mjsscript2.1 KB
scripts/audit-projection.test.mjsscript1.9 KB
scripts/audit-slide-clearance.test.mjsscript2.8 KB
scripts/audit-svg-attributes.test.mjsscript3.4 KB
scripts/audit-taper.test.mjsscript1.2 KB
scripts/capture-current-geometry.test.mjsscript5.0 KB
scripts/capture-selector.test.mjsscript7.5 KB
scripts/capture.mjsscript12.5 KB
scripts/capture.test.mjsscript2.0 KB
scripts/chrome-port.mjsscript1.1 KB
scripts/chrome-startup.test.mjsscript1.8 KB
scripts/drive-actions.test.mjsscript1.8 KB
scripts/drive-async-until.test.mjsscript2.7 KB
scripts/drive-turn-controller.test.mjsscript2.6 KB
scripts/drive.mjsscript21.7 KB
scripts/drive.test.mjsscript2.9 KB
scripts/enter-key.test.mjsscript2.5 KB
scripts/fidelity-cut.test.mjsscript3.6 KB
scripts/fidelity-tube-coverage.test.mjsscript3.1 KB
scripts/fingerprint.mjsscript1.2 KB
scripts/inline-kit.mjsscript648 B
scripts/line-ends.mjsscript14.8 KB
scripts/lines-arcs.test.mjsscript2.0 KB
scripts/lines-bezier.test.mjsscript1.7 KB
scripts/lines-round.test.mjsscript2.4 KB
scripts/lines-rounded-rect.test.mjsscript2.5 KB
scripts/lines.mjsscript1.7 KB
scripts/lines.test.mjsscript1.5 KB
scripts/navigation.test.mjsscript2.2 KB
scripts/orbit-sampling.test.mjsscript2.7 KB
scripts/publish.mjsscript19.0 KB
scripts/publish.test.mjsscript5.5 KB
scripts/react-dots-opacity.test.mjsscript2.8 KB
scripts/react-readout-first-write.test.mjsscript3.8 KB
scripts/react-readout-target.test.mjsscript4.5 KB
scripts/react-solid-seamless.test.mjsscript2.7 KB
scripts/react-visibility-target.test.mjsscript3.8 KB
scripts/session.mjsscript4.7 KB
scripts/session.test.mjsscript2.6 KB
scripts/turn-bench.mjsscript3.8 KB
scripts/turn-check.mjsscript36.6 KB
scripts/turn-fidelity.mjsscript19.7 KB
scripts/turn-group-reference.test.mjsscript2.1 KB
scripts/turn-split-owner.test.mjsscript3.3 KB
tests/fixtures/react-dots-dark.pngbinary3.9 KB
tests/fixtures/react-dots-light.pngbinary3.8 KB
tests/fixtures/react-solid-dark.pngbinary9.2 KB
tests/fixtures/react-solid-light.pngbinary9.6 KB

scripts/capture-selector.test.mjs

View on GitHub
import assert from "node:assert/strict";
import { execFile } from "node:child_process";
import { access, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { promisify } from "node:util";
import test from "node:test";

const execute = promisify(execFile);

async function capture(selector, svgOnly = false, keys = false) {
  const directory = await mkdtemp(join(tmpdir(), "anatomy-capture-target-"));
  try {
    const page = join(directory, "figure.html");
    const out = join(directory, "capture.png");
    const content = svgOnly
      ? '<svg width="80" height="40" xmlns="http://www.w3.org/2000/svg"><rect width="80" height="40" fill="green"/></svg>'
      : `<div class="iso-plate" tabindex="0" id="first" style="width:100px;height:80px;background:blue"><span data-readout>first:0</span></div><div class="iso-plate" tabindex="0" id="second" style="width:60px;height:40px;background:red"><span data-readout>second:0</span></div><script>for(const plate of document.querySelectorAll('.iso-plate'))plate.addEventListener('keydown',e=>{if(e.key==='ArrowRight')plate.querySelector('[data-readout]').textContent=plate.id+':1'})</script>`;
    await writeFile(page, '<!doctype html><style>body{margin:20px}</style>' + content);
    const args = ["scripts/capture.mjs", page, "--out", out, "--wait", "0", "--scale", "1"];
    if (selector !== undefined) args.push("--select", selector);
    if (keys) args.push("--key", "ArrowRight");
    let result;
    try {
      result = { code: 0, ...await execute(process.execPath, args, { timeout: 30000 }) };
    } catch (error) {
      result = { code: error.code, stdout: error.stdout, stderr: error.stderr };
    }
    let png;
    try {
      await access(out);
      png = await readFile(out);
    } catch {}
    return { ...result, png };
  } finally {
    await rm(directory, { recursive: true, force: true });
  }
}

function dimensions(png) {
  assert.ok(png);
  assert.equal(png.subarray(1, 4).toString(), "PNG");
  return [png.readUInt32BE(16), png.readUInt32BE(20)];
}

test("an absent explicit figure selector fails without an unrelated screenshot", async () => {
  const result = await capture("#removed-figure");
  assert.equal(result.code, 1);
  assert.match(result.stderr, /Capture target not found: #removed-figure/);
  assert.equal(result.png, undefined);
  assert.doesNotMatch(result.stdout, /saved /);
});

test("a malformed explicit selector retains an actionable capture diagnostic", async () => {
  const result = await capture("[invalid");
  assert.equal(result.code, 1);
  assert.match(result.stderr, /Capture target not found: \[invalid/);
  assert.equal(result.png, undefined);
});

test("a matching selector captures the requested second figure", async () => {
  const result = await capture("#second");
  assert.equal(result.code, 0, result.stderr);
  assert.deepEqual(dimensions(result.png), [72, 52]);
  assert.match(result.stdout, /60x40/);
});

test("default selection retains the first plate", async () => {
  const result = await capture(undefined);
  assert.equal(result.code, 0, result.stderr);
  assert.deepEqual(dimensions(result.png), [112, 92]);
  assert.match(result.stdout, /100x80/);
});

test("default selection retains the standalone SVG fallback", async () => {
  const result = await capture(undefined, true);
  assert.equal(result.code, 0, result.stderr);
  assert.deepEqual(dimensions(result.png), [92, 52]);
  assert.match(result.stdout, /80x40/);
});

test("an explicit target reports that figure's readout", async () => {
  const result = await capture("#second");
  assert.equal(result.code, 0, result.stderr);
  assert.match(result.stdout, /readout "second:0"/);
});

test("keyboard interaction reaches the explicitly selected figure", async () => {
  const result = await capture("#second", false, true);
  assert.equal(result.code, 0, result.stderr);
  assert.match(result.stdout, /readout "second:1"/);
  assert.deepEqual(dimensions(result.png), [72, 52]);
});

async function driveTarget(actions, standaloneLines = false) {
  const directory=await mkdtemp(join(tmpdir(),"anatomy-drive-target-"));
  try{
    const page=join(directory,"figure.html"),out=join(directory,"selected.png"),file=join(directory,"actions.json");
    const svg='<svg width="60" height="40" viewBox="0 0 60 40"><rect x="10" y="10" width="30" height="20" fill="none" stroke="black"/><path class="iso-line" d="M10 20L40 20" fill="none" stroke="black"/></svg>';
    await writeFile(page,`<!doctype html><style>body{margin:20px}</style><div class="iso-plate" id="first" tabindex="0" style="width:100px;height:80px"><span data-readout>first:0</span>${svg}</div><div class="iso-plate" id="second" tabindex="0" style="width:60px;height:40px"><span data-readout>second:0</span>${svg}</div><script>for(const el of document.querySelectorAll('.iso-plate'))el.addEventListener('keydown',event=>{if(event.key==='ArrowRight')el.querySelector('[data-readout]').textContent=el.id+':1'})</script>`);
    await writeFile(file,JSON.stringify(actions.map(action=>action.map(value=>value==='OUTPUT'?out:value))));
    const args=standaloneLines?["scripts/lines.mjs",page,"--select","#missing","--wait","0"]:["scripts/drive.mjs",page,"--actions",file];
    let result;try{result={code:0,...await execute(process.execPath,args,{timeout:30000})};}catch(error){result={code:error.code,stdout:error.stdout,stderr:error.stderr};}
    let png;try{png=await readFile(out);}catch{}return{...result,png};
  }finally{await rm(directory,{recursive:true,force:true});}
}
for(const [name,action] of [
  ["shot",["shot","OUTPUT","#missing"]],
  ["move",["move","#missing",.5,.5]],
  ["click",["click","#missing"]],
  ["drag",["drag","#missing",0,0,1,1]],
  ["scroll",["scroll","#missing"]],
  ["key",["key","ArrowRight","#missing"]],
  ["lines",["lines",null,"#missing"]],
])test(`drive ${name} rejects an absent explicit target instead of continuing`,async()=>{
  const result=await driveTarget([action,["eval","'after missing target'"]]);assert.equal(result.code,1,result.stdout);assert.match(result.stderr,/(Drive|Line) target not found: #missing/);assert.doesNotMatch(result.stdout,/after missing target/);assert.equal(result.png,undefined);
});
test("standalone lines rejects an absent selected figure",async()=>{
  const result=await driveTarget([],true);assert.equal(result.code,1,result.stdout);assert.match(result.stderr,/Line target not found: #missing/);
});
test("drive targets the requested figure for keyboard input screenshot and reported readout",async()=>{
  const result=await driveTarget([["key","ArrowRight","#second"],["shot","OUTPUT","#second"],["eval","document.querySelector('#first [data-readout]').textContent"]]);
  assert.equal(result.code,0,result.stderr);assert.match(result.stdout,/readout "second:1"/);assert.match(result.stdout,/eval: "first:0"/);assert.deepEqual(dimensions(result.png),[68,48]);
});
test("drive defaults preserve first-figure keyboard focus and reporting",async()=>{
  const result=await driveTarget([["key","ArrowRight"],["shot","OUTPUT"],["eval","document.querySelector('#second [data-readout]').textContent"]]);
  assert.equal(result.code,0,result.stderr);assert.match(result.stdout,/readout "first:1"/);assert.match(result.stdout,/eval: "second:0"/);assert.deepEqual(dimensions(result.png),[108,88]);
});
test("line selection preserves real rooted-line checks on the requested SVG",async()=>{
  const result=await driveTarget([["lines",null,"#second svg"]]);assert.equal(result.code,0,result.stderr);assert.match(result.stdout,/line ends: 0 of [1-9]\d* ends on [1-9]\d* lines float/);
});
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 319kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 319kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 319kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 196kUpdated Claude CodeCodexVerifiedInstall