Skip to content

anbeime/skill / skills/anatomy/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 prints a figure as an A4 PDF (poster, drawing or handout) and publishes it 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.ymlconfig2.0 KB
.gitignoreother216 B
CHANGELOG.mdmarkdown14.6 KB
CODE_OF_CONDUCT.mdmarkdown5.5 KB
CONTRIBUTING.mdmarkdown8.7 KB
LICENSEother1.0 KB
README.mdmarkdown25.6 KB
SECURITY.mdmarkdown1.2 KB
SKILL.mdskill md32.8 KB
agents/openai.yamlconfig120 B
evals/evals.jsonconfig8.0 KB
examples/arcade-cabinet/arcade-cabinet-detailed-a4.pdfbinary2.2 MB
examples/arcade-cabinet/arcade-cabinet-drawing-a4.pdfbinary1.8 MB
examples/arcade-cabinet/arcade-cabinet-light.htmlother985.3 KB
examples/arcade-cabinet/arcade-cabinet-poster-a4.pdfbinary709.6 KB
examples/arcade-cabinet/arcade-cabinet.cssother3.1 KB
examples/arcade-cabinet/arcade-cabinet.htmlother985.3 KB
examples/arcade-cabinet/build.mjsscript50.5 KB
examples/arcade-cabinet/live.jsscript20.8 KB
examples/arcade-cabinet/parts.mjsscript4.2 KB
examples/arcade-cabinet/screen.mjsscript6.5 KB
examples/arcade-cabinet/sheet.mjsscript5.4 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/push-button/build.mjsscript15.9 KB
examples/push-button/push-button-detailed-a4.pdfbinary933.7 KB
examples/push-button/push-button-drawing-a4.pdfbinary680.6 KB
examples/push-button/push-button-light.htmlother124.5 KB
examples/push-button/push-button-poster-a4.pdfbinary453.1 KB
examples/push-button/push-button.htmlother124.5 KB
examples/push-button/sheet.mjsscript4.0 KB
examples/raptor-engine/build.mjsscript69.2 KB
examples/raptor-engine/live.jsscript30.0 KB
examples/raptor-engine/raptor-engine-detailed-a4.pdfbinary4.1 MB
examples/raptor-engine/raptor-engine-drawing-a4.pdfbinary2.8 MB
examples/raptor-engine/raptor-engine-light.htmlother1.5 MB
examples/raptor-engine/raptor-engine-poster-a4.pdfbinary599.0 KB
examples/raptor-engine/raptor-engine.htmlother1.5 MB
examples/raptor-engine/raptor.cssother6.6 KB
examples/raptor-engine/sheet.mjsscript6.2 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.7 KB
examples/ripple-tank/ripple-tank.htmlother493.7 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.4 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/pdf-button.mjsscript1.3 KB
kit/react/draw.tsxother6.4 KB
kit/react/live.tsxother4.3 KB
kit/tube.mjsscript13.9 KB
kit/turn-audit.mjsscript56.0 KB
kit/turn-build.mjsscript64.4 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/print.mdmarkdown6.9 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/audit-tube-support.test.mjsscript2.6 KB
scripts/capture-current-geometry.test.mjsscript5.0 KB
scripts/capture-selector.test.mjsscript7.5 KB
scripts/capture.mjsscript14.7 KB
scripts/capture.test.mjsscript3.1 KB
scripts/chrome-port.mjsscript1.1 KB
scripts/chrome-startup.test.mjsscript1.8 KB
scripts/curve-density.test.mjsscript4.1 KB
scripts/drive-actions.test.mjsscript3.0 KB
scripts/drive-async-until.test.mjsscript2.7 KB
scripts/drive-page-load.test.mjsscript1.3 KB
scripts/drive-turn-controller.test.mjsscript2.6 KB
scripts/drive.mjsscript23.3 KB
scripts/drive.test.mjsscript3.6 KB
scripts/enter-key.test.mjsscript2.5 KB
scripts/fidelity-cut.test.mjsscript4.7 KB
scripts/fidelity-tube-coverage.test.mjsscript3.1 KB
scripts/fingerprint.mjsscript1.2 KB
scripts/inline-kit.mjsscript648 B
scripts/line-ends.mjsscript15.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/print-sheet.mjsscript28.3 KB
scripts/print-sheet.test.mjsscript6.6 KB
scripts/print.mjsscript14.5 KB
scripts/publish.mjsscript19.8 KB
scripts/publish.test.mjsscript7.6 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-audit-samples.test.mjsscript1.3 KB
scripts/turn-bench.mjsscript3.8 KB
scripts/turn-check.mjsscript37.5 KB
scripts/turn-convex-check.test.mjsscript1.8 KB
scripts/turn-fidelity.mjsscript19.9 KB
scripts/turn-group-reference.test.mjsscript2.1 KB
scripts/turn-rounded-polygon.test.mjsscript1.5 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

examples/spot-plate/rig.ts

View on GitHub
import { cameraOf, type Flat, iso, type Plan, type Point3, type Projection } from "../../kit/iso-kit";

export const RADII = [30, 22] as const;
export const GAPS = [4, 10, 16, 24, 32, 44] as const;
export const MERGE = 20;
export const MERGE_LEAST = 0;
export const MERGE_MOST = 48;
export const MERGE_STEP = 1;

const UNIFORM = 2;
const SIDE = 0.35;
const FACING = 0.65;
const DEPTH = 0.25;

export const [RA, RB] = RADII;
export const ROWS = GAPS.length;
const FAR = GAPS[ROWS - 1];

export const spanOf = (gap: number) => RA + gap + RB;
export const reachOf = (merge: number) => merge * UNIFORM;
export const sideOf = (merge: number) => Math.round(reachOf(merge) * SIDE * 10) / 10;
export const seenGapOf = (gap: number, merge: number) => (gap >= 2 * merge ? gap : gap <= merge ? 0 : 2 * Math.sqrt(merge * (gap - merge)));
export const joinedAt = (merge: number) => GAPS.filter((gap) => gap < merge);

export type Field = (u: number, v: number) => number;

export function fieldOf(gap: number, merge: number): Field {
  const span = spanOf(gap);
  const most = reachOf(merge);
  return (u, v) => {
    const qu = u - span;
    const la = Math.sqrt(u * u + v * v);
    const lb = Math.sqrt(qu * qu + v * v);
    const a = la - RA;
    const b = lb - RB;
    const nearest = a < b ? a : b;
    if (most <= 0) return nearest;
    const spread = a < b ? b - a : a - b;
    if (spread >= most) return nearest;
    const raw = 0.5 - (0.5 * (u * qu + v * v)) / Math.max(la * lb, 0.0001);
    const facing = raw < 0 ? 0 : raw > 1 ? 1 : raw;
    const reach = most * (SIDE + FACING * facing);
    const h = Math.max(reach - spread, 0) / reach;
    return nearest - h * h * reach * DEPTH;
  };
}

function halfWidth(field: Field, u: number) {
  if (field(u, 0) >= 0) return 0;
  let low = 0;
  let high = RA + 12;
  for (let round = 0; round < 30; round++) {
    const mid = (low + high) / 2;
    if (field(u, mid) < 0) low = mid;
    else high = mid;
  }
  return low;
}

export function neckOf(gap: number, merge: number) {
  if (gap >= merge) return 0;
  const field = fieldOf(gap, merge);
  const from = RA - 8;
  const to = RA + gap + 8;
  const coarse = 48;
  let best = Infinity;
  let at = (from + to) / 2;
  for (let step = 0; step <= coarse; step++) {
    const u = from + ((to - from) * step) / coarse;
    const width = halfWidth(field, u);
    if (width > 0 && width < best) {
      best = width;
      at = u;
    }
  }
  const golden = (Math.sqrt(5) - 1) / 2;
  let low = Math.max(from, at - (to - from) / coarse);
  let high = Math.min(to, at + (to - from) / coarse);
  for (let round = 0; round < 24; round++) {
    const c = high - golden * (high - low);
    const d = low + golden * (high - low);
    if (halfWidth(field, c) < halfWidth(field, d)) high = d;
    else low = c;
  }
  return 2 * halfWidth(field, (low + high) / 2);
}

export const WIDTH = 600;
export const HEIGHT = 340;
const PAD_X = 80;
const PAD_Y = 34;
export const AZIMUTH = 50;

export const MARGIN = 6;
export const PITCH = 84;
export const WELL_HALF = RA + MARGIN;
export const BIG_Y = MARGIN + RA;
export const DATUM_Y = BIG_Y + RA;
export const WELL_D = DATUM_Y + FAR + 2 * RB + MARGIN;
export const BORDER = 14;

export const COLS = 3;
export const ROW_RIM = 16;
export const rowX = (row: number) => (row % COLS) * PITCH;
export const rowY = (row: number) => Math.floor(row / COLS) * (WELL_D + ROW_RIM);

export const WELLS: Plan[] = GAPS.map((_, row) => ({ x: rowX(row) - WELL_HALF, y: rowY(row), w: WELL_HALF * 2, d: WELL_D, r: WELL_HALF }));

export const TRAY: Plan = {
  x: -WELL_HALF - BORDER,
  y: -BORDER,
  w: rowX(COLS - 1) + (WELL_HALF + BORDER) * 2,
  d: rowY(ROWS - 1) + WELL_D + BORDER * 2,
  r: 16,
};
export const TRAY_H = 13;
export const WELL_SINK = 3;
export const FLOOR = TRAY_H - WELL_SINK;
export const THICK = 8;
export const GLASS_TOP = FLOOR + THICK;

export const DECK: Plan = { x: TRAY.x + TRAY.w + 10, y: TRAY.y, w: 172, d: TRAY.d, r: 12 };
export const DECK_H = 6;
export const PIVOT: [number, number] = [DECK.x + 22, DECK.y + DECK.d / 2 + 6];
export const BLADE_LONG = 104;
export const LEAD_LONG = 113;
export const STOP_R = 111;
export const SCALE_R = 120;
export const SWEEP = 180;
export const WASHER_H = 0.8;
export const STACK_Z = DECK_H + WASHER_H;
export const thicknessOf = (gap: number) => 0.45 + gap / 20;
export const LEAD_H = 1.1;

export const BLADE_Z: number[] = (() => {
  const out: number[] = [];
  let z = STACK_Z;
  for (const gap of GAPS) {
    out.push(z);
    z += thicknessOf(gap) + 0.12;
  }
  out.push(z);
  return out;
})();
export const STACK_TOP = BLADE_Z[ROWS]! + LEAD_H;

export const angleOf = (merge: number) => (Math.min(Math.max(merge, MERGE_LEAST), MERGE_MOST) / MERGE_MOST) * SWEEP;

export const BOTTLE: [number, number] = [DECK.x + DECK.w - 33, DECK.y + 35];
export const BOTTLE_TOP = DECK_H + 64;

export const BASE: Plan = { x: TRAY.x - 14, y: TRAY.y - 14, w: DECK.x + DECK.w + 14 - (TRAY.x - 14), d: TRAY.d + 28, r: 10 };
export const BASE_H = 10;
export const FOOT_H = 5;

const RADIANS = Math.PI / 180;

function fit(points: Point3[]): Projection {
  const unitView: Projection = { origin: [0, 0], scale: 1, azimuth: AZIMUTH };
  const flat = points.map((point) => iso(point, unitView));
  const xs = flat.map(([x]) => x);
  const ys = flat.map(([, y]) => y);
  const left = Math.min(...xs);
  const right = Math.max(...xs);
  const up = Math.min(...ys);
  const down = Math.max(...ys);
  const scale = Math.min((WIDTH - PAD_X * 2) / (right - left), (HEIGHT - PAD_Y * 2) / (down - up));
  return { origin: [WIDTH / 2 - ((left + right) / 2) * scale, HEIGHT / 2 - ((up + down) / 2) * scale], scale, azimuth: AZIMUTH };
}

const box = ({ x, y, w, d }: Plan, z0: number, z1: number): Point3[] => {
  const out: Point3[] = [];
  for (const px of [x, x + w]) for (const py of [y, y + d]) for (const pz of [z0, z1]) out.push([px, py, pz]);
  return out;
};

export const P = fit([...box(BASE, -BASE_H - FOOT_H, 0), ...box(DECK, 0, STACK_TOP + 6), [BOTTLE[0], BOTTLE[1], BOTTLE_TOP]]);
export const at = (point: Point3): Flat => iso(point, P);

const CAMERA = cameraOf(P);
export const VIEW: [number, number] = [CAMERA.cosA, CAMERA.sinA];
export const LIGHT: [number, number] = [-CAMERA.sinA, CAMERA.cosA];
export const CLIMB = CAMERA.sinE / CAMERA.cosE;
export const K = CAMERA.k;
export const SIN_A = Math.sin(AZIMUTH * RADIANS);
export const COS_A = Math.cos(AZIMUTH * RADIANS);

const SLIDE_FROM = 0.16;
const SLIDE_TO = 0.84;

export function mergeAtX(x: number) {
  const share = (x / WIDTH - SLIDE_FROM) / (SLIDE_TO - SLIDE_FROM);
  return MERGE_LEAST + Math.min(1, Math.max(0, share)) * (MERGE_MOST - MERGE_LEAST);
}

export const roundMerge = (merge: number) => Math.min(MERGE_MOST, Math.max(MERGE_LEAST, Math.round(merge)));

const listOf = (values: readonly (number | string)[]) =>
  values.length < 2 ? values.join("") : `${values.slice(0, -1).join(", ")} and ${values[values.length - 1]}`;

export function readoutOf(merge: number) {
  const shown = roundMerge(merge);
  return `merge ${shown} px · ${joinedAt(shown).length} of ${ROWS} joined`;
}

export function joinedListOf(merge: number) {
  const joined = joinedAt(roundMerge(merge));
  if (!joined.length) return "none of the six";
  if (joined.length === ROWS) return "all six";
  return `${listOf(joined)} px`;
}

export function bladesOutOf(merge: number) {
  const out = joinedAt(roundMerge(merge)).length;
  if (!out) return "no blade is out";
  if (out === ROWS) return "all six blades are out";
  return out === 1 ? "one blade is out" : `${["", "", "two", "three", "four", "five"][out]} blades are out`;
}

export function spokenOf(merge: number) {
  const shown = roundMerge(merge);
  const joined = joinedAt(shown);
  const apart = GAPS.filter((gap) => gap >= shown);
  const head = `merge ${shown} px: ${joined.length} of ${ROWS} pairs joined`;
  if (!joined.length) return `${head}, all six apart`;
  if (!apart.length) return `${head}, every gap from ${GAPS[0]} to ${FAR} px`;
  return `${head}, gaps ${listOf(joined)} px; ${listOf(apart)} px ${apart.length > 1 ? "stay" : "stays"} apart`;
}

export const listText = listOf;
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated 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: 198kUpdated Claude CodeCodexVerifiedInstall