Communitygithub.com

Geruyang/agent-skills-library

Guía experta de Next.js App Router. Úsalo al construir, depurar o arquitectar aplicaciones Next.js: enrutamiento, Server Components, Server Actions, Cache Components, layouts, middleware/proxy, obtención de datos, estrategias de renderizado y despliegue en Vercel.

¿Qué es agent-skills-library?

Esta skill convierte a un agente de IA (como Claude Code, Cursor o Codex) en un experto de Next.js App Router, proporcionando directrices, patrones y referencias para construir, depurar y arquitectar aplicaciones Next.js modernas. Cubre todas las áreas clave: convenciones de archivos, límites de React Server Components, patrones asíncronos (Next.js 15+), selección de runtime (Node.js vs Edge), directivas de servidor/cliente, funciones del framework (hooks de navegación, cookies, metadatos), manejo de errores con archivos especiales (`error.tsx`, `not-found.tsx`), patrones de datos para evitar cascadas, optimización de imágenes con `next/image`, fuentes con `next/font`, manejo de scripts de terceros, herramientas de depuración avanzadas (MCP endpoint, reconstrucción parcial) y configuración de auto-hosting para Docker con ISR multi-instancia. La skill está estructurada como una colección de archivos de referencia (markdown) que el agente consulta según el contexto de la conversación. Soporta las últimas versiones de Next.js (v15, v16) y recomienda buenas prácticas como el uso de Node.js runtime por defecto, el manejo de `params` y `searchParams` asíncronos, y la prevención de errores comunes de hidratación. Es ideal para desarrolladores que quieran asistencia automatizada de alta calidad en sus flujos de trabajo con Next.js, asegurando que el código generado sea moderno, eficiente y siga las mejores prácticas del framework.

Compatible con~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Geruyang/agent-skills-library/tree/HEAD/original-skills/x-openai-nextjs-0babc94

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Mejores Prácticas de Next.js

Aplica estas reglas al escribir o revisar código Next.js.

Convenciones de Archivos

Consulta file-conventions.md para:

  • Estructura del proyecto y archivos especiales
  • Segmentos de ruta (dinámicos, catch-all, grupos)
  • Rutas paralelas e interceptantes
  • Renombramiento de middleware en v16 (middleware → proxy)

Límites de RSC

Detecta patrones inválidos de React Server Components.

Consulta rsc-boundaries.md para:

  • Detección de componentes cliente asíncronos (inválido)
  • Detección de props no serializables
  • Excepciones de Server Actions

Patrones Asíncronos

Cambios en la API asíncrona de Next.js 15+.

Consulta async-patterns.md para:

  • params y searchParams asíncronos
  • cookies() y headers() asíncronos
  • Codemod de migración

Selección de Runtime

Consulta runtime-selection.md para:

  • Usar Node.js runtime por defecto
  • Cuándo es apropiado Edge runtime

Directivas

Consulta directives.md para:

  • 'use client', 'use server' (React)
  • 'use cache' (Next.js)

Funciones

Consulta functions.md para:

  • Hooks de navegación: useRouter, usePathname, useSearchParams, useParams
  • Funciones de servidor: cookies, headers, draftMode, after
  • Funciones generadoras: generateStaticParams, generateMetadata

Manejo de Errores

Consulta error-handling.md para:

  • error.tsx, global-error.tsx, not-found.tsx
  • redirect, permanentRedirect, notFound
  • forbidden, unauthorized (errores de autenticación)
  • unstable_rethrow para bloques catch

Patrones de Datos

Consulta data-patterns.md para:

  • Server Components vs Server Actions vs Route Handlers
  • Evitar cascadas de datos (Promise.all, Suspense, preload)
  • Obtención de datos en componentes cliente

Route Handlers

Consulta route-handlers.md para:

  • Conceptos básicos de route.ts
  • Conflictos del handler GET con page.tsx
  • Comportamiento del entorno (sin React DOM)
  • Cuándo usar vs Server Actions

Metadatos e Imágenes OG

Consulta metadata.md para:

  • Metadatos estáticos y dinámicos
  • Función generateMetadata
  • Generación de imágenes OG con next/og
  • Convenciones de metadatos basadas en archivos

Optimización de Imágenes

Consulta image.md para:

  • Usar siempre next/image en lugar de <img>
  • Configuración de imágenes remotas
  • Atributo sizes responsive
  • Marcadores de posición blur
  • Carga prioritaria para LCP

Optimización de Fuentes

Consulta font.md para:

  • Configuración de next/font
  • Google Fonts, fuentes locales
  • Integración con Tailwind CSS
  • Precarga de subconjuntos

Empaquetado

Consulta bundling.md para:

  • Paquetes incompatibles con servidor
  • Importaciones CSS (no etiquetas link)
  • Polyfills (ya incluidos)
  • Problemas de ESM/CommonJS
  • Análisis de bundles

Scripts

Consulta scripts.md para:

  • next/script vs etiquetas script nativas
  • Scripts en línea requieren id
  • Estrategias de carga
  • Google Analytics con @next/third-parties

Errores de Hidratación

Consulta hydration-error.md para:

  • Causas comunes (APIs del navegador, fechas, HTML inválido)
  • Depuración con superposición de errores
  • Soluciones para cada causa

Límites de Suspense

Consulta suspense-boundaries.md para:

  • Bailout de CSR con useSearchParams y usePathname
  • Qué hooks requieren límites de Suspense

Rutas Paralelas e Interceptantes

Consulta parallel-routes.md para:

  • Patrones de modales con slots @ e interceptores (.)
  • default.tsx para fallbacks
  • Cerrar modales correctamente con router.back()

Auto-hosting

Consulta self-hosting.md para:

  • output: 'standalone' para Docker
  • Manejadores de caché para ISR multi-instancia
  • Qué funciona vs qué necesita configuración adicional

Trucos de Depuración

Consulta debug-tricks.md para:

  • Endpoint MCP para depuración asistida por IA
  • Reconstruir rutas específicas con --debug-build-paths

Individual skills in this repo

This repo contains 12 individual skills — each has its own dedicated page.

Geruyang/agent-skills-library

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

Geruyang/agent-skills-library

Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

Geruyang/agent-skills-library

Use for new frontend applications, dashboards, games, creative websites, hero sections, and visually driven UI from scratch, or when the user explicitly asks for a redesign/restyle/modernization. Builds from clean, airy, high-taste, readable image-generated concept design with section-specific references, faithful implementation, and browser testing.

Geruyang/agent-skills-library

Use when testing, debugging, or making targeted improvements to rendered frontend apps through the Build Web Apps or web dev plugin: local dev servers, UI regressions, interaction bugs, console errors, responsive layout, and visual QA. Check whether the Browser plugin is available and use it first when it is; otherwise use regular Playwright with the recorded reason.

Geruyang/agent-skills-library

Design UI surfaces for browser games. Use when the user asks for HUDs, menus, overlays, responsive layouts, or visual direction that must protect the playfield.

Geruyang/agent-skills-library

GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.

Geruyang/agent-skills-library

Guide for building, configuring, and deploying microfrontends on Vercel. Use this skill when the user mentions microfrontends, multi-zones, splitting an app across teams, independent deployments, cross-app routing, incremental migration, composing multiple frontends under one domain, microfrontends.json, @vercel/microfrontends, the microfrontends local proxy, or path-based routing between Vercel projects. Also use when the user asks about shared layouts across projects, navigation between microfrontends, fallback environments, asset prefixes, or feature flag controlled routing.

Geruyang/agent-skills-library

Use when sizing Public Equity Investing positions, finding equity hedges, or building an integrated position-and-hedge risk plan from a listed-equity thesis. Do not use for thesis construction, standalone event underwriting, trade execution, personal investment advice, or credit-instrument risk.

Geruyang/agent-skills-library

Integrate data visualizations into React and Next.js applications. Use when the user needs chart components, UML-like or architecture diagram components, React integration patterns, Next.js client or server boundaries, hydration-safe rendering, lazy loading, framework-aware performance, scroll-driven visual stories, or export guidance.

Geruyang/agent-skills-library

shadcn/ui expert guidance — CLI, component installation, composition patterns, custom registries, theming, Tailwind CSS integration, and high-quality interface design. Use when initializing shadcn, adding components, composing product UI, building custom registries, configuring themes, or troubleshooting component issues.

Geruyang/agent-skills-library

v0 by Vercel expert guidance. Use when discussing AI code generation, generating UI components from prompts, v0 CLI usage, v0 SDK/API integration, or integrating v0 into development workflows with GitHub and Vercel deployment.

Geruyang/agent-skills-library

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".

Skills relacionados