Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

next16-expert下一位 16 位专家

Agent Skill

next16-expert 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

722

周安装

31

GitHub Stars

9

下载量

253
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:next16-expert(下一位 16 位专家)
来源仓库:https://github.com/yuniorglez/gemini-elite-core
仓库路径:skills/next16-expert
安装命令:
npx skills add https://github.com/yuniorglez/gemini-elite-core --skill next16-expert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/yuniorglez/gemini-elite-core --skill next16-expert

简介

该技能用于模拟 Next.js 专家级开发者的思维模式与问题解决路径。

  • 适用于复杂架构设计、性能瓶颈分析与高阶 API 使用指导场景。
  • 提供深层原理讲解、源码解读与实验性特性探索建议。
  • 输出为推理过程而非确定答案,需结合实际情况二次验证。
  • 涉及内部实现时应谨慎对待,避免在生产环境依赖不稳定机制。

SKILL.md

⚡ Skill: next16-expert

Description

Senior specialist in the Next.js 16.1.1 and React 19.2 ecosystem. This skill focuses on the high-performance Proxy & Cache paradigm, Partial Pre-rendering (PPR), and the mandatory transition from middleware.ts to proxy.ts. It provides production-ready patterns for modern full-stack development.

Table of Contents

  1. Quick Start
  2. The Proxy Revolution (proxy.ts)
  3. Unified Caching (use cache)
  4. React 19.2 Patterns
  5. Data Fetching & Mutations
  6. Component Design & Single Responsibility
  7. The 'Do Not' List (Anti-Patterns)
  8. Advanced References

Quick Start

Initialize an Elite-grade project:

npx create-next-app@latest my-elite-app \
  --typescript \
  --tailwind \
  --eslint \
  --app \
  --src-dir \
  --import-alias "@/*"

Elite Configuration (next.config.ts):

import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  experimental: {
    ppr: true, // Enable Partial Pre-rendering
    dynamicIO: true, // New IO optimization for Next.js 16
    reactCompiler: true, // Stable React Compiler support
  },
  logging: {
    fetches: {
      fullUrl: true,
    },
  },
};

export default nextConfig;

The Proxy Revolution (proxy.ts)

In Next.js 16, middleware.ts is legacy. All global network logic must reside in proxy.ts. This stabilizes the runtime and provides a clean gate for all requests.

Standard Elite Proxy (src/app/proxy.ts):

import { nextProxy } from 'next/server';

export default nextProxy(async (request) => {
  const url = request.nextUrl;

  // Global Routing Logic
  if (url.pathname.startsWith('/api/v1')) {
    // Standardize API versioning at the proxy level
  }

  // Security Headers & Request Decoration
  request.headers.set('X-Elite-Engine', '16.1.1');

  const response = await fetch(request);

  // Performance Monitoring
  response.headers.set('Server-Timing', 'elite;dur=20');

  return response;
});

*For deep-dives into A/B testing and advanced security, see proxy-deep-dive.md.*


Unified Caching (use cache)

Next.js 16 introduces the use cache directive, replacing the complexity of revalidatePath with explicit, function-level caching.

Cached Data Service (src/services/data.ts):

import { cacheLife, cacheTag } from 'next/cache';

export async function getGlobalMetrics() {
  'use cache';
  cacheLife(60); // Cache for 60 seconds
  cacheTag('metrics');

  const data = await fetch('https://api.internal/metrics').then(r => r.json());
  return data;
}

Invalidation Patterns:

  • revalidateTag('metrics'): Immediate purge.
  • updateTag('metrics'): Recommended. Marks as stale and revalidates in background (SWR).

*For complex caching strategies, see unified-caching.md.*


React 19.2 Patterns

Leverage the stability of React 19.2 within Next.js 16 to eliminate boilerplate.

1. useActionState for Forms

Eliminate manual loading and error states in Client Components.

'use client';
import { useActionState } from 'react';
import { signUpAction } from '@/actions/auth';

export function SignUpForm() {
  const [state, action, isPending] = useActionState(signUpAction, null);

  return (
    <form action={action}>
      <input name="email" type="email" required />
      {state?.errors?.email && <p className="text-red-500">{state.errors.email}</p>}

      <button disabled={isPending}>
        {isPending ? 'Processing...' : 'Sign Up'}
      </button>
    </form>
  );
}

2. The <Activity /> Component

Use for pre-rendering background tabs or hidden UI without performance cost.

import { Activity } from 'react';

export function TabSystem({ activeTab }) {
  return (
    <>
      <Activity mode={activeTab === 'home' ? 'visible' : 'hidden'}>
        <HomeTab />
      </Activity>
      <Activity mode={activeTab === 'settings' ? 'visible' : 'hidden'}>
        <SettingsTab />
      </Activity>
    </>
  );
}

Data Fetching & Mutations

Server-First Approach (RSC)

80% of your data should be fetched in Server Components.

// app/dashboard/page.tsx
import { getGlobalMetrics } from '@/services/data';

export default async function Page() {
  const metrics = await getGlobalMetrics(); // Direct, cached call

  return (
    <div>
      <h1>Dashboard</h1>
      <pre>{JSON.stringify(metrics, null, 2)}</pre>
    </div>
  );
}

Server Actions (Mutations)

Mandatory for all POST/PATCH/DELETE operations.

// actions/auth.ts
'use server';
import { updateTag } from 'next/cache';

export async function signUpAction(prevState: any, formData: FormData) {
  const email = formData.get('email');

  try {
    await db.user.create({ data: { email } });
    updateTag('users'); // Background revalidation
    return { success: true };
  } catch (e) {
    return { errors: { email: 'Invalid email' } };
  }
}

Component Design & Single Responsibility

  • 300-Line Rule: Keep component files under 300 lines. If a component exceeds this, extract sub-components or move logic to hooks/ or services/.
  • Hydration Guard: Always protect components that depend on browser-only state.
'use client';
import { useState, useEffect } from 'react';

export function SafeClientComponent({ children }) {
  const [mounted, setMounted] = useState(false);
  useEffect(() => setMounted(true), []);

  if (!mounted) return <div className="animate-pulse" />; // Placeholder
  return <>{children}</>;
}

The 'Do Not' List (Anti-Patterns)

  • DO NOT use middleware.ts: Use proxy.ts. middleware.ts is considered legacy and less performant in Next.js 16.
  • DO NOT use revalidatePath for simple UI updates: Use updateTag within Server Actions for a better UX (Stale-While-Revalidate).
  • DO NOT access cookies in RSC without Suspense: Accessing cookies() or headers() makes a route dynamic. Wrap the dependent component in <Suspense> to keep the rest of the page static (PPR).
  • DO NOT use Barrel Files (index.ts) for components: This kills tree-shaking and bloats the bundle. Import directly from the component file.
  • DO NOT hardcode API URLs: Use environment variables and the proxy.ts layer to manage environments.

Advanced References


*Optimized for Next.js 16.1.1 and React 19.2. Updated: January 22, 2026 - 14:36*

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.29%
按下载量换算94

Claude

27.5%
按下载量换算70

Cursor

19.08%
按下载量换算48

Gemini CLI

8.46%
按下载量换算21

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills