一键导入
create-nextjs-page
Create a new Next.js App Router page for the Mycosoft website. Use when adding a new page, route, or section to the website.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a new Next.js App Router page for the Mycosoft website. Use when adding a new page, route, or section to the website.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Deploy or restart the MINDEX API service on VM 192.168.0.189. Use when updating MINDEX, restarting the database API, or deploying MINDEX changes.
Execute non-trivial work using plan-first, verify-first, and lessons-fed defaults. Use when running 3+ step tasks, architectural work, or anything that may require re-planning.
Deploy the Mycosoft website to the Sandbox VM (192.168.0.187). Use when the user asks to deploy, push to sandbox, rebuild the website container, or update the live site.
Integrate neuromorphic UI into a page. Use when converting Shadcn pages to neuromorphic design or adding neuromorphic styling.
Deploy or restart the MAS orchestrator service on VM 192.168.0.188. Use when updating the Multi-Agent System, restarting the orchestrator, or deploying MAS changes.
Start the Mycosoft website dev server on port 3010. Use when the user wants to run the dev server, start development, or test the website locally.
| name | create-nextjs-page |
| description | Create a new Next.js App Router page for the Mycosoft website. Use when adding a new page, route, or section to the website. |
Page Creation Progress:
- [ ] Step 1: Create page file
- [ ] Step 2: Add metadata
- [ ] Step 3: Implement component
- [ ] Step 4: Add to navigation/sitemap if needed
Create app/your-page/page.tsx:
import { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Page Title | Mycosoft',
description: 'Description for SEO',
};
export default async function YourPage() {
// Fetch data server-side (React Server Component)
const data = await fetchData();
return (
<main className="container mx-auto px-4 py-8">
<h1 className="text-3xl font-bold mb-6">Page Title</h1>
{/* Page content */}
</main>
);
}
async function fetchData() {
try {
const res = await fetch(`${process.env.MAS_API_URL}/api/endpoint`, {
next: { revalidate: 60 }, // ISR: revalidate every 60s
});
if (!res.ok) return null;
return res.json();
} catch {
return null;
}
}
Create app/your-page/[id]/page.tsx:
interface PageProps {
params: Promise<{ id: string }>;
}
export default async function DetailPage({ params }: PageProps) {
const { id } = await params;
// Fetch by id
}
Create a server component page that renders a client component:
// app/your-page/page.tsx (Server Component)
import { YourClientComponent } from '@/components/your-client-component';
export default function YourPage() {
return (
<main className="container mx-auto px-4 py-8">
<YourClientComponent />
</main>
);
}
// components/your-client-component.tsx (Client Component)
'use client';
import { useState } from 'react';
export function YourClientComponent() {
const [state, setState] = useState(false);
return <div>Interactive content</div>;
}
Metadata export for SEO