Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

nextjs-renderingNext.js rendering 搜索

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

994

周安装

41

GitHub Stars

16

下载量

325
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:nextjs-rendering(Next.js rendering 搜索)
来源仓库:https://github.com/goncy/skills
仓库路径:skills/nextjs-rendering
安装命令:
npx skills add https://github.com/goncy/skills --skill nextjs-rendering
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/goncy/skills --skill nextjs-rendering

简介

用于理解和配置 Next.js 的渲染策略。

  • 涵盖 SSR、SSG、ISR 及客户端渲染的选择与使用场景。
  • 帮助平衡性能与实时性需求做出技术决策。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 不同策略对 SEO 与首屏速度影响差异显著,需按需选用。
  • nextjs-rendering 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Next.js Rendering

Expert guidance on Next.js rendering modes, streaming behavior, and static vs dynamic page generation.

Static vs Dynamic Rendering

Next.js has two fundamental rendering types: static and dynamic.

Static rendering:

  • Pages are built at build time and uploaded to a CDN
  • No compute occurs at request time
  • Assets are replicated to edge locations globally
  • Faster response times (no compute, cached near user)
  • Remains available even if origin region goes down

Dynamic rendering:

  • Pages are executed on-demand in a configured region
  • Involves compute at request time
  • Goes down if the region becomes unavailable
  • Required when content cannot be determined at build time

SSG (Static Site Generation) and ISR (Incremental Static Regeneration) are the same underlying mechanism — the only difference is whether all paths are generated upfront or incrementally on-demand.

Determining Render Mode: Async Dynamic APIs

Next.js determines whether a page is static or dynamic using async dynamic APIs. The framework performs a prospective render to detect what resolves synchronously vs asynchronously.

The microtask test:

  1. Next.js runs an initial "warmup render" to search for cached instances and fill caches
  2. A second render runs for just one tick, then aborts
  3. Anything that resolves within that microtask is considered "instant" and can be static
  4. Anything that cannot resolve in one tick is treated as dynamic

Special case for params: Routes using params can be static because each route is called once per item in generateStaticParams. Since the params are known at build time, they resolve instantly.

// Static: params from generateStaticParams resolve instantly
export async function generateStaticParams() {
  return [{ id: '1' }, { id: '2' }];
}

export default async function Page({ params }: { params: { id: string } }) {
  // params.id is instant - this page can be static
}

Streaming and Suspense Boundaries

Streaming is only enabled for dynamic rendering. Static content does not stream because no compute is involved — the complete HTML is served from the CDN.

Document-level Suspense requirement: To enable streaming with a loading skeleton, wrap the HTML document with an empty Suspense boundary. Without a document wrapper outside the boundary, there is nothing to stream — the framework needs the outer shell to send while inner content loads.

// Enable streaming with document shell
<Suspense fallback={null}>
  <html>
    <body>
      <Suspense fallback={<Skeleton />}>
        <SlowComponent />
      </Suspense>
    </body>
  </html>
</Suspense>

ISR and Suspense fallbacks: Suspense boundary fallbacks do not display when generating ISR paths. Since ISR generation happens at build time or on first request (static generation), there is no streaming — the complete page is generated before being served.

Cache Components (use cache)

Cache components can combine static and dynamic rendering within the same page, but the page itself still has a render mode.

Applying use cache to a page component: When use cache is added to a page or the main component of a page, the page produces static output that:

  • Will be cached (static)
  • Won't be streamed
  • Won't have "holes" (Suspense boundaries) in it

Cache components with dynamic pages: Even with use cache on individual components, the page overall is still either static or dynamic. Cache components allow granular control — static cached sections within dynamic pages, or dynamic sections within static pages.

// Page-level cache: produces static output
'use cache';
export default async function Page() {
  // Entire page is static, no streaming
}

// Component-level cache: can mix static/dynamic
export default async function Page() {
  return (
    <>
      <StaticCachedSection />  {/* has 'use cache' */}
      <DynamicSection />        {/* no cache directive */}
    </>
  );
}

Rendering Workflow

When working with Next.js rendering:

  1. Determine if the page can be static (all data available at build time)
  2. If static, decide between full SSG (all paths) or ISR (incremental)
  3. If dynamic is required, plan Suspense boundaries for streaming
  4. Add document-level Suspense wrapper if streaming with skeletons
  5. Use use cache granularly to cache expensive components within dynamic pages
  6. Remember: streaming only works for dynamic rendering, not static/ISR

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.27%
按下载量换算128

Claude

26.8%
按下载量换算87

Cursor

19.73%
按下载量换算64

Gemini CLI

8.57%
按下载量换算28

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/goncy/skills --skill nextjs-rendering 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills