examples/new/.opencode/skills/frontend-components/SKILL.md
Frontend component architecture - atomic design, file splitting (~300 line target, hard max 400 lines), reusability principles, route-scoped components, and co-located partitions
npx skillsauth add aexol-studio/axolotl frontend-componentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
EmptyState, StatusBadge)SearchBar, ConfirmDialog)DataTable, Sidebar)routes/{route}/components/ — not in the atomic system regardless of size| Partition | File name |
| ------------------ | -------------------------------------------------------- |
| Logic hook | {Name}.hook.ts — exports ONE hook, returns flat object |
| Static/config data | {Name}.data.ts |
| Zod/RHF schemas | {Name}.schema.ts |
| TypeScript types | {Name}.types.ts |
| Sub-components | {name}/components/Child.tsx |
When a component has any co-located partition (hook, schema, data, types), it moves into a kebab-case folder with a barrel index.ts. The main .tsx lives inside the folder. Sub-components go in a components/ subfolder — never directly beside the parent.
routes/{group}/{route}/components/components/atoms|molecules|organisms/, add props, export from barrelindex.ts inside the parent's components/ dir.hook.ts exports a single hook consolidating all data fetching, mutations, state, and handlers for that viewexport default — always named exportsindex.tsconst Row = () => <li>...</li> or const TodoItem = ... inside a .tsx file alongside the exported component. There is NO exception to this rule, regardless of file size. "Inline them instead" means: delete the named component entirely and write its JSX directly inside the parent's render — no extraction to separate files, no private const, just flat JSX. If the JSX repetition is too large to inline (file would exceed 400 lines), ONLY THEN extract to a separate file in components/. Never create a named component in the same file as another exported component.<ChildA /><ChildB /> with no logic is forbidden. Merge its JSX into the real parent.@/ alias for imports — use @/components/..., @/hooks/... etc.; relative paths only for siblings in the same folderEmptyState.tsx, SearchBar.tsx, TopNav.tsx. Partitions use PascalCase prefix: AuthForm.hook.ts, AuthForm.schema.ts, AuthForm.data.tsLanding.page.tsx can have Landing.hook.ts, Landing.data.ts, Landing.schema.ts beside it in the same foldertools
Baseline architecture for Axolotl mobile starter (Expo Router + reusable blocks)
tools
Expo Router conventions for route groups, native headers, and starter navigation
development
i18n baseline and dev-translate setup for Expo mobile starter
development
Starter data layer pattern with React Query + Zeus for Expo app