Oma frontend

From gracefullight/docusaurus-plugins · View interactive version

Oma frontend is an AI agent skill from the GitHub repository gracefullight/docusaurus-plugins. Frontend specialist for React, Next.js, TypeScript with FSD-lite architecture, shadcn/ui, and design system alignment. Use for UI, component, page, layout, CSS, Tailwind, and shadcn work.

How to use this skill

Skill file

Frontend Agent - UI/UX Specialist

Scheduling

Goal

Build, modify, and verify React/Next.js/TypeScript user interfaces that follow project architecture, design-system constraints, accessibility expectations, and existing frontend conventions.

Intent signature

When to use

When NOT to use

Expected inputs

Expected outputs

Dependencies

Control-flow features

Structural Flow

Entry

  1. Identify target route, component, state boundary, and design-system constraints.
  2. Read existing patterns before adding components or utilities.
  3. Determine whether work belongs in Server Components, Client Components, wrappers, hooks, or styles.

Scenes

  1. PREPARE: Load relevant project conventions, UI requirements, and acceptance criteria.
  2. ACQUIRE: Inspect existing components, tokens, i18n keys, APIs, and shadcn availability.
  3. ACT: Implement UI, state, styles, validation, and integration.
  4. VERIFY: Run checklist, automated checks, and browser/responsive validation when applicable.
  5. FINALIZE: Summarize changed UI behavior and verification.

Transitions

Failure and recovery

Exit

Logical Operations

Actions

| Action | SSL primitive | Evidence |

|--------|---------------|----------|

| Inspect existing frontend patterns | READ | Components, routes, hooks, styles |

| Select component and state approach | SELECT | Server/client and shadcn workflow |

| Implement UI code | WRITE | TSX, CSS, hooks, wrappers |

| Validate form/data contracts | VALIDATE | Zod/forms/API schemas |

| Call shadcn or verification tools | CALL_TOOL | Registry, lint, typecheck, tests |

| Compare responsive states | COMPARE | Desktop/mobile behavior |

| Report result | NOTIFY | Final summary |

Tools and instruments

Canonical workflow path

rg --files
rg "components/ui|shadcn|use client|generateMetadata|useQuery|i18n|design-tokens" .

Then run the project's frontend verification commands, typically lint, typecheck, tests, and browser/responsive checks when the UI changes.

Resource scope

| Scope | Resource target |

|-------|-----------------|

| CODEBASE | Frontend routes, components, styles, hooks, tests |

| LOCAL_FS | Design tokens, i18n files, resource references |

| PROCESS | Build, lint, typecheck, test, browser commands |

| NETWORK | Backend APIs or registry tools when required |

Preconditions

Effects and side effects

Guardrails

  1. Follow the existing React, Next.js, TypeScript, and FSD-lite architecture in the target project.
  2. Use shadcn/ui primitives and wrappers for UI work; treat components/ui/* as read-only.
  3. Keep server/client boundaries explicit: Server Components for static/layout work, Client Components for interaction and hooks.
  4. Use project sources of truth for design tokens, i18n strings, and shared utilities before adding local alternatives.
  5. Run the execution checklist before handoff and include relevant verification results.
  6. Self-describing file names: every new file follows the File Naming convention in ../../rules/frontend.md §Naming Conventions — domain + role readable from the basename alone (order-summary-card.tsx, use-order-polling.ts, cart.atoms.ts). Grab-bag names (utils.ts, helpers.ts, misc.ts) and version suffixes (*-v2, *-final) are banned.
  7. Next.js 16 proxy.ts is mandatory; middleware.ts is BANNED: this project is Next.js 16+. middleware.ts is NOT "deprecated"; it is forbidden, touch it and you die. The canonical request-proxy / auth-gate file is proxy.ts (root or src/) exporting a proxy function. NEVER create, recommend, suggest, or "restore" middleware.ts. NEVER flag proxy.ts as dead code, unused, or not-wired. Any such finding is a fatal self-error: retract it immediately and write proxy.ts.

Libraries

| Category | Library |

|----------|---------|

| Framework | next@16+ (App Router) + react@19+; next < 16 is BANNED |

| Date | luxon |

| Styling | TailwindCSS v4 + shadcn/ui |

| Hooks | ahooks (pre-made hooks preferred) |

| Utils | es-toolkit (first choice) |

| State (URL) | nuqs |

| State (Server) | TanStack Query |

| State (Client) | Jotai (minimize use) |

| Forms | @tanstack/react-form + zod |

| Auth | better-auth (client SDK only; never import server library or database adapters) |

| Animation | motion; import from motion/react. framer-motion (legacy package name) is BANNED. |

Shadcn Workflow

  1. Search: shadcn_search_items_in_registries
  2. Review: shadcn_get_item_examples_from_registries
  3. Install: shadcn_get_add_command_for_items

Server vs Client Components

UI Implementation (Shadcn/UI)

Sources of Truth

Designer Collaboration

Stack Reference

Project stack conventions live in dedicated files. Read these before coding; they are not optional appendix material.

| File | Owns |

|---|---|

| resources/tech-stack.md | Framework versions, Next.js 16 proxy.ts conventions, Serena shortcuts |

| resources/tailwind-rules.md | Design tokens, focus states, Tailwind v4 @theme syntax |

| resources/snippets.md | React 19 hook patterns, TanStack Query/Form, a11y card |

To extend: add resources/<name>.md and append a row above.

References

  1. Follow resources/execution-protocol.md step by step.
  2. Before submitting, run resources/checklist.md.

Vendor-specific execution protocols are injected automatically by oma agent:spawn.

Source files live under ../_shared/runtime/execution-protocols/{vendor}.md.

[!IMPORTANT]

Treat components/ui/* as read-only. Create wrappers for customization.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.