From create-new-project
Retrofit the design-system viewer app into an existing create-new-project-style pnpm monorepo (Next.js + shadcn/ui in apps/web, packages/ui present). Use when a project was scaffolded before this feature existed, or when the user wants to add apps/design-system to a compatible monorepo without re-scaffolding.
How this skill is triggered — by the user, by Claude, or both
Slash command
/create-new-project:add-design-systemThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Drop the design-system viewer (`apps/design-system`) into an existing monorepo that was scaffolded by `create-new-project`, or any monorepo that follows the same layout (Next.js + shadcn/ui in `apps/web`, `packages/ui` containing the shadcn components, pnpm workspaces).
Drop the design-system viewer (apps/design-system) into an existing monorepo that was scaffolded by create-new-project, or any monorepo that follows the same layout (Next.js + shadcn/ui in apps/web, packages/ui containing the shadcn components, pnpm workspaces).
Use when:
create-new-project) and wants the design-system viewer without re-running the full scaffold.Don't use when starting a brand-new project — that's the create-new-project skill, which already includes the design-system viewer.
The agent's job is narrow:
scripts/add.mjs with --root.All preflight against the target monorepo (workspace markers, required files, "already installed?" idempotency) lives inside add.mjs, not here.
Gather inputs through the host agent's interactive user-input mechanism. In Claude Code, use AskUserQuestion. In Codex, use the available user-input flow when present; otherwise ask one concise question in chat and wait for the reply.
Run these checks in parallel and collect failures into a single report. Don't proceed until all pass.
command -v pnpm && pnpm --version — need pnpm 10.x. Fix: corepack enable && corepack prepare pnpm@10 --activatecommand -v gh — needed to clone the design-system viewer. Fix: brew install ghnode -v — Node 20+. Fix: brew install node@20 or nvmcommand -v git — Fix: xcode-select --installIf ANY check fails: stop, report ALL failures in a single block, give each fix command, tell the user to re-run the skill once fixed.
Ask once (skip if already provided in the skill invocation args):
process.cwd() if it looks like a monorepo (has pnpm-workspace.yaml); otherwise ask. Tilde-expand if the user types ~/....Run:
node "$SKILL_DIR/scripts/add.mjs" --root "<project-root>"
Where $SKILL_DIR is this skill's base directory (the one containing SKILL.md).
The script:
package.json exists at rootpnpm-workspace.yaml exists at root (monorepo marker)apps/web/app/layout.tsx exists (font sync source)packages/ui/components.json exists (shadcn target)packages/ui/src/styles/globals.css exists (CSS patch target)apps/design-system/ does NOT already exist (idempotency — bail instead of clobbering)addisonk/create-new-project (depth 1) into apps/design-system/, removes its .git.patch-design-system.mjs (syncs style + fonts from apps/web, adds sleep 2 to the dev script).patch-ui-globals.mjs (appends Tailwind safelist + .ds-color-picker overrides to packages/ui/src/styles/globals.css).dev:design-system script to root package.json (only if not already present — doesn't touch other scripts).pnpm install --no-frozen-lockfile so the viewer's new deps resolve.Stream the script's output. If it errors, surface the last ~50 lines.
Show the user:
<root>/apps/design-system/pnpm dev:design-system (or pnpm --filter design-system dev)pnpm dev will pick it up automatically.apps/web is handled by a sleep 2 in design-system's dev script (web claims the lowest free port first).create-new-project scaffolds a new monorepo end-to-end. Routing "I have an existing project, just add this one piece" through that skill would mean teaching bootstrap.mjs to skip large chunks of itself — error-prone and hard to test. Keeping retrofit features as single-purpose skills (this one, future add-mobile, future add-shared-package) keeps each path narrow and testable.
The shared atomic operations (patch-design-system.mjs, patch-ui-globals.mjs) already take --root and are idempotent, so this skill reuses them directly via a relative path into ../create-new-project/scripts/ rather than duplicating logic.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub addisonk/create-new-project --plugin create-new-project