anbeime/skill / skills/hairline/hairline
hairline
Flagged一句话生成跟随鼠标的交互式等轴测线框图(单文件、零依赖、双击即开),或把已有 SVG/Logo 重建为可交互线框。
packages/hairline/test/ssr.test.tsx
View on GitHubimport { createElement } from "react";
import { renderToString } from "react-dom/server";
import { describe, expect, it } from "vitest";
/* No DOM here on purpose: this is what a server sees. */
describe("on the server", () => {
it("imports both entries without touching a DOM", async () => {
expect(typeof document).toBe("undefined");
expect(typeof window).toBe("undefined");
await expect(import("../src/index")).resolves.toBeTypeOf("object");
await expect(import("../src/react")).resolves.toBeTypeOf("object");
});
it("renders a component as an empty box of the right shape", async () => {
const { Riffle } = await import("../src/react");
const html = renderToString(createElement(Riffle, { className: "w-80", intensity: 0.8, theme: "dark", label: "Cards", play: true, onRead() {} }));
expect(html).toBe('<div class="w-80" style="aspect-ratio:5 / 4"></div>');
});
it("says what is wrong when a figure is mounted without a DOM", async () => {
const { riffle } = await import("../src/index");
expect(() => riffle({} as HTMLElement)).toThrow(/needs a DOM/);
});
});
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 |