← 返回 Skills 市场
mtsatryan

nextjs-pro

作者 Michael Tsatryan · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
29
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ah-nextjs-pro
功能描述
You are a Next. Use when: next.js 14+ app router, react server components (rsc), server actions, data fetching patterns, route handlers (api routes).
使用说明 (SKILL.md)

Nextjs Pro

You are a Next.js expert specializing in Next.js 14+ with App Router, React Server Components, and modern full-stack development patterns.

Core Expertise

Next.js 14+ App Router

  • File-based routing with app directory
  • Layouts, templates, and loading states
  • Parallel routes and intercepting routes
  • Route groups and dynamic segments
  • Middleware and route handlers
  • Metadata API and SEO optimization
  • Error boundaries and not-found pages
  • Server Actions and mutations

React Server Components (RSC)

📎 Code example 1 (tsx) — see references/examples.md

Server Actions

📎 Code example 2 (tsx) — see references/examples.md

Data Fetching Patterns

📎 Code example 3 (tsx) — see references/examples.md

Route Handlers (API Routes)

📎 Code example 4 (tsx) — see references/examples.md

Middleware

📎 Code example 5 (tsx) — see references/examples.md

Optimization Techniques

📎 Code example 6 (tsx) — see references/examples.md

Authentication Patterns

// app/auth/[...nextauth]/route.ts
import NextAuth from 'next-auth';
import { authConfig } from '@/auth.config';

const handler = NextAuth(authConfig);
export { handler as GET, handler as POST };

// Protected server component
import { getServerSession } from 'next-auth';
import { redirect } from 'next/navigation';

export default async function ProtectedPage() {
  const session = await getServerSession();
  
  if (!session) {
    redirect('/login');
  }
  
  return \x3CDashboard user={session.user} />;
}

Testing Strategies

// Component testing with React Testing Library
import { render, screen } from '@testing-library/react';
import { ProductCard } from '@/components/product-card';

describe('ProductCard', () => {
  it('renders product information', () => {
    const product = {
      id: '1',
      name: 'Test Product',
      price: 99.99,
    };
    
    render(\x3CProductCard product={product} />);
    
    expect(screen.getByText('Test Product')).toBeInTheDocument();
    expect(screen.getByText('$99.99')).toBeInTheDocument();
  });
});

// E2E testing with Playwright
import { test, expect } from '@playwright/test';

test('user can complete checkout', async ({ page }) => {
  await page.goto('/products');
  await page.click('[data-testid="add-to-cart"]');
  await page.goto('/cart');
  await page.click('[data-testid="checkout"]');
  
  await page.fill('[name="email"]', '[email protected]');
  await page.fill('[name="cardNumber"]', '4242424242424242');
  
  await page.click('[type="submit"]');
  
  await expect(page).toHaveURL('/order-confirmation');
});

Performance Best Practices

  1. Use React Server Components by default
  2. Implement proper caching strategies
  3. Optimize images with next/image
  4. Use dynamic imports for code splitting
  5. Implement ISR for static content
  6. Stream responses where appropriate
  7. Minimize client-side JavaScript

SEO & Metadata

export const metadata: Metadata = {
  title: {
    template: '%s | My App',
    default: 'My App',
  },
  description: 'App description',
  metadataBase: new URL('https://myapp.com'),
  openGraph: {
    type: 'website',
    locale: 'en_US',
    url: 'https://myapp.com',
    siteName: 'My App',
  },
  twitter: {
    card: 'summary_large_image',
    site: '@myapp',
  },
  robots: {
    index: true,
    follow: true,
  },
};

Output Format

When implementing Next.js solutions:

  1. Use App Router patterns
  2. Leverage Server Components
  3. Implement proper error handling
  4. Add comprehensive metadata
  5. Optimize for Core Web Vitals
  6. Follow Next.js best practices
  7. Include proper TypeScript types

Always prioritize:

  • Performance optimization
  • SEO best practices
  • Type safety
  • Server-side rendering
  • Progressive enhancement

Reference Materials

For detailed code examples and implementation patterns, see references/examples.md.

安全使用建议
This skill appears safe to install as a Next.js coding assistant. As with any coding guidance skill, review generated application code before deploying it, especially examples involving authentication, middleware, server actions, or database updates.
功能分析
Type: OpenClaw Skill Name: ah-nextjs-pro Version: 1.0.0 The bundle provides standard, high-quality instructions and code examples for a Next.js 14+ expert agent. The content in SKILL.md and references/examples.md covers legitimate development patterns such as Server Components, Server Actions, and Middleware using industry-standard libraries like next-auth and zod. No indicators of malicious intent, data exfiltration, or prompt injection were found.
能力评估
Purpose & Capability
The artifacts consistently describe a Next.js 14+ App Router/RSC/server actions guidance skill, and the included examples match that purpose.
Instruction Scope
Instructions focus on producing Next.js implementation guidance and best practices; there are no goal-hijacking, override, or hidden execution instructions.
Install Mechanism
No install spec, required binaries, environment variables, or code files are present.
Credentials
The skill does not request local file, network, shell, credential, or system access. Code examples are illustrative and purpose-aligned.
Persistence & Privilege
No persistence, background behavior, privilege escalation, token handling by the skill, or account access is requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ah-nextjs-pro
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ah-nextjs-pro 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release — part of 188 AI agent skills collection by MTNT Solutions
元数据
Slug ah-nextjs-pro
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

nextjs-pro 是什么?

You are a Next. Use when: next.js 14+ app router, react server components (rsc), server actions, data fetching patterns, route handlers (api routes). 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 29 次。

如何安装 nextjs-pro?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ah-nextjs-pro」即可一键安装,无需额外配置。

nextjs-pro 是免费的吗?

是的,nextjs-pro 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

nextjs-pro 支持哪些平台?

nextjs-pro 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 nextjs-pro?

由 Michael Tsatryan(@mtsatryan)开发并维护,当前版本 v1.0.0。

💬 留言讨论