/dev-flow:monorepo-sync-typesfrom dev-flow
Regenerates backend types and re-exports them via packages/shared/types/ in a turborepo monorepo. Supports Supabase, neon-drizzle, tRPC, and custom REST schemas. Use after backend migrations or schema changes.
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; scripts run unread.
See references/contracts.md (vendored from dev-flow). Key facts:
<project-root>/.workflow/meta.json#stack.framework — must be "monorepo".meta.json#stack.db and stack.auth to determine the source of truth:
"supabase" → run supabase gen types typescript against the linked project."neon-drizzle" → introspect/pull via drizzle-kit and re-export InferSelectModel/InferInsertModel from the Drizzle schema (this is the default DB for most projects — see module-add/references/module-db.md)."trpc" → re-import the server router type and re-export it."firebase" → no auto-gen, but normalize fixed types from Firestore rules (limited)."custom-rest" → ask the user where the schema lives (Zod / OpenAPI / TS source).packages/shared/src/types/ (NOT into packages/api/, because packages/shared is consumed by BOTH apps including for non-backend code).phase.monorepo-bootstrap/references/structure.md — for packages/shared/src/types/ location.rn-backend/references/<provider>.md — for provider-specific gen commands.module-add/references/module-db.md — for the web side conventions.Read .workflow/meta.json. Abort if:
stack.framework != "monorepo".stack.db == null AND stack.auth == null → "No backend configured yet. Run module-add db or rn-module-add db first."Read meta.json#stack_config.supabase_project_ref (or equivalent) for the gen command target.
Run the canonical gen command. Checked 2026-10-22 against [email protected]'s own README (and before that 2.113.0; the README still shows the same two forms) — it now
documents the command without an explicit typescript argument:
npx supabase gen types --linked > packages/shared/src/types/database.ts # after `supabase login` + `supabase link`
npx supabase gen types --local > packages/shared/src/types/database.ts # against a running local `supabase start`
--project-id <ref> (the older explicit form this file previously showed as the default) is still
referenced elsewhere in Supabase's docs and likely still works, but --linked/--local are what the
shipped CLI's own README leads with now — prefer them. [VERIFY] against supabase gen types --help
for the installed CLI version; docs.supabase.com is blocked from this sandbox so the full flag
reference couldn't be cross-checked.
Add to packages/shared/src/index.ts:
export type { Database } from './types/database';
Add a typed Supabase client wrapper in packages/api/src/client.ts:
import { createClient } from '@supabase/supabase-js';
import type { Database } from '@<slug>/shared/types/database';
export const supabase = createClient<Database>(
process.env.EXPO_PUBLIC_SUPABASE_URL!, // or NEXT_PUBLIC_ on web side — see decision-tree
process.env.EXPO_PUBLIC_SUPABASE_ANON_KEY!,
);
Both web and mobile apps now import supabase from @<slug>/api/client and get full type safety: supabase.from('posts').select(...) is fully typed.
This is the default DB stack for most projects (see module-add/references/module-db.md). Drizzle's schema file is already the source of truth for types — there's no separate "gen types" command — so syncing means two things: (1) make sure the schema file matches the live DB, and (2) re-export row types to packages/shared/.
npx drizzle-kit pull
This introspects the Neon database and (re)writes the schema file. Confirm the target path against module-add/references/module-db.md — by default apps/web/lib/db/schema.ts.InferSelectModel / InferInsertModel (from drizzle-orm) into packages/shared/src/types/db.ts:
import type { InferSelectModel, InferInsertModel } from 'drizzle-orm';
import { users, posts } from '../../../../apps/web/lib/db/schema'; // adjust relative path to the real schema location
export type User = InferSelectModel<typeof users>;
export type NewUser = InferInsertModel<typeof users>;
export type Post = InferSelectModel<typeof posts>;
export type NewPost = InferInsertModel<typeof posts>;
packages/shared/src/index.ts:
export * from './types/db';
If the schema file was hand-edited to add tables/columns that haven't reached the database yet, don't pull (it would overwrite the new columns) — instead run the migration first (drizzle-kit generate + drizzle-kit migrate; drizzle-kit push is dev-only and destructive on column drops, per module-add/references/module-db.md), then re-export types from the now-current schema.
The types flow automatically via TS inference — no gen step. The skill verifies the wiring is correct:
packages/api/src/client.ts imports the server's AppRouter type:
import type { AppRouter } from '../../../server/src/router';
export const trpc = createTRPCReact<AppRouter>();
packages/shared/src/types/:
import type { inferRouterOutputs } from '@trpc/server';
import type { AppRouter } from '../../api/src/router-type'; // a re-export
export type RouterOutputs = inferRouterOutputs<AppRouter>;
If the server lives outside the monorepo: import via a published @<scope>/types package OR copy the router types file into packages/shared/src/types/router.d.ts and tell the user to keep it in sync.
No auto-gen. The skill creates skeleton types from Firestore rules + user input:
firestore.rules).packages/shared/src/types/firestore.ts with the shapes.This is a manual-maintenance scenario — Firebase doesn't ship a type-gen tool the way Supabase does.
Ask the user where the schema lives:
packages/shared/src/types/api.ts via z.infer<typeof Schema> for each.npx openapi-typescript <spec> -o packages/shared/src/types/api.d.ts.packages/shared/src/types/api.ts and instruct the user to keep in sync.Run pnpm tsc --noEmit from apps/web, apps/mobile, and packages/shared. Must pass.
If types changed in ways that broke existing code, report each error — the user fixes the consumers (the skill doesn't auto-fix arbitrary call sites).
{
"stack_config": {
"types_last_synced_at": "<iso>",
"types_source": "supabase" // or "neon-drizzle" / "trpc" / "firebase" / "custom-rest"
},
"history": [
...,
{ "skill": "monorepo-sync-types", "ran_at": "<iso>", "outputs": [...] }
]
}
If git repo: commit with chore(types): sync from <provider>.
packages/api/ — types are general-purpose, both apps consume them; they live in packages/shared/.packages/shared/src/index.ts re-export — apps would need deep import paths.--project-id flag on supabase gen types — it will fail or generate the wrong schema.supabase status).../../../../server/src/router). Instead use a workspace import if the server is in the monorepo, or a .d.ts shim file if not.python3 .../dev-flow/scripts/update_meta.py <project-root> record-artifact \
--path packages/shared/src/types/database.ts --produced-by 'monorepo-sync-types'
python3 .../dev-flow/scripts/update_meta.py <project-root> append-history \
--skill 'monorepo-sync-types' --inputs '{"source": "supabase"}' --outputs '{"types": "packages/shared/src/types/database.ts"}'
docs/superpowers/specs/2026-05-29-monorepo-set-design.mdmonorepo-bootstrap/references/structure.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lukedj78/dev-flow --plugin dev-flow57 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)./app-verificationGive a project a manual for proving its features on the real app, written once and kept true: `.claude/skills/verify-<app>/` with how to launch it until it is usable, a read-only doctor check, how to drive it with the repo's real selectors, what counts as proof and where it goes, how to stop only what it started — plus one feature file per PRD story, seeded from the wireframe screen inventory, and a headless-Chrome render probe (overflow, wrapped headings, text hidden under reduced motion). Two modes: create (scaffold, fill from the code, prove it live once, record `meta.json#verification`) and maintain (re-read every feature from source, drive them all live, fix the manual, report real regressions). Web, Expo and eve. Triggers: "verify the app", "prova che funziona", "verification skill", "come si avvia l'app per provarla", "maintain the verify skill", "il manuale di verifica è aggiornato?". Not for: writing tests (write-tests), UI audits (shadscan), security (app-security), deploying (vercel-deploy)./compliance-auditRun a GDPR + EU AI Act compliance audit on an existing dev-flow project (web / mobile / eve agent) and remediate what it finds. Two modes: Audit (scan the codebase and `meta.json#stack` against a 11-point risk register — DSAR, consent/cookies, EU data residency, retention and PII-scrubbing, AI-transparency Art.50, high-risk Annex III, sub-processors — into a report with severity, evidence and article mapping) and Remediate (apply the safe mechanical mitigations, flag the ones needing a legal decision, never deciding legal basis or high-risk for the user). A pre-deploy gate; run it any time. Triggers: "audit GDPR", "compliance check", "AI Act", "siamo conformi?", "DSAR / cancellazione account / cookie consent / data residency". Not for: the other pre-deploy gates (vercel-doctor, shadscan, launch-audit, app-security), legal advice or DPIA sign-off (a DPO confirms), building features, or writing the PRD (use prd-from-idea)./composition-patterns-guideUse when refactoring React or React Native components that suffer from boolean prop proliferation, missing compound structure, prop drilling, or unclear ownership of state. Codifies the 7 Vercel composition-patterns rules for our web + RN stack — composition or explicit variants over boolean props, compound components with shared context, state lifted into providers, children over render props, React 19 (no forwardRef) — plus our colocation rules (Rule of Three, L0/L1/L2, `_components/`). Triggers on: "refactor this component", "questo componente ha troppi prop booleani", "rendi questo componente più componibile", "compound component", "context provider per X", "design del componente". Not for: scaffolding new components (use design-md-to-app, screenshot-to-page, rn-add-screen), or moving components up the hierarchy (use promote-component)./coss-uiSet up or extend a Next.js web app with Coss/UI — the official Cal.com design system, built on Base UI + Tailwind CSS v4 and installed through the shadcn CLI via the namespaced `@coss/*` registry. Two modes: Init (`shadcn init @coss/style` on a new project) and Add (pull `@coss/ui` primitives, single `@coss/<name>` components, or particles into an existing one). Sets `meta.json#stack.ui = "coss"`. Triggers: "usa Coss/UI", "coss.com/ui", "Cal.com design system", "aggiungi un componente Coss", "init @coss/style", "scaffold con Coss UI", or dev-flow routing when `stack.ui = "coss"`. Requires Tailwind CSS v4 and carries a mixed MIT/AGPLv3 license. Not for: writing the DESIGN.md (use figma-to-design-md / image-to-design-md), the generic Next.js scaffold (design-md-to-app owns it), backend modules (module-add), or React Native (RN uses NativeWind, not Coss).