frontend-screen-builder
Build or update functional frontend pages and mobile screens that fit an existing application. Use when Codex needs to create dashboards, admin pages, customer pages, shop owner pages, rider screens,
SKILL.mdskills/frontend-screen-builder/SKILL.md
GitHubFrontend Screen Builder
Use this skill when a task requires building or changing an application screen, not just a visual mockup.
Core Rule
Inspect the existing frontend architecture, similar screens, routing, design system, state management, API usage, auth behavior, and test patterns before creating or modifying a screen.
Workflow
- Understand the screen requirement:
- screen name, user role, business purpose, main actions, data shown, data submitted, route or navigation entry, success behavior, error behavior, empty state, and permissions
- Inspect existing frontend structure:
pages,screens,routes,navigation,components,layouts,hooks,services,api,store,context,styles,theme,assets,types,utils, and tests
- Inspect similar screens:
- reports, dashboards, forms, detail pages, list pages, admin pages, mobile screens, or workflow screens with similar behavior
- Identify routing or navigation changes:
- web routes, layout wrapper, protected route guard, sidebar/menu entry, breadcrumbs, page title, URL/query params, mobile stack/tab/drawer registration, route params, and back behavior
- Follow existing design and styling conventions:
- component library, tokens, spacing, typography, button styles, form fields, cards, tables, badges, icons, modals, loading indicators, empty states, and breakpoints
- Define the layout before editing:
- header, filters, summary, table/list, form, detail section, actions, status badges, pagination, tabs, modal, footer actions, and state containers
- Define data requirements:
- API endpoint or local source, request params, response fields, loading behavior, error behavior, empty behavior, refresh behavior, cache behavior, pagination/filtering/sorting, and user context
- Use the existing API and state management pattern:
- fetch wrapper, Axios instance, React Query/SWR hook, Redux/Zustand action, context provider, generated client, or mobile service
- Implement required UI states:
- loading, success/data, empty, error, unauthorized, submitting, disabled, and retry states
- Implement forms and validation when applicable:
- required fields, defaults, input types, validation, submit behavior, duplicate submit prevention, API validation errors, success feedback, reset, and dirty-state handling
- Implement user actions:
- create, edit, delete, save, cancel, approve, reject, assign, filter, search, sort, export, refresh, retry, navigate, open/close modal
- Handle auth and permissions:
- frontend permission checks for user experience, backend permission checks for security, role-specific navigation, scoped data, and restricted actions
- Handle responsive and accessibility basics:
- small screens, tablet/desktop, table overflow, button wrapping, keyboard behavior, safe area, touch targets, labels, semantic controls, focus states, contrast, and accessible errors
- Add or update tests where practical.
- Update documentation when the screen adds a meaningful workflow.
- Run relevant checks discovered from project scripts or docs.
- Summarize the screen, route, data source, UI states, actions, permissions, files changed, checks, risks, and follow-up work.
Read references/screen-builder-checklist.md for screen planning questions, state checklists, test ideas, and the final report format.
Non-Negotiable Rules
- Do not create screens before inspecting existing frontend patterns.
- Do not introduce a new design style or UI library without a clear reason.
- Do not build static-only UI when the screen requires real data.
- Do not ignore loading, error, empty, unauthorized, or submitting states.
- Do not hardcode API URLs when the project uses API client utilities.
- Do not rely only on frontend permission checks for security.
- Do not expose sensitive data in the UI.
- Do not skip responsive behavior when the app supports multiple screen sizes.
- Do not duplicate components unnecessarily.
- Do not make unrelated refactors while building the screen.
- Do not claim the screen is complete if it is unconnected, untested, or intentionally UI-only without saying so.
Output Contract
When using this skill, provide:
- Screen created or updated.
- User role and use case.
- Route or navigation path.
- Existing patterns followed.
- Data source and API integration.
- UI states handled.
- User actions implemented.
- Auth, permission, responsive, and accessibility notes.
- Files changed.
- Tests/checks or manual verification.
- Risks and follow-up recommendations.