Builds screens, dialogs and overlays to a contract (testIDs, copy keys, states in contracts/screens.json) and proves it. Use when building or changing a screen, dialog, testID or state.
Ships in react-native. 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.
Every screen of an Expo app, every dialog and every overlay is built from one repo-owned contract,
contracts/screens.json: where its route, model hook, view and test live, every state (the ones the
design does not draw too), and every element with its testID, role, component and copy keys. The code,
the view tests, the E2E flows and the screenshot checks all use exactly those ids, on iOS and Android.
Two zero-dependency scripts print a screen's contract and prove the built screens match it.
screen-unlisted, contract-invalid). A new screen, state or testID is a
contract change in its own reviewed change, then code. Why: ids, keys and states agreed in one
place are what E2E flows, screenshots and translators rely on; a route without an entry ships
unchecked.missing-testid, unknown-testid, testid-wrong-screen). Repeated items take a data key
(lists.list-row.${list.id}), never an index; parts extend their parent's id; a library component
derives its parts from the base id the screen passes. Why: flows and screenshot checks find
elements only by these ids, and an index id points at another item after a sort.t() with the contract's copy key, the key exists in the source catalog,
and a retired key is gone (missing-copy-key, unknown-copy-key, retired-copy-key). The model
hook translates; a view built to a screen contract never calls t() and never renders <T> (that
component is for text outside the screen pattern). Why: a wrong key shows the wrong words in every
language, and a literal is one language for everyone.drawn: false with its why: empty, error, offline, a paying user), and decide which state shows in a pure,
tested function. Why: a state without a layout is a blank screen in front of a person.route-model-hook,
model-hook-missing, model-hook-test). The route calls use<Feature>Model() and renders the
view; the hook alone reads stores, repositories, services and navigation. Why: the view is tested
with plain data, the hook with fakes, and the layout lives in one place.screen-test-missing,
testid-untested, state-untested, state-test-audit):
expect(findInaccessiblePressables(screen.container)).toStrictEqual([]). Why: each state is its own
screen for VoiceOver and TalkBack, and an untested state is the one that ships broken.overlay-not-modal, overlay-no-back): React Native's Modal (or the library Scrim) with a
real onRequestClose, or an Expo Router modal route. accessibilityViewIsModal alone is iOS only
(accessibility-as-code owns the Android hide). Why: otherwise a screen
reader wanders onto the screen behind, and a dialog that ignores back traps Android users.one-primary-action, ad-slot-not-allowed, from policies in the contract). Why: one
obvious "go", and ads never interrupt a task, a dialog or a purchase.nested-pressable)--all fails
screen-not-built until every contract screen exists; never a no-op handler or a provider only an
unbuilt screen needs. Why: both pass every test and fail on a device.node ${CLAUDE_SKILL_DIR}/scripts/check-screens.mjs .. NOT APPLICABLE means the app keeps no
screen contract yet; otherwise every FAIL line is work. Read
references/contract-format.md once per session.templates/contracts/screens.json and
screens.schema.json to contracts/, keep the policies the app wants (adSlot only with ads), and
describe each existing screen. For the screen at hand add or change its entry: route, model, view,
every state (Chosen ones with why), every element with testID, role, component and keys. Write
its spec beside the design, shaped like examples/lists-screen-spec.md
(a detail screen built from library components: examples/task-detail-entry.json).
A key the catalog lacks goes into the source catalog first, then every language
(i18n-strings-and-catalogs). Then print the contract you build to:
node ${CLAUDE_SKILL_DIR}/scripts/list-screen.mjs . --screen <id>.AppText and PressableSurface (design-system-structure), the render
helpers (unit-and-component-tests), test/a11y/find-inaccessible-pressables.ts
(accessibility-as-code), the catalogs and t() (i18n-strings-and-catalogs), the data layer the
model reads (persistence-and-migrations). Library components and their part lists come from
ui-component-library, ScreenFrame from react-components-and-hooks.renderHook, fakes, the app's I18nProvider), the state
function's test. Watch them fail.templates/ to the same paths what the screen needs: the Lists feature is the model to
follow (src/app/(app)/lists.tsx, src/features/lists/), src/ui/screen-body.tsx,
use-page-bottom-padding.ts and use-pair-layout.ts for bounded pages and side-by-side pairs, the
catalogs' keys. Rename lists to the feature and keep the structure.npm run typecheck, npx eslint . --max-warnings 0, and the screen's tests
(npx jest src/features/<feature> --ci --maxWorkers=2, paths before any --selectProjects).node ${CLAUDE_SKILL_DIR}/scripts/check-screens.mjs . --screen <id>; fix
every FAIL line (each names the file, the rule and the fix;
references/checks.md explains each rule) and rerun until RESULT: PASS. At
the end of screen work run it with --all.ScreenFrame with the edges for what sits around it (BELOW_HEADER_EDGES under
a Stack header; right and left only when the body scrolls on under the home indicator).findInaccessiblePressables audit.Modal (or a modal root) and close on Android back.npm run typecheck, npx eslint . --max-warnings 0 and the screen's Jest tests pass.SKIP src/i18n/catalogs/en.json [unknown-copy-key] not yet created (i18n-strings-and-catalogs creates it), and only before the app has catalogs.node ${CLAUDE_SKILL_DIR}/scripts/list-screen.mjs . --all prints RESULT: PASSnode ${CLAUDE_SKILL_DIR}/scripts/check-screens.mjs . --all prints RESULT: PASSlists.list-row.0, ${testID}.${index}). Use the item's id or key.accessible on a row that holds a button.
Maestro and VoiceOver never see inside it; keep the row plain and the controls siblings.includeHiddenElements; the
contract marks it crop-only (a11yHidden, coveredBy).src/ui; its look and derived ids live there once. The templates draw the dialog card and
buttons locally only because they must compile without the library; an app with it composes
Scrim, DialogCard and Button, so policies.primaryAction matches its real primary.router.push or t() inside a view. They belong in the model hook.accessibilityViewIsModal alone. TalkBack
reaches the list behind it; use Modal with onRequestClose.onRequestClose={() => {}}, or no onRequestClose. Android's back does nothing and the person
is trapped; point it at the cancel handler and test it through the Modal's requestClose event.if (isScreenshotRun)) in a view or a model. Open the state through the
owner's handler and freeze motion through useReduceMotion().| File | What it is | Read/run when |
|---|---|---|
| references/contract-format.md | The contract file: screens, presentations, code ownership, states, elements and testIDs, derived parts, screenshot reach, policies, ignored routes, changing it, multi-package | Workflow steps 1-2 |
| references/screen-building.md | The three files of a screen, the common frame on iOS and Android, screen rules, testIDs and copy in code, states, view and model-hook tests, RTL, dark, large text, screenshots, unbuilt screens, React Navigation appendix | Workflow step 5 |
| references/overlays-and-dialogs.md | Choosing a presentation, keeping VoiceOver and TalkBack inside, Android back and predictive back, who opens a dialog, the template dialog, tests | Building a dialog, overlay or sheet |
| references/checks.md | Every rule of both scripts with its reason and fix, what counts as a testID, the allowed SKIP and NOT APPLICABLE lines, the heuristics' known limits | When a FAIL line needs explaining |
| examples/lists-screen-spec.md | The written spec of one screen: requirements, blocks in order, states, model data, pitfalls | Workflow step 2, writing a spec |
| examples/task-detail-entry.json | A contract entry for a detail screen built from library components (derived parts, a paid-only element, Chosen states) | Workflow step 2 |
| examples/dialog-host.tsx | Shape: one dialog host above the navigator (a request union, useOpenDialog(), action-then-close) for apps with dialogs on several screens | When a second screen needs a dialog |
templates/contracts/screens.json | The contract template, filled for the demo app (Tasks, Lists, the delete-list dialog) | Workflow step 2; copy to contracts/ |
templates/contracts/screens.schema.json | Its JSON Schema | Workflow step 2; copy beside it |
templates/src/app/(app)/lists.tsx | A thin Expo Router route: model hook, header title, view | Workflow step 5 |
templates/src/features/lists/lists-screen.tsx | The pure view, one layout per state, renders the dialog while a delete is pending; its plain View root stands in for ScreenFrame only so it compiles without it (the header comment gives the frame and edges) | Workflow step 5 |
templates/src/features/lists/lists-screen.test.tsx | Its view test: a block per state, ids, handlers, audits | Workflow step 4 |
templates/src/features/lists/use-lists-model.ts | The model hook: data layer, copy, reduce motion, the delete dialog's state | Workflow step 5 |
templates/src/features/lists/use-lists-model.test.tsx | Its test: each state, retry, ask, confirm, cancel, a failed delete | Workflow step 4 |
templates/src/features/lists/lists-state.ts | Which state shows, a pure function of the repository's answer | Workflow step 5 |
templates/src/features/lists/lists-state.test.ts | Its test | Workflow step 4 |
templates/src/features/lists/components/list-summary-row.tsx | A row: the name and its delete button as siblings, data-keyed ids | Workflow step 5 |
templates/src/features/lists/components/lists-empty-body.tsx | The empty state (Chosen) in ScreenBody | Workflow step 5 |
templates/src/features/lists/components/lists-error-body.tsx | The error state (Chosen): message, spacer, one action at the bottom | Workflow step 5 |
templates/src/features/lists/delete-list-dialog/delete-list-dialog.tsx | A dialog in React Native's Modal: modal root, Android back, edge to edge; card and buttons drawn locally only so it compiles without ui-component-library (an app composes Scrim, DialogCard, Button) | Building a dialog |
templates/src/features/lists/delete-list-dialog/delete-list-dialog.test.tsx | Its view test, Android back through the Modal's requestClose included | Building a dialog |
templates/src/ui/screen-body.tsx | The bounded page body: one gap, under the home indicator, opening at an offset, top overhang. ui-component-library treats it as owned elsewhere by default | Workflow step 5 |
templates/src/ui/screen-body.test.tsx | Its test | With screen-body.tsx |
templates/src/ui/use-page-bottom-padding.ts | The bottom padding of a page that scrolls under the system bar | With screen-body.tsx |
templates/src/ui/use-page-bottom-padding.test.tsx | Its test | With the hook |
templates/src/ui/use-pair-layout.ts | Two blocks side by side that stack at large text | A screen with side-by-side pairs |
templates/src/ui/use-pair-layout.test.tsx | Its test | With the hook |
templates/src/i18n/catalogs/en.json | The Lists and dialog keys in the source language (merge into the app's catalog) | Workflow step 2 |
templates/src/i18n/catalogs/ar.json | The same keys in Arabic, the demo's RTL locale | Workflow step 2 |
scripts/check-screens.mjs | Checker: contract format, route coverage, exact testIDs (derived parts counted), copy keys, policies, view tests per state with audits, modal overlays that close on Android back, route to model hook wiring | Workflow steps 1 and 7 |
scripts/list-screen.mjs | Prints one screen's contract (ids, roles, components, keys with text, states, who sets each id, screenshot reach); --all validates the contract (exit 2 without one) | Workflow step 2 |
scripts/lib/screen-contract.mjs | Helper: loads and validates the contract, file ownership, derived parts, route files | Never by hand |
scripts/lib/screen-source.mjs | Helper: strings, patterns, t() keys, JSX uses and test blocks in TypeScript sources | Never by hand |
scripts/selftest.mjs | Proves both scripts pass the templates and fail every planted bug | After changing a script or template |
scripts/check-lib.mjs | Shared script library, synced (do not edit here) | Never by hand |
assets/shared.json | Declares the shared files this skill copies in | When adding a shared file |
tests/bases/app/ | The small Tasks app the templates are laid over in the self-test | When the self-test base changes |
tests/fixtures/ | Good, pass, planted-bad and error cases for both scripts (overlay format) | When adding a rule |
ui-component-library - the components screens are made of and the parts they derive.design-system-structure - tokens, AppText, PressableSurface, colours and dark mode.design-visual-parity - the measured screenshot comparison each finished screen goes through.navigation-and-routing - routes, groups, Back, deep links and placeholder routes.react-components-and-hooks - model hooks, effects, ScreenFrame and the window class.ui-states-and-feedback - the shared loading, empty, error and offline patterns.i18n-strings-and-catalogs, rtl-and-direction, accessibility-as-code - texts, mirroring, screen readers.unit-and-component-tests - the render helpers and test conventions; e2e-maestro - flows on the same ids.admob-ads-and-consent, in-app-purchases - the ad slots and paid states behind the policies.debug-menu-and-test-hooks - how a test build asks for a frame state.assets/shared.json (opens in a new tab)examples/dialog-host.tsx (opens in a new tab)examples/lists-screen-spec.md (opens in a new tab)examples/task-detail-entry.json (opens in a new tab)references/checks.md (opens in a new tab)references/contract-format.md (opens in a new tab)references/overlays-and-dialogs.md (opens in a new tab)references/screen-building.md (opens in a new tab)scripts/check-lib.mjs (opens in a new tab)scripts/check-screens.mjs (opens in a new tab)scripts/lib/screen-contract.mjs (opens in a new tab)scripts/lib/screen-source.mjs (opens in a new tab)scripts/list-screen.mjs (opens in a new tab)scripts/selftest.mjs (opens in a new tab)templates/contracts/screens.json (opens in a new tab)templates/contracts/screens.schema.json (opens in a new tab)templates/src/app/(app)/lists.tsx (opens in a new tab)templates/src/features/lists/components/list-summary-row.tsx (opens in a new tab)templates/src/features/lists/components/lists-empty-body.tsx (opens in a new tab)templates/src/features/lists/components/lists-error-body.tsx (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/react-native:screen-contractsfrom react-native
npx claudepluginhub zakariaf/reactnative-skills --plugin react-native73 skills in this plugin
/accessibility-as-codeEnforces a11y labels, 44pt targets, 200% text, VoiceOver, TalkBack. Use when adding a pressable, swipe or a11y label, text clips when large, contrast fails or Reduce Motion is missed. Not for RTL (rtl-and-direction)./adaptive-layoutLays screens out by window, not device: breakpoints, master-detail panes, readable widths, grids. Use when making screens responsive or for tablets, iPad, foldables, rotation, split screen, orientation lock. Not for tab bars (navigation-and-routing)./admob-ads-and-consentBuilds AdMob ads behind a port - banners, interstitials, rewarded, UMP consent then ATT, pacing, ADS_MODE test IDs. Use when touching ads, consent, ATT, ad IDs or rewarded perks. Not for purchases (in-app-purchases).Other plugins' skills for the same job