Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Ape App Screen?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/buffape-ape-app-screen)
---
name: ape-app-screen
description: "Add a screen to the Expo app: a view in src/screens, a route in src/app, @buffcore/ui components, strings, tests."
---
# Add an app screen
The app is `apps/app`: routes in `src/app` (Expo Router), views in `src/screens`, strings in `src/i18n`. In BuffCore's repository, the playground's `apps/playground/app` is the example.
1. **Approve the look first.** A new screen starts as a view in the prototype and is approved before it's built: follow the ape-prototype skill (scenes, `ape prototype snapshot`, commit the report, approval of that commit). Reference designs from elsewhere go in `prototype/reference/`.
2. **Write the view** in `src/screens/`: props in, UI out, no data fetching. Use `AppFrame`, `TopBar`, `Page`, `ActionBar`, `Button`, `TextField`, `OptionList`, `Banner` and `Text` from `@buffcore/ui` (`AppFrame` holds the `TopBar`, the `Page` and the `ActionBar`). One primary action, in the action bar. A tappable list row: `@buffcore/ui` has no list or card component, but `SettingRow` with `onPress` is one (a label, a line of help, an icon, a value at the end, a chevron; `first` on the first row), and `BigChoice` a large one (an icon, a title, a line). For a row that shows more (a title, a date and a lock), write a `Pressable` from `react-native` (a layout primitive `ape design check` allows) with `role="button"`, tokens for its styles and a touch target of at least 44 px (`theme.size['control-lg']`), as a part of the view or, when several screens need it, in `design/components/` (the `ape-design-system` skill). The app has no date input yet: to pick a day, offer the next days as an `OptionList` (each a date-only `YYYY-MM-DD` value, shown with `formatDate`; the days are the viewer's own, while moments are stored in UTC); a time of day is `TimeSelect`. Styles read the theme: `StyleSheet.create((theme: NativeTheme) => …)` from `react-native-unistyles`, or `useTheme()`; tokens only, start and end only. An icon's `name` is an `IconName` from `@buffcore/ui`, listed in `packages/ui/src/icons.ts` (the console has its own set); a name outside it fails typecheck. A size of the product's own multiplies by `useScale()` (or `theme.scale` in a stylesheet), and anything that moves asks `useReducedMotion()` first: `useScale` and `useReducedMotion` from `@buffcore/ui`.
3. **Write the route** in `src/app/<name>.tsx` (Expo Router): `const { api } = useShell()` (`useShell` from `@buffcore/app-shell`), then `useRoute`/`useAction` from `@buffcore/sdk/react`, and render the view. Errors show through `errorText(error, t)` from `@buffcore/app-shell`.
4. **Profile mode, if the product has `devices`.** On a shared device the shell may be in profile mode: `useShell().mode` is `'member'` or `'profile'`, `useProfile()` gives the profile picked (`id`, `displayName`, `locale`), and `useMe()` throws there, so a screen both can open branches on `mode` (in BuffCore's repository, the playground's `apps/playground/app/src/app/index.tsx` does). Every call then carries the device's grant, never a member's session, so a route the screen calls must name the device kinds, `actors: ['device', 'profile']` (the ape-add-route skill) and a members-only screen (account, privacy, devices) must not be offered to a profile. `useShell().switchProfile()` goes back to the picker, and every change of who is acting empties the query cache. Test the screen in both modes.
5. **Around the screen.** The shell shows the maintenance notice (when a call meets 503 `maintenance`), the paused-profile notice (`profile_paused`) and forgot password itself, so a screen shows none of them. Offer "Report a problem" from a screen with `useReportProblem()` from `@buffcore/app-shell` (Settings has it); with push on, give Settings `signOut={usePush().signOut}` (`usePush` from `@buffcore/app-shell/push`).
6. **Strings:** every word through `t()`, keys in `apps/app/src/i18n/en.ts` and each language's JSON beside it (`es.json`). `pnpm ape i18n check` fails while a key the app's code uses is missing in a language the product offers (the ape-add-translations skill). Dates and numbers through `Intl`.
7. **Test the view's states** with Testing Library, on the view-test preset `viewTests()` from `@buffcore/ui/vitest` (`apps/app/vitest.config.mts`; `apps/app/src/screens/HomeView.test.tsx` is one), and test it in `en-XA` (the ape-add-translations skill) and, if the product offers one, a right-to-left language. A route file in `src/app/` is wiring: it counts in the app's coverage, and the reference's `tasks.tsx` has no test of its own, so the floors are only what the views reach. To test one, put the test beside the routes in `src/` (never in `src/app/`: Expo Router makes every file there a route), importing the route by path, with `@buffcore/app-shell`, `@buffcore/sdk/react` and `expo-router` mocked.
8. **Run it:** `pnpm dev`, then the web app on the product's port; native needs a development build (`expo run:ios` / `expo run:android` or EAS).