ワンクリックで
nextjs-page-creator
Creates Next.js 16 App Router pages with loading and error states. Use when asked to create new routes, pages, or views.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Creates Next.js 16 App Router pages with loading and error states. Use when asked to create new routes, pages, or views.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Creates Next.js 16 API routes with auth, validation, and tenant scoping. Use when creating API endpoints.
Implements AI tools for Canvas generation and updates. Use when creating GenUI tools for code generation, document editing, or Canvas interactions.
Develops Canvas code execution features with Pyodide/iframe sandboxing. Use when working on Python/JS execution, package management, or sandbox security.
Creates and extends Canvas UI components with Monaco editor, split views, and educational context. Use when building Canvas panel, editor, or preview features.
Foundational Canvas type definitions and language support patterns. Use when working with Canvas types, schemas, or language configuration.
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks
| name | nextjs-page-creator |
| description | Creates Next.js 16 App Router pages with loading and error states. Use when asked to create new routes, pages, or views. |
| allowed-tools | Read, Write, Edit, Glob |
| context | fork |
Use this skill when the user asks to:
In Next.js 15+, params are promises and MUST be awaited:
// ✅ CORRECT - Await params
export default async function Page(props: { params: Promise<{ id: string }> }) {
const params = await props.params;
const { id } = params;
// ... use id
}
// ❌ WRONG - Will cause runtime errors
export default async function Page({ params }: { params: { id: string } }) {
const { id } = params; // ERROR: params is a Promise!
}
app/ directoryimport { Metadata } from 'next';
import { auth } from '@/lib/auth/config';
import { redirect } from 'next/navigation';
export const metadata: Metadata = {
title: 'Page Title | Elon AI',
description: 'Description',
};
interface PageProps {
params: Promise<{ id: string }>;
searchParams: Promise<{ [key: string]: string | undefined }>;
}
export default async function PageName(props: PageProps) {
const session = await auth();
if (!session?.user) redirect('/auth/login');
const params = await props.params;
const { id } = params;
// Fetch data with tenant scoping
const data = await getData(id, session.user.tenantId);
return (
<div className="container py-8">
{/* Page content */}
</div>
);
}
import { Skeleton } from '@/components/ui/skeleton';
export default function Loading() {
return (
<div className="container py-8 space-y-4">
<Skeleton className="h-8 w-64" />
<Skeleton className="h-64 w-full" />
</div>
);
}
'use client';
import { Button } from '@/components/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import Link from 'next/link';
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
return (
<div className="container py-8">
<Card className="max-w-md mx-auto">
<CardHeader>
<CardTitle className="text-destructive">Something went wrong</CardTitle>
</CardHeader>
<CardContent className="space-y-4">
<p className="text-muted-foreground">
We couldn't load this page. Please try again.
</p>
<div className="flex gap-2">
<Button onClick={reset}>Try Again</Button>
<Button variant="outline" asChild>
<Link href="/dashboard">Go to Dashboard</Link>
</Button>
</div>
</CardContent>
</Card>
</div>
);
}