360 Secure SkillHub
360 安全技能中心

website-factory

该 Skill 依据客户简报在约 40-60 分钟内搭建 Next.js 企业网站,内置 116+ 动画/UI 组件、动效系统、配色与字体预设及 15 个行业默认值,覆盖脚手架、页面构建、SEO、动效审查、QA 和部署流程。

分类:开发
JatinChhabra07
热度 0.66
最近更新 2026-10-19 06:53:38

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add jatinchhabra07/website-factory-skill/website-factory
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
website-factory
description
Build enterprise websites with WOW-level animations, graphics, and polished UI in 40-60 minutes from a client brief. Self-contained skill with 116+ pre-built animation/UI components (scroll reveals, text rotators, typewriter, scramble, morphing-text, flip-words, magnetic buttons, shimmer/rainbow/neon buttons, gradient meshes, meteors/particles/aurora/spotlight/lamp backgrounds, cinematic GSAP heroes, 3D tilt cards, card-hover-effects, bento grids, infinite moving cards, parallax scroll, velocity scroll, sticky scroll reveal, hero-parallax, zoom-parallax, border-beam, tracing-beam, floating-dock, pill-nav, animated tabs, FAQ accordion, testimonial slider, sparklines, donut/bar/area charts, before/after sliders, bauhaus cards, confetti, cursor-trail, click-spark, success-check, and many more) extracted from 5 production sites. Supports 15 industries with pre-researched color/font/CTA defaults. Actions: build website, create site, scaffold project, add hero, add animations, add slideshow, add scroll effect, deploy site. Projects: enterprise website, SaaS site, B2B site, marketing site, landing page.

Website Factory

Build a complete, production-ready Next.js 16 enterprise website — with WOW-level animations, typography, and visuals — from a client brief in 40-60 minutes. This skill is self-contained: all animation systems, component code, color tokens, and industry defaults live in data/, so the skill works end-to-end on day one without depending on any external template repo.

Pillars (read these first)

  1. data/motion-system.md — Animation vocabulary (easing, Framer variants, GSAP). Every component uses these constants. Don't invent new ones.
  2. data/components/_index.md — Catalog of all 31 components. Check this BEFORE writing any new UI code.
  3. data/pattern-recipes.md — Copy-paste recipes for common compositions.
  4. data/color-systems.md + data/typography-presets.md — 4 palettes, 4 font stacks.
  5. data/industry-defaults.ts — 15 industry presets (color, font, hero pattern, CTA, badges).
  6. data/globals-base.css + data/keyframes.css — Drop into the new project's globals.css.

Prerequisites

  • Node.js 20+
  • Next.js 16 (or the latest version the target project is on)
  • Claude Code with parallel agent support
  • For cinematic-hero-gsap.tsx (optional): npm install gsap

Phase 0 — Brief Collection (5 min)

Option A: Interactive Brief

Ask the user for the minimum:

  1. Company name (e.g., "Acme Corp")
  2. Domain (e.g., "acmecorp.com")
  3. Industry — one of the 15 in data/industry-defaults.ts
  4. Primary brand color (hex) — OR let industry defaults pick it
  5. Tagline
  6. Animation intensity — subtle / dynamic / cinematic (maps to hero choice)

For anything not provided, look up defaults from data/industry-defaults.ts.

Option B: Brief Document

Accept a markdown file matching data/brief-template.md. Parse all fields.

Option C: URL Scrape

If the user provides a URL: WebFetch → extract company name, tagline, colors (from meta theme-color), logo URLs, nav structure. Present extracted data, confirm, fill gaps with industry defaults.

Option D: Quick Mode

/website-factory quick [company] [domain] [industry] — all defaults from data/industry-defaults.ts. Only logo files need manual placement.

Output

Generate brief.json with the complete site config. Save at src/data/brief.json in the target project.


Phase 1 — Scaffold (5 min, 1 agent)

Steps

  1. If target directory is empty: npx create-next-app@latest . --typescript --tailwind --app --no-src-dir (then move into src/ yourself — the skill's components expect src/components/ui).
  2. Install dependencies:
    npm install framer-motion
    npm install gsap                 # only if using cinematic-hero
    npm install clsx tailwind-merge  # for cn() util
    
  3. Copy data/globals-base.css → project's src/app/globals.css. Replace BRAND_* placeholders with chosen color system (pull from data/color-systems.md).
  4. Append data/keyframes.css content after the base globals, OR keep as separate file and @import './keyframes.css'.
  5. Set up fonts in src/app/layout.tsx — pick the preset from data/typography-presets.md that matches the industry.
  6. Write brief.json to src/data/brief.json.
  7. Generate src/data/site-config.ts — a typed object that all components read from. Example shape:
    export const siteConfig = {
      company: { name, domain, description },
      brand:   { primary, accent, surface },
      nav:     [...],
      hero:    { headline, subtitle, cta },
      features:[...],
      stats:   [...],
      faqs:    [...],
      footer:  {...},
    } as const
    
  8. Copy data/industry-defaults.ts → src/data/industry-defaults.ts.
  9. Run npm install + npx tsc --noEmit to verify.

Validation

  • site-config.ts exports without TS errors.
  • globals.css has no remaining BRAND_* placeholders.
  • npm run build passes (no page content yet, just scaffold).

Phase 1.5 — Foundation Setup (5 min, 1 agent)

NEW in v2. Pre-install the UI kit before Phase 2 agents start.

Steps

  1. Create src/lib/motion.ts — copy data/components/motion.ts verbatim.
  2. Create src/lib/utils.ts if it doesn't exist:
    import { clsx, type ClassValue } from 'clsx'
    import { twMerge } from 'tailwind-merge'
    export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) }
    
  3. Copy ALL files from data/components/ → src/components/ui/ (components) and src/hooks/ (hooks starting with use-).
  4. Verify imports resolve: npx tsc --noEmit.

Component installation order (if selective)

If you only want a subset to keep bundle size low, install in this order to preserve dependency chain:

  • motion.ts (always)
  • use-animation-config.ts (required by gradient-mesh, interactive-dot-grid)
  • use-magnetic.ts (required by magnetic-button)
  • reveal-on-scroll.tsx (required by most scroll-triggered sections)
  • Everything else can be added on-demand.

Phase 2 — Core Build (15 min, 4 Parallel Agents)

CRITICAL: File Ownership Rules

Each agent ONLY touches its assigned files. No agent may read, write, or modify another agent's files. Every agent MUST read data/components/_index.md first to know what components exist. Compose from the kit; don't invent.

Agent A: Homepage + Layout

Owns: src/app/(site)/page.tsx, src/components/layout/header.tsx, src/components/layout/footer.tsx, src/app/(site)/layout.tsx

  1. Compose page.tsx by importing hero example from data/examples/ that matches brief.animationIntensity:
    • subtle → premium-saas-hero.tsx
    • dynamic → ai-tech-hero.tsx OR real-estate-hero.tsx (by industry)
    • cinematic → cinematic-hero-example.tsx
  2. Adapt the example to use siteConfig values instead of hardcoded strings.
  3. Build header with nav from siteConfig.nav.
  4. Build footer with columns from siteConfig.footer.
  5. Use <RevealOnScroll> on every major section below the hero.

Agent B: Core Pages

Owns: src/app/(site)/about/page.tsx, src/app/(site)/platform/page.tsx, src/app/(site)/pricing/page.tsx, src/app/(site)/contact/page.tsx

  1. About — use VerticalCutReveal for the headline, TimelineContent for company history.
  2. Platform/Services — use BounceCard or BauhausCard for feature grids.
  3. Pricing — CountUp for annual-savings numbers.
  4. Contact — form with shadcn primitives; fire <Confetti active={submitted} /> on success.
  5. Each page has proper generateMetadata().

Agent C: Programmatic Pages (only if brief includes them)

Owns: src/app/(site)/compare/[competitor]/page.tsx, src/app/(site)/solutions/[audience]/page.tsx, src/app/(site)/[geo]/page.tsx

  1. Use generateStaticParams() on each — pre-render all variants.
  2. Share a common layout component that uses RevealOnScroll for reveals.
  3. Unique H1 + meta description per variant (no content duplication).

Agent D: SEO Infrastructure

Owns: src/app/sitemap.ts, src/app/robots.ts, src/lib/schema-builders/, src/app/opengraph-image.tsx, src/lib/metadata.ts

  1. Dynamic sitemap that auto-discovers routes (don't hardcode dates).
  2. robots.ts with granular per-bot rules (allow GPTBot/ClaudeBot/PerplexityBot for SEO/AEO).
  3. JSON-LD builders: Organization, WebSite, Product, FAQPage, BreadcrumbList, LocalBusiness (if geo pages).
  4. OG image generation via opengraph-image.tsx.
  5. Shared generatePageMetadata() utility.

Phase 3 — Polish (10 min, 3 Parallel Agents)

Agent E: Content Optimization

  1. Every page title, meta description, H1 contains target keyword.
  2. Internal links between related pages.
  3. CTAs use action-oriented verbs.
  4. Meta descriptions 150-160 chars.

Agent F: Design / Animation Audit

Check data/motion-system.md for specs, then verify:

  1. Every animation uses ease = [0.22, 1, 0.36, 1] (or easeSnap = [0.16, 1, 0.3, 1] for GSAP).
  2. fadeUp uses y: 10. No y: 24 on small elements.
  3. Cards use border + subtle --shadow-card, NOT heavy drop-shadows.
  4. Color contrast meets WCAG AA (primary text ≥ 4.5:1 on background).
  5. prefers-reduced-motion is respected — check useAnimationConfig() is called wherever needed.
  6. useInView({ once: true, margin: '-60px' }) everywhere.
  7. No orphan text — every h1/h2/h3 has text-wrap: balance applied.

Agent G: Programmatic Content (only if programmatic pages exist)

  1. Each competitor/audience/geo page has unique body content (< 30% overlap).
  2. Unique testimonials, unique FAQ, unique CTA copy.

Phase 4 — QA + Deploy (5-10 min, 2 Parallel Agents)

Agent H: Quality Assurance

  1. npx tsc --noEmit — fix any errors.
  2. npx next lint — fix any errors.
  3. npm run build — fix any errors.
  4. Verify route count in build output matches expected pages.
  5. Verify sitemap includes all routes.

Agent I: Deployment

  1. Verify vercel.json (or deployment config).
  2. Set env vars (GTM ID, NEXT_PUBLIC_SITE_URL, Sanity IDs if applicable).
  3. Run deploy command.
  4. Verify live URL returns 200.
  5. Verify /sitemap.xml and /robots.txt accessible.

Quality Gates

Before declaring the site complete, ALL must pass:

  • npm run build passes with zero errors
  • All pages return 200
  • Every page has unique title + meta description
  • Every page has an H1
  • Organization JSON-LD is on every page
  • FAQPage schema is on pages with FAQs
  • Sitemap includes all static + dynamic routes
  • robots.txt allows GPTBot, ClaudeBot, PerplexityBot
  • OG image is set for every page (dynamic or fallback)
  • No hardcoded placeholder strings remain (grep for BRAND_, PLACEHOLDER, TODO)
  • All animations respect prefers-reduced-motion
  • Color contrast meets WCAG AA
  • Mobile responsive (no horizontal scroll)
  • Cinematic hero (if used) passes Lighthouse > 90 performance
  • At least 3 components from the UI kit used on the homepage

Fallback Handling

  • Missing brief field → use industry default from data/industry-defaults.ts
  • Missing logo → text-based fallback (company name in heading font)
  • Missing pricing data → skip pricing page
  • Missing testimonials → skip testimonials section
  • Build fails → Agent H has 3 retry attempts before escalating to user

Time Budget

Phase Duration Agents
Phase 0 — Brief 5 min 1 (interactive)
Phase 1 — Scaffold 5 min 1
Phase 1.5 — Foundation (NEW) 5 min 1
Phase 2 — Core Build 15 min 4 parallel
Phase 3 — Polish 10 min 3 parallel
Phase 4 — QA + Deploy 5-10 min 2 parallel
Total 45-50 min

Non-negotiables (the quality bar)

Read data/motion-system.md section "What NOT to do" — but the key ones:

  • Always useInView({ once: true }) in production
  • Always respect prefers-reduced-motion (use useAnimationConfig())
  • Always text-wrap: balance on headings
  • Always font-variant-numeric: tabular-nums on stats
  • Never hardcode easing curves in components — import from @/lib/motion
  • Never invent a new animation pattern when one exists in data/components/