anbeime/skill / skills/hairline/hairline
hairline
Flagged一句话生成跟随鼠标的交互式等轴测线框图(单文件、零依赖、双击即开),或把已有 SVG/Logo 重建为可交互线框。
packages/hairline/test/browser/serve.mjs
View on GitHub/**
* The browser tests' server: the harness page and the package source, bundled
* by esbuild at start, and the skill's bench with its examples on it, built at
* start too. Playwright starts it (playwright.config.ts).
*/
import { build } from "esbuild";
import { readFileSync } from "node:fs";
import { createServer } from "node:http";
import { fileURLToPath } from "node:url";
import { assemble } from "../../../../skills/hairline-create/build.mjs";
const PORT = 4310;
const here = (p) => fileURLToPath(new URL(p, import.meta.url));
const bundle = await build({ entryPoints: [here("./entry.ts")], bundle: true, format: "esm", target: "es2020", write: false });
/* The skill's bench (skills/hairline-create), with a figure on it: what its agent hands over. */
const example = (name) => assemble(readFileSync(here(`../../../../skills/hairline-create/examples/${name}.js`), "utf8"));
const THROWS = `hairline({ name: "throws", means: "A figure that fails at mount.", rules: [5], range: [0, 1, 2], mount() { throw new Error("no drawing today"); } });`;
const routes = {
"/": ["text/html", readFileSync(here("./harness.html"))],
"/entry.js": ["text/javascript", bundle.outputFiles[0].contents],
"/bench/terrain": ["text/html", example("terrain")],
"/bench/riffle": ["text/html", example("riffle")],
"/bench/throws": ["text/html", assemble(THROWS)],
};
createServer((req, res) => {
const hit = routes[new URL(req.url, "http://x").pathname];
if (!hit) { res.writeHead(404).end(); return; }
res.writeHead(200, { "content-type": `${hit[0]}; charset=utf-8`, "cache-control": "no-store" }).end(hit[1]);
}).listen(PORT, () => console.log(`harness on http://localhost:${PORT}`));
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |