Rn screen

From ksmaster03/claude-canfly-skill · View interactive version

Rn screen is an AI agent skill from the GitHub repository ksmaster03/claude-canfly-skill. Scaffold a new React Native screen following the conventions already in the app (navigation registration, screen structure, shared components, types, i18n) instead of inventing a new structure. Trigger when the user types /rn-screen or asks to "add a screen / สร้างหน้าจอ / new RN screen / เพิ่มหน้า

How to use this skill

Skill file

/rn-screen — add an RN screen the way this app already does it

The fastest way to a screen that doesn't look bolted on: read two existing screens first, then copy their shape exactly. This skill enforces that order.

Input

Screen name + purpose. Optionally: route params, data source (API hook), whether it's in a tab or stack.

Discover conventions BEFORE writing

Open 1–2 existing screens in the target app and copy their shape:

  1. Navigation: how screens register (stack/tab navigator file), route name constants, param typing (RootStackParamList or similar).
  2. Screen file layout: folder per screen vs flat, styles location, component split.
  3. Data: how screens fetch (hooks/services), loading & error states.
  4. Shared UI: reuse existing components (buttons, headers, list rows) — don't rebuild them.
  5. i18n: how strings are referenced (then add keys via /i18n-sync).

Procedure

  1. Create the screen file(s) in the same place/shape as siblings.
  2. Type the route + params in the navigator's param list.
  3. Register the screen in the navigator.
  4. Wire data the same way existing screens do; include loading/empty/error states.
  5. Reuse shared components and the app's theme/spacing tokens.
  6. Add user-facing strings as i18n keys (EN + TH) via /i18n-sync.
  7. Typecheck (npx tsc --noEmit).

Gotchas

Done = screen renders + navigable + typed + i18n keys added + reuses existing components. Report files created + tsc result.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.