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/today.test.tsx.mjs
View on GitHubexport default (ctx) => `// @vitest-environment jsdom
import { act } from "react";
import { createRoot, type Root } from "react-dom/client";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { installApiStub } from "./api-stub";
import "./api-routes";
import { kit } from "./directions/today";
import { ${ctx.surfaces.map((surface) => surface.fixture).join(", ")} } from "./fixtures";
import { Slot } from "./frames/Slot";
import { createLabQueryClient, LabProviders } from "./providers";
(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;
async function settle(client: ReturnType<typeof createLabQueryClient>) {
await act(async () => {
await Promise.resolve();
});
for (let round = 0; round < 50 && client.isFetching() > 0; round += 1) {
await act(async () => {
await new Promise((resolve) => setTimeout(resolve, 10));
});
}
}
describe("the Today kit on the lab fixtures", () => {
let container: HTMLDivElement;
let root: Root;
let restoreFetch: () => void;
beforeEach(() => {
restoreFetch = installApiStub();
container = document.createElement("div");
document.body.appendChild(container);
root = createRoot(container);
});
afterEach(() => {
act(() => root.unmount());
container.remove();
restoreFetch();
});
${ctx.surfaces
.map(
(surface) => `
it("renders something inside the ${surface.id} slot", async () => {
const client = createLabQueryClient();
await act(async () => {
root.render(
<LabProviders client={client}>
<Slot kit={kit}>
<kit.${surface.body} items={${surface.fixture}} />
</Slot>
</LabProviders>,
);
});
await settle(client);
const slot = container.querySelector('[data-direction="today"]');
expect(slot).not.toBeNull();
expect(slot?.children.length ?? 0).toBeGreaterThan(0);
expect(slot?.textContent?.trim()).not.toBe("");
client.clear();
});`,
)
.join("\n")}
});
`;
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: 323k | 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 |