BumpyClock/agent-templates / skills/anatomy
anatomy
UnverifiedBuild 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.
scripts/react-solid-seamless.test.mjs
View on GitHubimport assert from "node:assert/strict";
import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import { createRequire } from "node:module";
import { tmpdir } from "node:os";
import { dirname, join, resolve } from "node:path";
import test from "node:test";
import * as G from "../kit/lathe.mjs";
const require = createRequire(import.meta.url);
const ts = require("typescript");
const React = require("react");
const { renderToStaticMarkup } = require("react-dom/server");
const directory = mkdtempSync(join(tmpdir(), "anatomy-react-solid-"));
try {
for (const file of ["kit/iso-kit.ts", "kit/react/live.tsx", "kit/react/draw.tsx"]) {
const output = join(directory, file.replace(/\.tsx?$/, ".js"));
mkdirSync(dirname(output), { recursive: true });
const result = ts.transpileModule(readFileSync(resolve(file), "utf8"), { fileName: file, compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2022, jsx: ts.JsxEmit.React } });
writeFileSync(output, result.outputText);
}
const { Solid } = require(join(directory, "kit/react/draw.js"));
const P = { origin: [0, 0], scale: 1, azimuth: 45, elevation: 30 };
for (const lit of [false, true]) test(`actual React renderer preserves seamless sphere tone regions with lit=${lit}`, () => {
const paths = G.sphereOf([0, 0, 0], 4, P);
assert.equal(paths.seamless, true);
assert.ok(paths.shades.some(Boolean));
const html = renderToStaticMarkup(React.createElement("svg", null, React.createElement(Solid, { paths, lit })));
assert.match(html, /data-seamless=""/);
assert.equal(/data-lit=""/.test(html), lit);
assert.match(html, /class="iso-shade"/);
});
test("actual React renderer preserves ordinary hard solids", () => {
const paths = G.prismOf(G.frameAlong([0, 0, 0], [0, 0, 1]), [[-1, -1], [1, -1], [1, 1], [-1, 1]], 0, 2, P);
assert.equal(Boolean(paths.seamless), false);
const html = renderToStaticMarkup(React.createElement(Solid, { paths }));
assert.doesNotMatch(html, /data-seamless/);
assert.match(html, /class="iso-line iso-edge"/);
});
test("actual React renderer preserves seamless opt-out and child ordering", () => {
const paths = { ...G.sphereOf([0, 0, 0], 4, P), seamless: false };
const html = renderToStaticMarkup(React.createElement(Solid, { paths, inner: React.createElement("circle", { id: "inner" }) }, React.createElement("circle", { id: "child" })));
assert.doesNotMatch(html, /data-seamless/);
assert.ok(html.indexOf('id="inner"') < html.indexOf('class="iso-line iso-edge"'));
assert.ok(html.indexOf('id="child"') > html.indexOf('class="iso-line iso-edge"'));
});
} finally {
rmSync(directory, { recursive: true, force: true });
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| 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: 196k | Updated | Claude CodeCodex | Verified | Install |