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 Admin Screen?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/buffape-ape-admin-screen)
---
name: ape-admin-screen
description: "Add an admin console screen or section: a view, its route and roles, the audit line, strings."
---
# Add an admin screen
The console is `apps/admin/src/main.tsx`: BuffCore's shell (`createAdmin`), plus the product's sections and screens beside it. In BuffCore's repository, the playground's `apps/playground/admin/src/NotesScreen.tsx` and its registration in `apps/playground/admin/src/main.tsx` are 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:** a component that takes props and renders UI (`NotesView`), with no data fetching inside. Use the shell's components, `Page`, `Panel`, `DataList`, `KV`, `Button`, `useConfirm`, `Banner`, `Loading`, `ErrorState` and `TextField` from `@buffcore/admin-shell` (a confirm dialog through `useConfirm`; `<TextField type="date" />` is the browser's day picker, its value a day such as `'2026-10-13'` to send as `z.iso.date()`; show a day with `formatDate`, the ape-add-translations skill), and token variables only; logical start and end, never left and right.
3. **Write the container** (`NotesScreen`): `const { api } = useAdmin()`, then `usePagedRoute(api, route, input)` from `@buffcore/admin-shell`, or `useRoute`/`useAction` from `@buffcore/sdk/react`. Call admin routes (`roles`), including to fill a picker: the console is signed in as an operator, who acts for no account on a member's route (the ape-add-route skill). Every write goes through a confirm dialog that says what changes, how to undo it, and that it's recorded.
Show people by name, never by ID, and the audit line when the answer says the read was audited (`audited`). BuffCore gives a product's module no name lookup, so a list shows no person, not an ID in place of one. To show whose rows they are, make the list a tab on that person's page (`people` below): the page names them, and the route takes an optional `accountId` in its query (in BuffCore, `apps/playground/admin/src/AccountNotesTab.tsx`). An operator's write route carries a `name` and an `action` mark (the ape-add-route skill).
4. **Register it** in `createAdmin({ sections })`: `{ key, path, label, icon, roles: route.roles, audit: true /* named sensitive read */, screen }`. `icon` (and `<Icon name>`) is an `IconName` from `@buffcore/admin-shell`, listed in `packages/admin-shell/src/components/icons.ts`: the console's own set, not the app's (`packages/ui/src/icons.ts`), which has icons the console lacks (such as `calendar`); a name outside the set fails typecheck, and the error lists the names. Out-of-role items show disabled with the reason. A section may name a group (`group`, a translation key): ungrouped sections show first; a group of your own comes before BuffCore's Members, Product and System, and naming one of theirs (`admin.rail.group.system`) puts the section at that group's end. To add to BuffCore's screens instead of a rail entry: `overview` takes panels for the Overview (`{ key, title, Panel }`), `inboxKinds` the panel on an item's page (`{ flag: { Panel } }`, or a kind your module opens with `openItem`; it gets the opened `item`, and acts through your routes with `useAction`, which re-reads it), `people` tabs on an account or a profile.
5. **Roles:** reuse a role when the same person does the job, declare a new one when another does (the ape-add-route skill). A role other than the Owner is declared where the app is composed, `buffcoreModules(product, { identity: { roles: ['support'] } })`, and named in the admin catalog as `admin.roles.<role>`.
6. **Strings:** every label through `t()`, keys in `apps/admin/src/i18n/en.ts` and each language's JSON beside it (`es.json`). `pnpm ape i18n check` fails while a key the console's code uses is missing in a language the product offers (the ape-add-translations skill).
7. **Test the view's states** (loading, empty, error, full) with Testing Library, on the view-test preset `viewTests()` from `@buffcore/ui/vitest` (`apps/admin/vitest.config.ts`; `apps/admin/src/views.test.tsx` is a first test), plus `en-XA` (no plain English; the test is in the ape-add-translations skill) and `ar-XB` (mirrored).