Skip to content
Back to skills

Nextjs Cinematic Build

ASecurity

Phase skill of portfolio-orchestrator. Scaffolds and wires the portfolio as a Next.js 15 App Router static export from proven templates - the procedural WebGL STRATA hero (Three.js and React Three Fiber, scroll-driven, tiered for mobile, with static and reduced-motion fallbacks), the optional video-scrub hero, core-sample strata from verified GitHub data, the real-portrait section, case-study pages with build-time diagrams and code, and the whole-site motion system. Use when the orchestrator ...

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 26, 2026
developmenttypescriptgoreactnextjsnodegitapidatabase

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add Divy547/portfolio-orchestrator --skill nextjs-cinematic-build --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nextjs Cinematic Build?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nextjs Cinematic Build
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/divy547-nextjs-cinematic-build/badge)](https://www.skillsdirectory.com/skills/divy547-nextjs-cinematic-build)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nextjs-cinematic-build
description: Phase skill of portfolio-orchestrator. Scaffolds and wires the portfolio as a Next.js 15 App Router static export from proven templates - the procedural WebGL STRATA hero (Three.js and React Three Fiber, scroll-driven, tiered for mobile, with static and reduced-motion fallbacks), the optional video-scrub hero, core-sample strata from verified GitHub data, the real-portrait section, case-study pages with build-time diagrams and code, and the whole-site motion system. Use when the orchestrator reaches build-scaffold, github-snapshot, hero-capture or build-wire, or when the user asks to change the portfolio's code, layout, hero or interactions.
---

# Next.js Cinematic Build

You are the engineer who comes in after the creative package and designs the whole page around it. The templates in `templates/` are proven code; copy them, then adapt the layout. Do not rewrite the engine from memory.

**Read first:** `references/procedural-scene.md` (the default hero: how it works, how to tune it, its limits), `references/scroll-engine.md` (the shared engine and the video hero) and `references/motion-and-proof.md` (the whole-site motion tiers, the role proof and the look previews). Copy rules live in `../qa-readiness/references/copy-rules.md`; design rules in `../creative-direction/references/design-direction.md`.

**Inputs:** `content/site.json`, `content/projects.json`, `.portfolio/asset-manifest.json`, `data/github.snapshot.json`, `.portfolio/design-package.md`.

## Architecture (fixed)

- Next.js 15 App Router, TypeScript strict, `output: 'export'`, `trailingSlash: true`, `images.unoptimized: true`. The result is `out/`, deployable to any static host by hand.
- No server features: no server actions, route handlers, middleware, ISR, or `next/image` optimisation. Contact is mailto, a form service endpoint (plain `<form action>`), or links.
- **The hero** is one of four modes, chosen by `heroMode` in the asset manifest: `procedural` (default; `ProceduralHero` plus the lazy `hero/HeroScene`), `video` (`ScrubHero`), `still`, `css`. All share the caption bands, the legibility layers and the static fallback.
- Client islands: `ProceduralHero` or `ScrubHero`, `CoreSample`, `MotionRuntime`, `DepthReadout`, and `EventPipeline` when the role proof is the event pipeline. Everything else is server-rendered HTML. The WebGL scene is a dynamic import (`next/dynamic`, `ssr: false`) requested after first paint, so it is not in the initial JS.
- Dependencies: Three.js and React Three Fiber (exact versions pinned in `templates/package.json`) are the only heavy ones. No GSAP, Lenis, framer-motion or Mermaid: they cost budget and smooth-scroll libraries fight the scroll lerp.
- Fonts via `next/font/google` (self-hosted at build; the first build needs network, or switch to `next/font/local`). Metadata API with `metadataBase` from `NEXT_PUBLIC_SITE_URL`; `sitemap.ts` and `robots.ts` are `force-static`; JSON-LD Person on the home page; Open Graph image = the hero ending frame. Images through `components/Picture.tsx`.

## build-scaffold

1. Copy everything in `templates/` into `$SITE` (keep paths; never overwrite `content/`, `data/` or `.portfolio/`). Include `.env.example`.
2. `npm install` (pins exact versions, writes the lockfile). In the background `npx playwright install chromium` (QA and `hero-capture` need a browser).
3. With no manifest yet the loaders fall back to `css` mode, so the app already builds. Run `npm run typecheck && npm run lint && npm run build` to prove the scaffold, then write the marker `.portfolio/scaffold.json` (`{ "template": "procedural-1", "at": "<ISO time>" }`) and `runstate.mjs done build-scaffold`. (The marker keeps later tuning of the source files from marking this step stale.)

## Motion tier and role proof (build-wire)

Read `motion.tier` and `proof` from `content/site.json` (the creative step set them from the user's answers). The templates already honour them: `html[data-motion]`, `motion.css`, `TraceMargins`, `EventPipeline`. In build-wire, check the proof section sits directly after the hero, the nav links to it, and the page under `matched` or `bold` still reads as one family with the hero. A proof other than `event-pipeline` needs a new component (see `references/motion-and-proof.md`). Never change a viewer-facing string in TSX: strings come from `site.json`.

## github-snapshot

`node scripts/snapshot-github.mjs` (reads users and repos from the intake). Unavailable repos (private or missing) are recorded as such: tell creative-direction to give that project a `selfReportedStack`. Never type a token for the user. Then `validate-contracts.mjs --stage github-snapshot` and `runstate.mjs done github-snapshot`.

## hero-capture (procedural provider only; zero credits)

`npm run capture-hero` (or `node scripts/capture-hero.mjs --points 0,1`). It installs `src/capture/page.tsx` as a temporary route, builds, serves `out/`, screenshots the frozen scene at scroll position 0 and 1 in headless Chrome (software WebGL is fine), writes `.portfolio/raw/hero-capture/poster-1920.png` and `ending-1920.png`, then removes the route, `out/` and `.next/` so nothing capture-related can ship. Takes a couple of minutes. If it fails, read its message (missing content, build error, no WebGL); fall back to `css` hero mode rather than blocking the run. The cinematic-assets skill then turns the PNGs into the poster and ending image sets. Mark done only when both PNGs exist.

## build-wire

1. Wire content: the home page and case-study template read the JSON directly. Every viewer-facing string comes from `content/*.json` verbatim; change a line in the JSON (and the package), never only in TSX.
2. Adapt the layout to the design package: section order, skeletons (no two neighbours alike), one living element per section (`data-live` plus an animation scoped to `.live`), the signature element prominent, the accent rare. New entrances go in `scrub.css` following the fixed rules (transform and opacity only, driven by `--k`, `var(--k, 1)` as the finished state).
3. Tune per band: `--sa` scrim alpha (inline style on the band, 0.62 to 0.72), `data-ramp`, `align` to keep the action lane clear. Tune the scene through `hero.scene` in `site.json`, not by editing shaders (shader edits are allowed when the look needs them; keep the budgets). Final values come from QA's flick test and worst-frame audit.
4. `npm run typecheck && npm run lint && npm run build`. All three pass with zero errors and zero warnings.
5. `validate-contracts.mjs --stage build-wire`, then `runstate.mjs done build-wire`.

**Only build-wire (and `capture-hero`, which cleans up after itself) runs `next build`.** QA tests the existing `out/`. A QA fix round = edit, `runstate.mjs invalidate build-wire`, rebuild, `done build-wire`, then QA reruns.

## Rules that are easy to break

- The scene lives only in `hero/HeroScene.tsx` and is only imported dynamically from `ProceduralHero`. A static import anywhere pulls three.js into the initial JS and fails the budget.
- Every effect that touches the scene or listeners cleans up (AbortController, `clearTimeout`, disposing geometry and materials): StrictMode runs effects twice in development.
- Gate strings: `src/lib/gates.ts` `HERO_GATES` and the five-query `@media` list in `scrub.css` stay identical (QA checks). The procedural gates are different on purpose (see `procedural-scene.md`).
- The decorative hero is `aria-hidden`; captions carry the meaning. The scene never receives focus.
- Strata render only from `strataFor()`. Never hardcode a percentage, star count or metric.
- The portrait component stacks two copies of the same files; never add a filter, overlay or crop that changes the photo itself.
- Never crop, blur or cover a watermark on any media. A clip with one is not a hero source.
- Never put a dynamic style on an element that also runs a `forwards` animation; never overwrite `el.style.transition`; masked text needs descender room; size text in `ch` on the text element itself.
- No em dashes in viewer-facing copy.
- Every moving rule is inside `@media (prefers-reduced-motion: no-preference)` and scoped to `html[data-motion]`; reduced motion shows the finished page.
- The role proof never calls a real server and always carries its simulation disclaimer.
- Font preloads compete with the render-blocking CSS under Lighthouse's slow-network simulation (mobile LCP went from about 2.6 s to 0.76 s with `preload: false` on the display and body faces; `display: swap` and next/font's size-adjusted fallback keep CLS at 0).

## When something breaks

`references/troubleshooting.md`.

Files in this skill

  • SKILL.md8.5 KB
  • references/motion-and-proof.md3.5 KB
  • references/procedural-scene.md5.9 KB
  • references/scroll-engine.md7.2 KB
  • references/troubleshooting.md6.5 KB
  • templates/.env.example452 B
  • templates/eslint.config.mjs462 B
  • templates/next.config.mjs422 B
  • templates/package.json1.1 KB
  • templates/scripts/capture-hero.mjs4.3 KB
  • templates/scripts/look-preview.mjs2.7 KB
  • templates/scripts/snapshot-github.mjs5.4 KB
  • templates/src/app/globals.css18.9 KB
  • templates/src/app/icon.svg405 B
  • templates/src/app/layout.tsx3.7 KB
  • templates/src/app/page.tsx6.1 KB
  • templates/src/app/robots.ts275 B
  • templates/src/app/sitemap.ts466 B
  • templates/src/app/work/[slug]/page.tsx5.5 KB
  • templates/src/capture/CaptureClient.tsx1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.