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/stories/compare.stories.tsx.mjs
View on GitHubconst quote = (value) => JSON.stringify(value);
export default (ctx) => `import type { Meta, StoryObj } from "@storybook/react-vite";
import { useEffect, useState } from "react";
import { installApiStub } from "@/${ctx.slug}-directions/api-stub";
import "@/${ctx.slug}-directions/api-routes";
import { DIRECTION_IDS, KIT_META, SURFACE_IDS, loadKit, surfaceOf, type DirectionId, type DirectionKit, type SurfaceId } from "@/${ctx.slug}-directions/kit";
import { SurfaceView } from "@/${ctx.slug}-directions/frames/SurfaceView";
type Args = { direction: DirectionId; surface: SurfaceId; animation: boolean };
function DirectionView({ direction, surface, animation }: Args) {
const [kit, setKit] = useState<DirectionKit | null>(null);
useEffect(() => {
const restoreFetch = installApiStub();
let live = true;
loadKit(direction).then((loaded) => {
if (live) setKit(loaded);
});
return () => {
live = false;
restoreFetch();
};
}, [direction]);
useEffect(() => {
const previous = document.documentElement.dataset.labAnim;
if (animation) document.documentElement.dataset.labAnim = "1";
else delete document.documentElement.dataset.labAnim;
return () => {
if (previous === undefined) delete document.documentElement.dataset.labAnim;
else document.documentElement.dataset.labAnim = previous;
};
}, [animation]);
if (!kit) return null;
return <SurfaceView kit={kit} surface={surface} />;
}
const meta = {
id: ${quote(ctx.storyId)},
title: ${quote(`Design proposals/${ctx.group}/${ctx.title} directions/Compare`)},
component: DirectionView,
argTypes: {
direction: {
control: { type: "select" },
options: DIRECTION_IDS,
labels: Object.fromEntries(DIRECTION_IDS.map((id) => [id, KIT_META[id].name])),
description: "Which direction's kit renders.",
},
surface: {
control: { type: "select" },
options: SURFACE_IDS,
labels: Object.fromEntries(SURFACE_IDS.map((id) => [id, surfaceOf(id).label])),
description: "Which product surface.",
},
animation: { control: { type: "boolean" }, description: "The lab's hover-motion toggle (html[data-lab-anim])." },
},
args: { direction: "today", surface: ${quote(ctx.surfaces[0].id)}, animation: true },
parameters: {
layout: "fullscreen",
docs: {
description: {
component:
${quote(`Pick a direction and a surface. 0.Today mounts the shipped ${ctx.title} components on the lab's fixtures; 1–${ctx.directions.length} are the explored directions. Page: ${ctx.publicUrl}.`)},
},
},
paperclip: {
capabilities: [${ctx.capabilities.map(quote).join(", ")}],
status: "proposed",
home: "design-proposals",
implementation: "prototype",
boundary: "fixtures",
exception: ${quote(ctx.exception)},
notes: ${quote(ctx.notes)},
},
},
} satisfies Meta<typeof DirectionView>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Compare: Story = { name: "Any direction, any surface" };
export const Today: Story = { name: ${quote(ctx.today.name)}, args: { direction: "today" } };
${ctx.directions.map((direction) => `export const D${direction.digit}: Story = { name: ${quote(direction.name)}, args: { direction: ${quote(direction.id)} } };`).join("\n")}
export const TodayProductionPalette: Story = {
name: "0.Today · production palette",
args: { direction: "today" },
parameters: { designProposalTheme: false },
};
`;
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 |