nextjs-expert
O que ela faz
Esta skill orienta a criação de apps web com Next.js, incluindo o App Router, componentes de servidor, busca de dados, cache e implantação. É para desenvolvedores que criam sites e apps web rápidos e amigáveis para buscadores.
Quando usar
- ✓Quando você está começando um novo app Next.js ou migrando um para o App Router.
- ✓Quando uma página carrega devagar e você quer reduzir o JavaScript do lado do cliente.
- ✓Quando você precisa de rotas de API ou de middleware em um projeto Next.js.
Link da skill
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/nextjs-expert/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Configure uma página do App Router do Next.js que carregue os dados do produto no servidor e mostre um estado de carregamento enquanto busca.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill recomenda componentes de servidor como padrão, rotas baseadas em pastas, limites de carregamento e de erro, e route handlers, com opções de renderização estática ou sob demanda.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
O que é um componente de servidor?
É um componente que roda no servidor, então pode buscar dados sem enviar código extra para o navegador.
Quando devo adicionar use client?
Somente quando um componente precisa de recursos do navegador, manipuladores de eventos ou estado do React, como a skill orienta.
Para que servem loading.tsx e error.tsx?
Eles mostram um estado de carregamento enquanto uma rota carrega e uma mensagem amigável se algo falhar.
Detalhes
Descrição original do autor
Next.js expert for App Router, SSR/SSG, API routes, middleware, and deployment
repo: RightNow-AI/openfang
Popularidade
- Estrelas no GitHub
- 18 mil
- Posição no ranking
- #10692
- Licença
- Apache-2.0
- Atualizada em
- 02/07/2026
Comentários
- …
Mais skills deste repositório
browser-automation
18 milEnsina seu agente a controlar um navegador web com Playwright, usando seletores CSS para encontrar botões, formulários e links.
clip-hand-skill
18 milAjuda seu agente a fazer cortes de vídeo: baixar um vídeo, transcrever a fala, criar arquivos de legenda e cortar trechos com o ffmpeg.
collector-hand-skill
18 milAjuda seu agente a reunir informações públicas sobre um tema ou empresa, extrair entidades principais, acompanhar mudanças e avaliar o sentimento.
infisical-sync-skill
18 milAjuda seu agente a ler e atualizar segredos em um cofre do Infisical pela API, com passos de login e tratamento claro de erros.
Skills parecidas
angular-developer
280 milAjuda seu agente a criar código Angular e a dar conselhos sobre a estrutura do projeto. É útil para iniciar novos projetos, criar partes do código ou melhorar a performance e acessibilidade.
frontend-a11y
280 milAjuda seu agente a tornar interfaces web acessíveis para todos. Ele garante que sites e apps funcionem bem com leitores de tela e navegação por teclado.
frontend-patterns
280 milFaz seu agente aplicar padrões modernos no desenvolvimento frontend. Ele otimiza performance, gerencia estado e segue boas práticas em React e Next.js.