skills/FORGE-nextjs-mastery/SKILL.md
Next.js App Router engineering — server components, streaming, and edge patterns.
npx skillsauth add ariffazil/openclaw-workspace FORGE-nextjs-masteryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
DITEMPA BUKAN DIBERI — Forged, Not Given.
Build and maintain Next.js SPA surfaces with App Router discipline: server components first, ISR for content, API routes for organ bridges, strict client/server boundary.
/api/observatory/v1/*)react-spa-discipline| Floor | Application |
|-------|-------------|
| F1 AMANAH | Keep page/route changes reversible; git stash before layout refactors |
| F2 TRUTH | generateStaticParams must match actual data; never fake revalidate values |
| F4 CLARITY | One data-fetching pattern per route group; no mixing server/client fetch |
| F7 HUMILITY | Default to loading.tsx + error.tsx on every route segment |
| F11 AUDIT | API routes log request origin; ISR revalidation events write to VAULT999 |
| F13 SOVEREIGN | Public-facing routes reviewed by Arif before deploy |
# Create a new route segment under app router
# /root/AAA/src/app/<segment>/page.tsx (server component by default)
# /root/AAA/src/app/<segment>/loading.tsx
# /root/AAA/src/app/<segment>/error.tsx
# ISR pattern — revalidate every 60s, on-demand revalidation endpoint
export const revalidate = 60;
// POST /api/revalidate?secret=<token>&path=<path>
# API route pattern — proxy to organ
export async function GET(req: NextRequest) {
const res = await fetch(`http://localhost:8088/mcp`, { ... });
return NextResponse.json(await res.json());
}
# Server component fetch — direct, no hooks
async function Page() {
const data = await fetch('http://localhost:8088/health').then(r => r.json());
return <pre>{JSON.stringify(data, null, 2)}</pre>;
}
useEffect for API calls that belong in generateStaticParams or RSCtesting
OpenClaw edge agent bridge — operational triage, doctor, restart, and A2A bridge routing for the federation edge (Telegram surface). USE WHEN: "openclaw unhealthy", "gateway down", "edge bot not responding", "a2a bridge disconnected", "watchdog tripped", "openclaw doctor", "openclaw restart". NOT for token/security audit — use FORGE-telegram-audit.
tools
Generate images, videos, TTS, voice clone, and music via MiniMax MCP server. Use when user asks to "draw", "generate image", "create picture", "make a photo", "text to image", "image generation".
testing
Single load-bearing constitutional-judgment skill. Routes all F1–F13, verdict, hold, seal, scope, authority and floor-check calls through the live arif_judge surface. Replaces 7 overlapping predecessors (arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge, arifos-constitutional-judge).
development
MANDATORY LSP grounding gate BEFORE any code mutation on .ts, .py, .js, .tsx, .jsx files. Forces the agent to read real-time compiler diagnostics and structural project context before editing — eliminating blind guesses and anchoring every mutation in F2 (TRUTH). Routes through arifOS kernel (:8088) for centralized gate logic.