paperclipai/paperclip / .agents/skills/directions-lab
directions-lab
VerifiedScaffold a directions lab that shows shipped UI (Today) beside 2-3 design directions, with surface tabs, theme and animation toggles and the V1 MVP hover motion, registered in design-proposals Storybook. Use for a directions page or lab, or to explore design directions next to production.
assets/templates/tests/api-stub.test.ts.mjs
View on GitHubexport default () => `// @vitest-environment jsdom
import { afterEach, describe, expect, it } from "vitest";
import { installApiStub, registerApiRoute } from "./api-stub";
import { COMPANY } from "./fixtures";
describe("installApiStub", () => {
const original = window.fetch;
const restores: Array<() => void> = [];
afterEach(() => {
while (restores.length) restores.pop()?.();
window.fetch = original;
});
it("answers /api/ from the fixtures and puts fetch back when restored", async () => {
restores.push(installApiStub());
expect(window.fetch).not.toBe(original);
const companies = await (await window.fetch("/api/companies")).json();
expect(companies).toEqual([COMPANY]);
restores.pop()?.();
expect(window.fetch).toBe(original);
});
it("serves a registered route and answers anything else under /api/ with an empty object", async () => {
registerApiRoute((pathname) => (pathname === "/api/lab/ping" ? { pong: true } : undefined));
restores.push(installApiStub());
expect(await (await window.fetch("/api/lab/ping")).json()).toEqual({ pong: true });
expect(await (await window.fetch("/api/lab/nothing", { method: "POST" })).json()).toEqual({});
});
it("keeps one stub across nested installs and restores on the last release", () => {
const first = installApiStub();
const stub = window.fetch;
const second = installApiStub();
restores.push(first, second);
expect(window.fetch).toBe(stub);
first();
expect(window.fetch).toBe(stub);
first();
expect(window.fetch).toBe(stub);
second();
expect(window.fetch).toBe(original);
});
});
`;
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |