anbeime/skill / skills/anatomy/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 prints a figure as an A4 PDF (poster, drawing or handout) and publishes it to the Anatomy community gallery when asked.
scripts/drive-actions.test.mjs
View on GitHubimport assert from "node:assert/strict";
import { execFile } from "node:child_process";
import { mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { promisify } from "node:util";
import { fileURLToPath } from "node:url";
import test from "node:test";
const execute = promisify(execFile);
const drive = fileURLToPath(new URL("drive.mjs", import.meta.url));
async function run(actions) {
const directory = await mkdtemp(join(tmpdir(), "anatomy-drive-actions-"));
try {
const page = join(directory, "figure.html");
const file = join(directory, "actions.json");
await writeFile(page, '<!doctype html><div class="iso-plate">Figure</div>');
await writeFile(file, JSON.stringify(actions));
try {
return { code: 0, ...await execute(process.execPath, [drive, page, "--actions", file], { timeout: 30000 }) };
} catch (error) {
return { code: error.code, stdout: error.stdout, stderr: error.stderr };
}
} finally {
await rm(directory, { recursive: true, force: true });
}
}
test("unknown actions fail instead of silently skipping verification", async () => {
const result = await run([["unti", "false", 1]]);
assert.equal(result.code, 1);
assert.match(result.stderr, /unknown action unti/);
});
test("valid actions still execute after validation", async () => {
const result = await run([["wait", 1], ["eval", "({checked:true})"]]);
assert.equal(result.code, 0);
assert.match(result.stdout, /eval: \{"checked":true\}/);
});
test("an invalid later action fails before earlier actions execute", async () => {
const result = await run([["eval", "({shouldNotRun:true})"], ["screenshot", "out.png"]]);
assert.equal(result.code, 1);
assert.doesNotMatch(result.stdout, /shouldNotRun/);
});
test("orbit rejects a step that never reaches its end angle", async () => {
for (const action of [["orbit", "out.png", 90, 0, 0], ["orbit", "out.png", 0, 90, -10], ["orbit", "out.png", 0, 90, "10"]]) {
const result = await run([action]);
assert.equal(result.code, 1, JSON.stringify(action));
assert.match(result.stderr, /orbit needs numeric from, to and a nonzero step/);
}
});
test("sheet rejects a count that yields no frames", async () => {
for (const action of [["sheet", "out.png", 50, 0], ["sheet", "out.png", 50, 2.5], ["sheet", "out.png", -1, 3]]) {
const result = await run([action]);
assert.equal(result.code, 1, JSON.stringify(action));
assert.match(result.stderr, /sheet needs a non-negative every/);
}
});
test("a valid orbit and sheet still pass validation", async () => {
const orbit = join(tmpdir(), `anatomy-orbit-${process.pid}.png`);
const sheet = join(tmpdir(), `anatomy-sheet-${process.pid}.png`);
try {
const result = await run([["eval", "window.__isoTurn={set(){}}"], ["orbit", orbit, 0, 20, 10], ["sheet", sheet, 10, 2]]);
assert.equal(result.code, 0, result.stderr);
} finally {
await rm(orbit, { force: true });
await rm(sheet, { 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: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | 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: 198k | Updated | Claude CodeCodex | Verified | Install |