new-page
Scaffold a Next.js App Router page with optional server-side session check, metadata, and layout
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffold a Next.js App Router page with optional server-side session check, metadata, and layout
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate a semver-compliant release note from git history; on user confirmation, bump version, update CHANGELOG, create git tag, and publish a GitHub Release with gh
Scaffold a new backend server action with auth check, Zod input validation, repository call, and error handling
Scaffold a typed React client component with props interface, Tailwind styling, and shadcn/ui primitives
Scaffold a React Hook Form with Zod validation, useMutation, and toast notifications
Create a Zod input schema file in src/backend/services/inputs/ for a domain entity
Scaffold TanStack Query useQuery and/or useMutation hooks for a feature, calling a backend server action
| name | new-page |
| description | Scaffold a Next.js App Router page with optional server-side session check, metadata, and layout |
Create a new Next.js App Router page for techdiary.dev.
"use client" unless the page itself needs interactivity_components/ — keep the page file leangetSession() from src/backend/services/session.actions for auth checksredirect("/") from next/navigationgenerateMetadata for SEO when the page has dynamic contentparams: Promise<{ slug: string }> — always await them_components/ subdirectory next to page.tsxsrc/app/(dashboard-editor)/dashboard/src/app/(home)/ or src/app/[username]/import { Metadata } from "next";
export const metadata: Metadata = {
title: "<Page Title> | Techdiary",
description: "<description>",
};
export default async function <Name>Page() {
return (
<main>
{/* page content */}
</main>
);
}
import { redirect } from "next/navigation";
import { getSession } from "@/backend/services/session.actions";
export default async function <Name>Page() {
const { user } = await getSession();
if (!user) redirect("/");
return (
<main>
{/* page content */}
</main>
);
}
import { redirect } from "next/navigation";
interface Props {
params: Promise<{ slug: string }>;
}
export async function generateMetadata({ params }: Props) {
const { slug } = await params;
return { title: `${slug} | Techdiary` };
}
export default async function <Name>Page({ params }: Props) {
const { slug } = await params;
return (
<main>
{/* use slug */}
</main>
);
}
page.tsx and stub out any _components/ needed.