heymegabyte/agent-skills / 16-cinematic-website-prime-directive
cinematic-website-prime-directive
VerifiedOne-line-prompt → cinematic, gorgeous, functional, well-tested, deployed website. Pre-hydrated SPA + full PWA kit + JSON-LD rich snippets + third-party integrations. React 19+Vite default (Angular optional). 100 concrete improvements grouped into 10 categories that EVERY single-prompt site build must satisfy before being marked done. Trigger whenever the user says 'make a website for X', 'build a site for X', 'rebuild X.com', or any equivalent one-liner.
Cinematic Website Prime Directive
One-line prompt → satisfy all 100 build-breaking rules across 10 categories before DONE.
Start here:
website-build-manifestis the cross-linked acceptance index for the whole one-prompt build (phase order, per-page/per-site gates, architecture, quality bar,EMDASH_*config). Load it first, then this skill's 100 rules + the detail rules it links.
1. Cinematic Visual Doctrine (1-10)
- Dark-first (
#060610base) + bold accent (#00E5FF/#7C3AED/#50AAE3) — never neutral grey - Fluid
clamp()type — body 16-19px, display 64-128px, ratio 1.25-1.333 - Sora + Space Grotesk + JetBrains Mono (variable woff2 subsets preloaded)
- Layered surfaces: opaque base + semi-transparent panels + glassmorph cards via
backdrop-filter - OKLCH palette w/
color-mix(in oklch, ...)derived shades — no static rgb tints text-wrap: balanceheadings,text-wrap: prettybody — no orphans- One signature moment per page — motion (scroll-driven parallax, view-transition swap, popover anchor), a bespoke composition, or a typographic hero. Medium follows concept; "cinematic" is not one visual recipe. The canvas nebula (#114) is a reference impl, never a mandate. See
reference/aesthetic-quality-lexicon.md. - Hero MUST use AI-generated brand-aligned image, never stock placeholder
- Asymmetric hero grids, never centered-stack default
- Every section pair has visual rhythm: dense → breath → dense
2. Pre-Hydrated SPA + Routing (11-20)
- React 19 + Vite + Tailwind v4 + TanStack Router (default)
- Astro 5 + React islands for marketing-static-heavy
- Next.js 15 App Router only when SSR/ISR adds real value
- Angular 22 + Ionic + Spartan UI only when user says "Angular" or signal-heavy enterprise
- View Transitions API (
@view-transition { navigation: auto; }) for SPA page swaps - Selective hydration per island (Astro) or RSC boundaries (Next)
- Prefetch on link hover via TanStack Router or Astro
prefetch="hover" - Speculation Rules
<script type="speculationrules">prerendereagerness:"moderate" - Route code-split via
React.lazy+ VitemanualChunks— no single chunk >250KB gz - Static HTML shell prerendered w/ H1 + meta tags — never script-injected
3. PWA Kit (21-30)
site.webmanifestw/name,short_name,description,theme_color,background_color,display:"standalone"screenshots[]≥3 entries w/form_factor:"wide"+form_factor:"narrow"shortcuts[]for top 3 actions,share_target,file_handlers,protocol_handlers- Maskable icons 192/512 + monochrome notification icon
- Workbox v7 SW:
StaleWhileRevalidateHTML/JS,CacheFirst+ExpirationPluginimages offline.htmlshell w/ branded copy + link to cached pages- A2HS install banner via
beforeinstallprompt+ iOS separate UI - iOS splash via
apple-touch-icon180×180 +apple-touch-startup-image - iOS Safari 18.4 Declarative Web Push opt-in (PWA-installed only)
- Kill-switch SW (unregister + clear caches) as fallback
4. Structured Data + Rich Snippets (31-40)
- 5+ JSON-LD blocks per route minimum
- Always:
WebSite+Organization+WebPage+BreadcrumbList+FAQPage - Page-type add-ons:
LocalBusiness,Product,BlogPosting,HowTo,Person - Author schema (
Person+sameAs) +dateModifiedon every content page (EEAT) - JSON-LD facts MUST also appear as visible HTML body text
- Validate every route against Google Rich Results Test API before deploy
- Schema.org
citation: CreativeWork[]array for every quantitative claim - Itemprop attributes mirror JSON-LD on key elements
- No duplicate
@idacross blocks; use stable IRIs inLanguageon every block;isAccessibleForFree:trueon public content
5. SEO + AI Search / GEO (41-50)
- Title 50-60 chars HARD, meta desc 120-156 chars HARD, keyphrase 0.5-3%
- OG card 1200×630 ≤100KB BRANDED (not scraped photo)
- Twitter Card meta on every route
sitemap.xmlw/<lastmod>on every URLrobots.txttriple-state: Allow OR Disallow per GPTBot, ClaudeBot, Claude-User, Claude-SearchBot, PerplexityBot, Google-Extended, CCBot, Bytespider — never defaulthumans.txt,.well-known/security.txt,browserconfig.xml,llms.txt(OPTIONAL)- Quotable answer blocks 40-60 words per page (LLM citation magnet)
FAQPagew/ 5+ Q&A blocks (highest AI citation rate)- Lead paragraph answers query directly in <40 words
- Per-route canonical URL (custom hostname when
primary_hostnameset)
6. Third-Party Integrations (51-60)
- GA4 + GTM snippet (head + noscript fallback)
- PostHog snippet w/
persistence:'memory'(cookie-free), autocapture on - Sentry
@sentry/cloudflarev11 (stream trace lifecycle default since 11.0) +withSentry+ OIDC DSN - Workers Tracing
[observability] enabled = true+ OTLP export to Axiom - AI Gateway binding for every LLM call
- Turnstile invisible (
data-appearance="interaction-only") on every form — NEVER visible - Stripe checkout / Resend transactional / Clerk auth (M2M JWT) stubs where appropriate
- Calendly / Cal.com inline booking when applicable
- Google Maps embed via Maps Embed API, lazy-loaded
- Live chat (Crisp / Plain) only when support is stated goal. Cmd+K opens AI chat or command palette AND focuses text input same frame —
autofocus+requestAnimationFrame(() => inputRef.current?.focus({preventScroll:true}))after open-state flip, re-press = re-focus +select(), Esc returns focus to trigger. Playwright build gate:await page.keyboard.press('Meta+K'); await expect(input).toBeFocused();
7. Performance + Core Web Vitals (61-70)
- LCP ≤2.0s (target ≤1.5s)
- CLS ≤0.05 — every image, iframe, ad slot has explicit dimensions
- INP ≤100ms (target — 200ms is fail)
fetchpriority="high"on LCP<img>AND its<link rel="preload">- AVIF primary + WebP fallback + JPEG legacy — no JPEG XL
- Font woff2 subset w/
unicode-rangeper script - JS budget ≤200KB gz / route, no single chunk >250KB gz
- CSS ≤50KB gz, fonts ≤100KB woff2 preload
- Largest image ≤200KB. Hero image ≤150KB.
- Long Animation Frames API instrumented for INP debugging
8. Accessibility WCAG 2.2 AA (71-80)
- axe-core 0 violations at all 6 bp (375, 390, 768, 1024, 1280, 1920)
- Contrast ≥4.5:1 body, ≥3:1 large text + UI components
- Target size ≥24px (2.5.8 — axe auto-tests)
- Focus appearance (2.4.11) visible at every interactive — manual review
- Focus not obscured (2.4.12/13) — sticky headers must not clip focused
- Dragging alternative (2.5.7) — every drag has click/tap equivalent
- Consistent help (3.2.6) — contact/help link same location every page
- Redundant entry (3.3.7) — never re-ask info given
- Accessible auth (3.3.8/9) — no cognitive-test CAPTCHA; offer passkeys
- Lighthouse a11y ≥95
9. Testing + Verification (81-90)
- Playwright E2E 6bp covering homepage → key flow → conversion
- Tests start at homepage, navigate by clicking nav (never
page.gotofor internal) - Vitest 5 unit tests for utilities + Zod schemas
- Lighthouse CI: Perf ≥90, A11y ≥95, BP ≥95, SEO ≥95 (Lighthouse 13.x — since 13.3 an experimental Agentic Browsing category scores AI-agent navigation; perf weights TBT 30 / LCP 25 / CLS 25 / FCP 10 / SI 10)
- AI vision QA ≥9/10 per route (visual-qa agent w/ Opus 4.8)
- Percy AI Visual Review for full-page regression
- Yoast GREEN on every content page
- Build validator: every internal asset resolves, every hyperlink valid, every quantitative claim cited
- CSP report-uri capturing violations during E2E
wrangler tailclean during smoke tests (no Worker errors)
10. Deploy + Observability + Done (91-100)
- Atomic deploy via Workers Builds (preferred) or
wrangler deploy+ version metadata - Gradual deployment (1% → 10% → 100%) w/ auto-rollback on error spike
- CDN purge paired w/ every deploy
/healthendpoint returns{status, version, timestamp}- D1 backups: Time Travel 30-day PIT + R2 long-term archive
secrets.requiredvalidated at deploy- Self-Verify Statement per route (URL + smoke test result + 3 screenshots)
- Sentry / PostHog / Workers Tracing / AI Gateway / GA4 all firing — verify in dashboard
- Browser console: zero errors, zero CSP violations, zero failed resources
- DONE = deployed at real URL + every Hard Gate green + Self-Verify per route + announced
Anything less than all 100 — plus always-on rules 111-118 (§12) — is in-progress.
11. Source-Site Enhancement (101-110 — fires when prompt names existing domain)
-
Phrase detect —
rebuild | optimize | enhance | modernize | recreate | clone | better version of {domain}OR bare-domain prompt where domain resolves 200 = enhancement mode. Output =union(SOURCE_URLS, STANDARD_PAGE_SET[org_type], DEMOGRAPHIC_LOCALES, JEWELS) − CRUFT_URLS. Seerules/source-site-enhancement.md. -
Crawl FIRST —
sitemap.xml → robots.txt → HTML BFS → Wayback fallback → CMS index endpoints (Squarespace /config/pages, WP wp-sitemap-posts-*.xml, Wix _api/v1/sitemap.xml)→_url_inventory.json. Every URL classifiedkeep | merge | 301 | drop. -
Org-type page-set floor per
15-site-generation/page-set-expansion.md:
- nonprofit: 14 standard (home, about, mission, programs, services, team, volunteer, donate, contact, blog, faq, news, financials, annual-report) + 10 jewels
- local-business: ~12 standard + service × city pSEO
- saas: home, product, pricing, features, customers, blog, docs, changelog, security, status, integrations, roadmap, api-docs
- portfolio: home, about, work, blog, contact + per-project pages
-
Demographic-i18n auto-trigger via ACS B16001 lookup on service area — every language ≥10% community share gets
/{locale}/*full route mirror with hreflang cross-refs. Newark NJ ⇒ en+es+pt automatic. -
Jewel discovery (org-type-specific high-value pages absent from source):
- nonprofit:
/parish-toolkit|/planned-giving|/financials|/annual-report|/donate/refurbish|/ways-to-give|/transcript|/alumni|/press|/testimonials|/partners - saas:
/changelog|/security|/status|/integrations|/customers|/roadmap|/api-docs - local:
/specials|/gallery|/team|/reviews|/insurance|/financing - portfolio:
/now|/uses|/colophon|/reading-list
-
IA normalize —
/home → /,/our-mission-1 | /blog-1 | /testpage | /new-page-* → drop or 301, flat/health-clinic → /services/health-clinicnested + index when 9+ services. CRUFT_PATTERNS auto-301 to canonical. -
Squarespace random-ID slugs → semantic + 301. Same for Wix
_compiler/page-datadupes + WP?p=123permalinks. -
Jewel content authority via Form 990 / Charity Navigator / Candid / Wayback / Newspapers.com / LinkedIn — never stub, every quantitative claim APA-cited per
rules/citations.md. -
Hard gate page count — deployed site MUST have
keep_count + standard_gap_count + jewel_count + locale_count*(keep+standard+jewel)pages. Nonprofits min:keep + 14 standard + 10 jewels. Build fails when deployed-route-count < expected. -
Monitor-fire on first tool-call message — rebuild prompt is multi-faceted (≥7 independent work units: crawl → classify → org-type-infer → demographic-i18n → jewel-content-author → IA-normalize → Squarespace-dedupe → deploy-verify). Sequential = build fail. See
rules/source-site-enhancement.md§ Parallel-agent playbook.
12. Current-Platform Motion + Asset Discipline (111-118 — always on, every build)
- Scroll-driven animation = progressive enhancement —
animation-timeline: view()/scroll()ONLY inside@supports (animation-timeline: view()). Firefox: unsupported as of late 2026 — verify at caniuse before relying. Never animation-only state. - JS fallback auto-disables when CSS wins — IntersectionObserver reveal runs only where native support is absent:
if (!CSS.supports('animation-timeline: view()')) observe(...). Double-driving one element = double motion = fail. @starting-stylefirst-paint entrances — transition-based, zero JS; pairtransition-behavior: allow-discretefor display/dialog/popover entry+exit. Baseline mid-2024 (Chrome 117 / Safari 17.5 / Firefox 129) — still verify at caniuse.- Canvas nebula/particle hero layer — zero-dep 2D canvas: DPR capped at 2, particle density scaled to viewport area,
prefers-reduced-motion→ ONE rich static frame (no rAF loop). Reference impl: claude.megabyte.space hero —heroNebulafn inpublic/index.html(heymegabyte/claude.megabyte.space). - rAF pauses on BOTH signals —
document.hidden(visibilitychange) AND element-offscreen (IntersectionObserver on the canvas). Either alone still burns battery + CPU. - Bento asymmetry recipe — auto-fill
minmax()grid + 1-2 span-2 anchor cards + accent wash on the anchors. A uniform card wall is slop (extends rule 9's anti-centered-stack mandate). - Kinetic gradient type —
background-clip: text+background-size: 200%(or larger) + slowbackground-positionpan; gate onprefers-reduced-motion: no-preference. - Immutable assets MUST be content-versioned — any
Cache-Control: immutable/ 1yr asset ships as hashed filename or?v=<version>bumped on EVERY change, INCLUDING any_headersEarly-Hints preload of the same URL (CF 103 Early Hints cache also lags a deploy briefly). Reference incident (claude.megabyte.space, 2026-10-04): a stylesheet servedimmutable, max-age=1yron an UNVERSIONED URL left returning visitors on stale CSS indefinitely.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |