Advanced React 19 useTransition/useOptimistic

VerifiedSafe

Post-Doc skill for the arbitragex-v2 monorepo, focusing on React 19 useTransition and useOptimistic for server action form state. Includes Playwright E2E testing and strict doctrinal rules.

Sby Skills Guide Bot
DevelopmentAdvanced
508/21/2026
Claude Code
#react-19#use-transition#use-optimistic#server-actions#nextjs

Recommended for

Our review

Post-Doc skill for integrating React 19 useTransition/useOptimistic into the Next.js frontend of the arbitragex-v2 monorepo, following a strict validation and evidence-driven doctrine.

Strengths

  • Complete validation pipeline: lint, typecheck, build, tests, audit, E2E, deploy.
  • Explicit fail-closed execution rules (abort on red CI, schema drift, plaintext secret, etc.).
  • Requires concrete evidence: logs, OTel traces, Playwright screenshots, commit hash.
  • Post-Doc level mandates reproducible benchmarks with 95% confidence intervals.

Limitations

  • Highly specific to the arbitragex-v2 monorepo, making it hard to reuse as-is elsewhere.
  • Focuses on process and doctrine rather than providing detailed code examples for useTransition/useOptimistic.
  • Requires a green CI environment and access to repo-specific tooling (Playwright, Vault/age) to be applicable.
When to use it

When you need to handle server actions form state in the arbitragex-v2 frontend, leveraging useTransition/useOptimistic while adhering to the project's Post-Doc doctrine.

When not to use it

For React/Next.js projects outside this monorepo, or when you need generic learning about React 19 hooks without the repo's strict validation constraints.

Security analysis

Safe
Quality score78/100

The skill contains commands for running tests, linting, typechecking, and build verification, but no destructive, exfiltrating, or obfuscated actions. It does not instruct curl|sh, rm -rf, token extraction, or disabling safety. The ABORT conditions are about halting on failures rather than performing risky operations.

No concerns found

Examples

Server actions form state
I'm working on server actions form state in the arbitragex-v2 repo. Apply G005 to implement useTransition/useOptimistic for the pending UI in frontend/app.
Optimistic update audit
arbitragex-v2 g005: audit the optimistic update flow in our Next.js frontend using React 19 useOptimistic, and produce evidence with Playwright E2E.
Post-Doc doctrine enforcement
Use advanced React 19 useTransition/useOptimistic in frontend/components, follow the Post-Doc doctrine, and validate against lint, typecheck, build, tests, audit, E2E, deploy.

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

  1. Cargar contexto del repo hefarica/arbitragex-v2 (rama actual, último PR, estado de CI).
  2. Identificar el subsistema impactado dentro de los archivos del repo listados arriba.
  3. Aplicar la doctrina del nivel Post-Doc sin desviaciones.
  4. Validar contra: lint → typecheck → build → tests → audit → E2E → deploy.
  5. 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 state
  • advanced react 19 usetransition/useoptimistic
  • arbitragex-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).

Related skills