Our review
Provides an advanced methodology for mastering useTransition and useOptimistic in React 19 with Next.js and Playwright in the ArbitrageX monorepo, including a strict doctrine and validated delivery.
Strengths
- Rigorous validation doctrine with clear checkpoints at every step
- Concrete focus on server actions and optimistic UI in React 19
- E2E integration via Playwright with assertions on DEGRADED/UP/DOWN states
- Research-oriented approach requiring reproducible benchmarks and comparison with the public state of the art
Limitations
- Heavily tied to a private monorepo and internal conventions
- Not a general-purpose React 19 tutorial
- Assumes a Next.js environment with Playwright already set up
When implementing or debugging a server-action-driven form that needs transitions and optimistic updates in a Next.js application.
For projects without server actions, without Next.js, or when the work is not about advanced React 19 usage.
Security analysis
SafeThe skill is a descriptive Markdown file that outlines a development workflow and doctrines for a Next.js/Playwright project. It does not contain harmful instructions, obfuscated payloads, or actions that could exfiltrate data or damage systems. The listed commands are standard dev tooling.
No concerns found
Examples
In hefarica/arbitragex-v2, we have a server action form state in frontend/app. Use useTransition and useOptimistic to update the list optimistically while the server action runs, then add Playwright E2E assertions for the optimistic state.Why does useTransition stay pending after a server action fails in our Next.js frontend? Trace the issue with React 19, apply the fail-closed doctrine, and add an E2E test for the error path using Playwright.Document a React 19 useOptimistic/useTransition benchmark with 95% CI and compare against TanStack Query optimistic updates for our Next.js app in the arbitragex-v2 monorepo, following the skill's post-doc doctrine.name: arbx-g-g005-advanced-react-19-usetransitionuseoptimistic description: "Post-Doc skill alineada al monorepo hefarica/arbitragex-v2 (Frontend Doctrinal (Next.js + Playwright)). Se activa cuando: server actions form state. Doctrina OMEGA Zero-Mocks · Fail-Closed · El Remoto Manda."
G005 — Advanced React 19 useTransition/useOptimistic
Dominio: Frontend Doctrinal (Next.js + Playwright) Nivel: Post-Doc Trigger: server actions form state Repos de referencia: vercel/next.js · facebook/react · microsoft/playwright · TanStack/query · shadcn-ui/ui · radix-ui/primitives · wevm/viem · wagmi-dev/wagmi Archivos del repo: frontend/app/* · frontend/components/* · frontend/tests/e2e/* · packages/schemas/*
Quick Start
ARBX_BUILD_FOR_LOCAL_E2E=1 ARBX_ASSUME_NO_RPC=1 pnpm playwright test --reporter=list,html
Core Workflow
- Cargar contexto del repo
hefarica/arbitragex-v2(rama actual, último PR, estado de CI). - Identificar el subsistema impactado dentro de los archivos del repo listados arriba.
- Aplicar la doctrina del nivel Post-Doc sin desviaciones.
- Validar contra:
lint → typecheck → build → tests → audit → E2E → deploy. - Reportar evidencia en formato Markdown forense (logs, traces, métricas, hash de commit).
Doctrina del Nivel
- Aporte de investigación: paper o RFC referenciado.
- Benchmarks reproducibles con criterio estadístico (95% CI).
- Comparativa contra estado del arte público.
Reglas de Ejecución
| Condición | Acción |
|-----------|--------|
| CI rojo en main | ABORT — fix-forward, nunca skip |
| Drift schema producer↔consumer | ABORT — restaurar isomorfismo Zod/struct |
| Cobertura E2E < contrato iter 18 | ABORT — añadir testid + assertion DEGRADED/UP/DOWN |
| Secret en plaintext fuera de Vault/age | ABORT — rotar y reportar |
| Profit neto ≤ gas + flashloan_fee | ABORT (skill C/E) |
| Slippage > banda RiskGate | RESIZE o ABORT (skill C/E) |
Activation Triggers (regex parciales)
server actions form stateadvanced react 19 usetransition/useoptimisticarbitragex-v2 g
Output Esperado
- Diff atómico (rustfmt aparte de semántica).
- Evidencia:
gh pr checks <N>,cargo nextest, traces OTel, screenshots Playwright. - ADR si la decisión cambia contrato (
docs/adr/NNNN-*.md).
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.