/dev-flow:rn-add-screenfrom dev-flow
Adds a new screen to an existing Expo + React Native app: generates Expo Router route files, wires TanStack Query data fetching, applies NativeWind classes from DESIGN.md tokens, and respects scaffolded folder layout. For use after rn-bootstrap when user describes a screen or provides a screenshot/wireframe.
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 "expo-rn".meta.json#phase ≥ "scaffolded" (run rn-bootstrap first)..workflow/DESIGN.md (the contract location) for the design tokens; the NativeWind classes it emits must exist in the tailwind.config.js that rn-bootstrap generated from it.<project-root>/app/... per call — routes only: Expo Router treats every file under app/ as a route, so nothing else may live there. Optional: screen-private components under <project-root>/components/<feature>/ (L0, OUTSIDE app/ — see Folder structure rules below), hooks under <project-root>/lib/queries/.meta.json#phase = "page_generated" after the first screen, then leaves it (subsequent screens are still page_generated).scaffolded or page_generated.dev-flow.rn-fundamentals/SKILL.md — file layout, modern primitives.rn-styling/references/patterns.md — root screen pattern, dark mode, FlashList.rn-expo-router/references/concepts.md — file-based routing rules.rn-expo-router/references/patterns.md — modal vs push, search params, auth gates.rn-data-fetching/references/patterns.md — if the screen fetches data, use the patterns there.rn-components-apis/references/decision-tree.md — which primitive (FlashList vs ScrollView, Pressable, etc.).Read .workflow/meta.json. Abort with clear message if:
stack.framework != "expo-rn" → "Wrong stack."phase < "scaffolded" → "Run rn-bootstrap first."Gather from user (one round-trip max — collect everything at once):
/profile/[id] → app/profile/[id].tsx. Group? (auth)/sign-in? Modal? See references/screen-patterns.md for the mapping.If a screenshot is provided, infer the above and confirm with the user before generating.
See references/screen-patterns.md for canonical templates:
(app)/ group)Pick ONE template; do not mix unless the screen is genuinely hybrid.
Write to <project-root>/app/<route>.tsx. The file MUST:
SafeAreaView from react-native-safe-area-context at root.tailwind.config.js tokens (no magic colors).Pressable, expo-image, FlashList as appropriate.lib/query-keys.ts if it doesn't exist).useMutation hook for submit.components/<feature>/ (L0, e.g. components/posts/PostCard.tsx for a /posts route) — NEVER under app/<route>/_components/ (Expo Router has no private-folder convention; every file under app/ becomes a route — see the Folder structure rules below). Promote to components/shared/<dominio>/ (L2) only per the Rule of Three.<project-root>/lib/queries/ or lib/mutations/.<Link> there ONLY IF the user explicitly asks.Run:
npx tsc --noEmit from project root → must pass.npx expo-router-typegen (if available) so typed routes refresh.If typing fails, fix and re-verify before reporting done.
meta.json#phase: if currently "scaffolded", set to "page_generated". Otherwise leave.meta.json#history: append { skill: "rn-add-screen", ran_at: <iso>, outputs: [<file paths>], phase_before: <prev>, phase_after: <current> }.git add the new files + git commit -m "feat(<route>): add <screen-name> screen".<Tabs.Screen>, <Stack.Screen>) inside the screen file. Layout lives in _layout.tsx.Image from react-native — expo-image.FlatList for a long list — FlashList.fetch + useEffect for production data — TanStack Query.tailwind.config.js, app.json, other routes).references/contracts.md §Golden rules). Before writing a component, search React Native / Expo core components (Pressable, Modal, TextInput, Switch, expo-image, FlashList…), whatever component stack meta.json#stack declares, and components/shared/ — if one covers the pattern, use it; if two together do, compose them. Never add a second component library, never fork a declared component's behaviour; a truly new primitive needs a recorded exception (meta.json#stack_config.primitive_exceptions).When this skill modifies state (artifact written, phase advanced, history appended), use the canonical script when available:
# Wherever dev-flow is installed (e.g. ~/.claude/skills/dev-flow/), invoke:
python3 .../dev-flow/scripts/update_meta.py <project-root> record-artifact \
--path <relative-path> --produced-by '<this-skill-name>' [--derived-from <p1> <p2> ...]
python3 .../dev-flow/scripts/update_meta.py <project-root> set-phase <new_phase>
python3 .../dev-flow/scripts/update_meta.py <project-root> append-history \
--skill '<this-skill-name>' --inputs '{...}' --outputs '{...}' --phase-after <new_phase>
The script enforces phase monotonicity, normalizes legacy kebab-case aliases (e.g. module-added → module_added), and writes the canonical sha256 + timestamp into meta.json#artifacts. Fall back to direct JSON editing only if the script is not on PATH (and warn the user).
Non-negotiable Expo Router constraint: app/ is file-based routing only. Unlike Next.js App Router, Expo Router has no convention for "private", non-routable folders — there is no _-prefix skip rule. Every .tsx/.ts file placed under app/ (aside from a few reserved names like _layout.tsx, +not-found.tsx) is registered as a real route. Putting a component at app/<route>/_components/PostCard.tsx creates a ghost route at that path, not a private folder.
This is Expo Router's settled design, not a gap. The request (expo/expo#44696) was closed won't fix on 2026-06-01: the maintainers "explicitly want people to fall into a pit of success where screens / UI / business logic … are moved into a separate folder", and consider filename conventions brittle because _, + and - are all legal in pathnames. Confirmed mechanically at [email protected] (2026-10-17): the route scanner has no underscore rule. So assume no private folders inside app/ — permanently, not provisionally. Detail in promote-component/references/colocation-rules.md.
Given that constraint, the rule for this skill is:
app/ = routes only. No components, no hooks, no utils — ever.
Components go OUTSIDE app/, in components/<feature>/<Component>.tsx (kebab-case feature folder named after the screen/domain, e.g. components/posts/PostCard.tsx; complex/compound components get their own subfolder). This is the mobile equivalent of what _components/ does on web.
No src/ prefix: keep app/, components/, lib/ at the project root — consistent with rn-bootstrap's scaffold and the default create-expo-app templates (which don't use src/).
The model (Rule of Three, L0 → L1 → L2 promotion ladder) is unchanged from the general dev-flow contract — only the mobile target paths differ from the web ones documented in references/contracts.md:
| Level | Web target (_components/ valid) | Mobile target (this skill) |
|---|---|---|
| L0 (page-private) | app/<route>/_components/<Component>.tsx | components/<feature>/<Component>.tsx |
| L1 (route-group shared) | app/(group)/_components/<Component>.tsx | components/<feature>/<Component>.tsx (same physical folder as L0 — Expo has no route-group-scoped component folder; the 2nd use is a tolerated duplicate copy inside the second feature's folder) |
| L2 (globally shared) | components/shared/<dominio>/<Component>.tsx | components/shared/<dominio>/<Component>.tsx (same as web) |
Never app/<route>/_components/ on mobile. A previous revision of this skill pointed there by mistake (copied from the Next.js convention) — that guidance is corrected here.
Promotion via promote-component: when the same component pattern appears 3+ times (i.e., copies exist across 3+ components/<feature>/ folders), call the dedicated skill to lift to L2 with import rewriting.
components/shared/<dominio>/ for L2: domain-based naming only (no "shared", "common", "misc").
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
expo-router, nativewind, tanstack-query, screen-generation, react-native
Other plugins' skills for the same job
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).