nextjs-expert
Qué hace
Esta skill guía la creación de aplicaciones web con Next.js, incluidos App Router, componentes de servidor, obtención de datos, caché y despliegue. Está pensada para desarrolladores que crean sitios web y aplicaciones rápidos y fáciles de encontrar en buscadores.
Cuándo usarla
- ✓Cuando empiezas una aplicación nueva de Next.js o la pasas a App Router.
- ✓Cuando una página carga lentamente y quieres reducir el JavaScript del lado del cliente.
- ✓Cuando necesitas rutas de API o middleware en un proyecto de Next.js.
Link de la skill
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/nextjs-expert/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Configura una página de App Router de Next.js que cargue los datos de productos en el servidor y muestre un estado de carga mientras los obtiene.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill recomienda componentes de servidor por defecto, rutas basadas en carpetas, límites de carga y de error, y route handlers, con opciones de renderizado estático o bajo demanda.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Next.js Expert
A seasoned Next.js architect with deep expertise in the App Router paradigm, server-side rendering strategies, and production deployment patterns. This skill provides guidance on building performant, SEO-friendly web applications using Next.js 14+ conventions, including Server Components, Streaming, and the full spectrum of data fetching and caching mechanisms.
Key Principles
- Prefer Server Components by default; only add "use client" when the component requires browser APIs, event handlers, or React state
- Leverage the app/ directory structure where each folder segment maps to a URL route, using layout.tsx for shared UI and page.tsx for unique content
- Design data fetching at the server layer using async Server Components and fetch with Next.js caching semantics
- Use generateStaticParams for static pre-rendering of dynamic routes at build time, falling back to on-demand ISR for long-tail pages
- Keep client bundles small by pushing logic into Server Components and using dynamic imports for heavy client-only libraries
Techniques
- Structure routes with app/[segment]/page.tsx, using route groups (parentheses) to organize without affecting URL paths
- Implement loading.tsx and error.tsx boundaries at each route segment to provide instant loading states and graceful error recovery
- Use Route Handlers (app/api/.../route.ts) with exported GET, POST, PUT, DELETE functions for API endpoints
- Configure middleware in middleware.ts at the project root with a matcher config to intercept requests for auth, redirects, or header injection
- Optimize images with next/image (automatic srcSet, lazy loading, AVIF/WebP) and fonts with next/font (zero layout shift, self-hosted subsets)
- Enable ISR by returning revalidate values from fetch calls or using revalidatePath/revalidateTag for on-demand cache invalidation
- Set up next.config.js with redirects, rewrites, headers, and the experimental options appropriate to your deployment target
Common Patterns
- Parallel Routes: Use @named slots in layouts to render multiple page-level components simultaneously, enabling dashboards and split views
- Intercepting Routes: Place (..) convention routes to show modals on navigation while preserving the direct URL as a full page
- Server Actions: Define async functions with "use server" for form submissions and mutations without building separate API routes
- Streaming with Suspense: Wrap slow data-fetching components in Suspense boundaries to stream HTML progressively and improve TTFB
Pitfalls to Avoid
- Do not use useEffect for data fetching in Server Components; fetch directly in the component body or use server-side utilities
- Do not place "use client" at the layout level unless every child truly requires client interactivity, as this opts out the entire subtree from server rendering
- Do not confuse the Pages Router (pages/ directory) patterns with App Router conventions; they have different data fetching and routing models
- Do not skip setting proper cache headers and revalidation times, as stale data and unnecessary re-renders degrade both performance and user experience
Preguntas frecuentes
¿Qué es un componente de servidor?
Es un componente que se ejecuta en el servidor, así que puede obtener datos sin enviar código adicional al navegador.
¿Cuándo debo añadir use client?
Solo cuando un componente necesita funciones del navegador, manejadores de eventos o estado de React, como indica la skill.
¿Qué hacen loading.tsx y error.tsx?
Muestran un estado de carga mientras se carga una ruta y un mensaje amable si algo falla.
Detalles
Descripción original del autor
Next.js expert for App Router, SSR/SSG, API routes, middleware, and deployment
repo: RightNow-AI/openfang
Popularidad
- Estrellas en GitHub
- 18 mil
- Posición en el ranking
- #10692
- Licencia
- Apache-2.0
- Actualizada
- 2/7/2026
Comentarios
- …
Más skills de este repositorio
browser-automation
18 milEnseña a tu agente a controlar un navegador web con Playwright, usando selectores CSS para encontrar botones, formularios y enlaces.
clip-hand-skill
18 milAyuda a tu agente a crear clips de vídeo: descargar un vídeo, transcribir su voz, generar archivos de subtítulos y cortar fragmentos con ffmpeg.
collector-hand-skill
18 milAyuda a tu agente a reunir información pública sobre un tema o una empresa, extraer entidades clave, seguir los cambios y medir el sentimiento.
infisical-sync-skill
18 milAyuda a tu agente a leer y actualizar secretos en una bóveda de Infisical a través de su API, con pasos de inicio de sesión y gestión clara de errores.
Skills parecidas
angular-developer
280 milAyuda a tu agente con código de Angular y la estructura del proyecto. Útil para empezar proyectos, crear partes de código o mejorar el rendimiento y la accesibilidad.
frontend-a11y
280 milAyuda a tu agente a hacer que las interfaces web sean accesibles para todos. Asegura que sitios y apps funcionen bien con lectores de pantalla y navegación por teclado.
frontend-patterns
280 milHace que tu agente aplique patrones modernos en desarrollo frontend. Optimiza el rendimiento, gestiona el estado y sigue buenas prácticas en React y Next.js.