/dev-flow:monorepo-add-shared-packagefrom dev-flow
Extracts logic from apps/web/ or apps/mobile/ into a new or existing shared package under packages/ in a turborepo monorepo, or creates a fresh empty shared package skeleton. Updates path aliases and workspace dependencies.
Ships in dev-flow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
See references/contracts.md (vendored from dev-flow). Key facts:
<project-root>/.workflow/meta.json#stack.framework — must be "monorepo".meta.json#phase ≥ "scaffolded".packages/typescript-config/base.json#paths (new alias @<slug>/<pkg-name>/*) — not a root
tsconfig.base.json, which monorepo-bootstrap never creates (Turborepo's official pattern
is a workspace package extended by name; see monorepo-bootstrap/references/structure.md)apps/web/package.json#dependencies AND apps/mobile/package.json#dependencies (as workspace:*)meta.json#stack_config.shared_packages arrayphase.monorepo-bootstrap/references/structure.md — for the canonical layout.monorepo-bootstrap/references/patterns.md — for the workspace protocol + import conventions.Read .workflow/meta.json. Abort with clear message if:
stack.framework != "monorepo" → "This skill is monorepo-only. For non-monorepo projects use plain TS path aliases inside the app."phase < "scaffolded" → "Need at least scaffolded — run monorepo-bootstrap first."Read meta.json#project_slug for the namespace.
Ask the user (one round-trip):
"Package name (without namespace)? E.g. 'shared', 'design', 'api', 'ui', 'config-eslint'. Or a topic-specific one like 'forms', 'analytics', 'payments-client'."
Validate:
web, mobile, root (those are app names, not packages).shared, design, or api and the package already exists, route to that existing package (add files there instead of creating a new one).Resulting package: @<slug>/<name> lives at packages/<name>/.
Two flows:
(a) Create-empty mode — user wants a fresh skeleton.
packages/<name>/src/index.ts (empty barrel export).packages/<name>/package.json with name @<slug>/<name>, main ./src/index.ts.packages/<name>/tsconfig.json extending @<slug>/typescript-config/base.json.(b) Extract-from-app mode — user wants to move existing files out of an app.
apps/web/lib/format.ts or apps/mobile/types/Post.ts."mv the listed files into packages/<name>/src/.from "@<slug>/web/lib/format" → from "@<slug>/<name>/format"apps/web/tsconfig.json and apps/mobile/tsconfig.json so the find-replace patterns are picked up.Patch packages/typescript-config/base.json:
@<slug>/<name>/*: ["packages/<name>/src/*"].Patch both apps/web/package.json and apps/mobile/package.json:
"@<slug>/<name>": "workspace:*" to dependencies.pnpm installpnpm install
This wires the workspace properly. Without it, imports from the new package fail.
Run npx tsc --noEmit from both apps/web/ and apps/mobile/. Must pass.
If extract mode was used, also verify the moved files compile inside their new home: cd packages/<name> && npx tsc --noEmit.
{
"stack_config": {
"shared_packages": ["@<slug>/shared", "@<slug>/design", "@<slug>/api", "@<slug>/<name>"]
},
"history": [
...,
{ "skill": "monorepo-add-shared-package", "ran_at": "<iso>", "inputs": {"name": "<name>", "mode": "create|extract", "files_moved": [...]}, "phase_before": "...", "phase_after": "..." }
]
}
If git repo: commit with feat(packages/<name>): create shared package or refactor: extract <files> into @<slug>/<name>.
workspace:* — imports will silently fail at runtime.packages/typescript-config/base.json#paths update — TS won't resolve the alias.web, mobile, or root — collision with app/root names.packages/foo importing from packages/bar while bar imports from foo) — turborepo will complain but it's avoidable upfront.file:../packages/<name> style instead of workspace:* — pnpm won't deduplicate.When this skill modifies state (artifact written, phase advanced, history appended), use the canonical script when available:
python3 .../dev-flow/scripts/update_meta.py <project-root> append-history \
--skill 'monorepo-add-shared-package' --inputs '{"name": "<name>"}' --outputs '{"files": [...]}'
docs/superpowers/specs/2026-05-29-monorepo-set-design.mdmonorepo-bootstrap/references/structure.md — canonical layoutmonorepo-bootstrap/references/patterns.md — workspace + import conventionsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
57 skills in this plugin
/animated-iconsAdd a Motion-animated icon to a Next.js app from a shadcn registry instead of hand-animating an SVG. Two registries, picked from the project's icon set: **heroicons-animated** (316 icons, `shadcn add @heroicons-animated/<name>`) and **hugeicons-animated** (165 icons, `shadcn add @hugeicons-animated/<name>`, which also installs a shared `lib/use-icon-animation.ts`). Both MIT, both on the `motion` runtime, both copied into your repo as source. This skill owns the install plus the two things the raw components lack: a `prefers-reduced-motion` guard and timing aligned to the project motion tokens (`lib/motion/`). Use when the user says "animated icon", "animate this icon", "make the bell/heart/menu icon animate on hover", "aggiungi un'icona animata", or wants an icon micro-interaction. Refuses outside Next.js web — for React Native use `rn-animations-gestures`. Not for: static icons, a whole motion system (`transitions`), or installing the runtime itself (`module-add motion`)./app-securityCheck whether an app's own code can be attacked before it ships — vulnerable dependencies, secrets in the code and in git history, Next.js authorization gaps (Server Actions and route handlers without a session check, queries by id with no owner filter — IDOR), data over-exposure, secrets in public env vars, raw SQL — then read the flagged code against an OWASP checklist, with an opt-in dynamic level (Strix) that proves exploits against the app running locally. The fifth pre-deploy gate, beside compliance-audit, vercel-doctor, shadscan and launch-audit; reports and routes, never blocks. Triggers: "security review", "è sicura l'app?", "controllo di sicurezza prima del deploy", "IDOR", "secrets in the repo", "pentest". Not for: GDPR and legal (compliance-audit), UI quality (shadscan), cost (vercel-doctor), launch readiness (launch-audit), a review of one branch diff (Claude Code's /security-review), third-party registry code (registry-intake).npx claudepluginhub lukedj78/dev-flow --plugin dev-flow