--- name: hyperblue description: Build premium, brand-aware React/Next.js frontends that feel designed by a senior UI engineer, not generated by AI. Use this skill whenever the user wants to create websites, landing pages, dashboards, web apps, React components, or any frontend UI — especially when they provide brand assets (logos, screenshots, colors), mention a specific business or industry, want to match an existing design system, or ask for "non-generic" or "premium" output. Also trigger when the user shares competitor sites for inspiration, asks for design tokens, wants animation direction, or needs responsive brand consistency. This skill replaces generic AI aesthetics with market-aware, brand-calibrated design engineering. Created by Incredible Visibility. --- # Hyperblue Build premium React/Next.js interfaces calibrated to a specific brand identity, informed by competitive landscape research, and engineered to override default LLM design biases. This skill operates in six phases. Each phase feeds the next. Brand tokens generated in Phase 2 are the connective tissue — every rule in Phases 3-5 references them instead of hardcoded values. Use `AskUserQuestion` throughout to gather input interactively via selectable options rather than open-ended prose questions. --- ## PHASE GATE SYSTEM — MANDATORY WORKFLOW **CRITICAL: Do NOT skip phases. Do NOT write component code before Phase 2 is complete.** Every full build follows this sequence. Each phase has a gate — a deliverable that must be presented to the user and confirmed before proceeding. Refinement modes (Phase 6) are the only exception: they operate independently on existing code. | Phase | Gate — what you deliver before moving on | |---|---| | **1A. Competitive Research** | Present 3-4 competitors as selectable options. User picks design anchors. If no business context provided, skip to 1B. | | **1B. Brand Intake** | Confirm brand personality and content density (from assets or interactive questions). Summarize: "Your brand direction: [personality], [density], [references]." | | **1C. Content Strategy** | Confirm brand voice (Formal / Technical / Conversational / Luxury). Show 2-3 sample microcopy lines in the chosen voice for validation. | | **1D. Sitemap Architecture** | Present 2-3 sitemap variations. User selects one. Output the finalized sitemap as a structured tree. | | **1E. Asset Sourcing** | List the image/video subjects needed and confirm sourcing direction. If user supplies their own assets, acknowledge and skip. | | **2. Brand Tokens** | Output the complete token set (colors, typography, spacing, shapes, shadows, dark mode). User confirms or adjusts before any code is written. | | **3. Foundation** | Scaffold the design system, routing structure, and shared components (see Build Strategy below). User confirms the foundation before individual pages are built. | | **4-5. Pages** | Build pages from the sitemap one by one, reusing the design system. Ask the user which page to build first. | **Build Strategy — how the sitemap becomes a real multi-page site:** The build phase is NOT "write one long landing page." It follows a strict foundation-first, pages-second order: **Step 1: Design System Foundation** (always built first) - **Token file:** Create a CSS/Tailwind token file that codifies all Phase 2 tokens (`globals.css` with `--brand-*` custom properties, or `tailwind.config` theme extensions). This is the single source of truth for the entire site. - **Next.js routing scaffold:** Create the `app/` directory structure matching the confirmed sitemap. Every route gets at minimum a `page.tsx` with a placeholder that imports the shared layout. Dynamic routes get their `[slug]` folders. - **Root layout:** `app/layout.tsx` with font loading, metadata, theme provider, and the token file imported. - **Shared components:** Build these before any page content: - `Navigation` — responsive nav derived from the sitemap (all routes become nav links or grouped under dropdowns). Hamburger/sheet on mobile. - `Footer` — sitemap-derived link groups, brand info, legal links. - `Section` — reusable section wrapper with consistent spacing rhythm (`py-16 md:py-24`), max-width container, and optional background variants. - `Button` — primary, secondary, ghost variants using brand tokens. - `Card` — if the design uses cards, a branded card with consistent radii, shadow, and padding. - `Typography` — heading and body text components with the brand's type scale baked in (optional but recommended for large sites). - **Dark mode toggle** — if dark mode was defined in tokens, wire it up in the layout. **Step 2: Page-by-Page Build** - After the foundation is confirmed, ask the user: "Which page should I build first?" Default suggestion: homepage. - Each page imports and composes the shared components. Page-specific sections are built as local components within that route. - Every page uses the design tokens — no hardcoded colors, fonts, or spacing. - Internal links between pages use the sitemap routes (``), not anchor links to sections on the same page. - After each page is complete, ask: "Page done. Which page next?" Continue until the user stops or all sitemap pages are built. **Step 3: What if the user only wants one page right now?** - Build the full foundation (Step 1) regardless — it's the design system investment. - Build the requested page (Step 2). - The remaining sitemap routes keep their placeholder `page.tsx` files with a consistent "Coming Soon" or skeleton state using the brand's design tokens. - The user can return in a future session and say "build the /about page" — the foundation, tokens, nav, and footer are already in place. **CRITICAL: Never flatten the sitemap into a single scrolling page.** If the sitemap has `/about`, `/services`, `/contact` as separate routes, they must be separate Next.js routes with their own `page.tsx` files — not sections within a single-page layout. The only exception is if the user explicitly asks for a single-page/one-pager. **How to enforce this in practice:** - After completing each gate, explicitly tell the user which phase you just finished and which phase comes next: "Phase 1A complete — competitive anchors locked. Moving to Phase 1B: Brand Intake." - If the user says "just build it" or pushes to skip ahead, you may compress phases (combine questions, make reasonable defaults) but you must still *pass through* each gate. At minimum, summarize what you're assuming for each skipped gate so the user can course-correct. - If the user asks for a single component (not a full site), you may fast-track: run 1B (brand intake) and 2 (tokens) only, then build. Skip 1A, 1C, 1D, 1E. - For refinement modes (Phase 6), no gates are needed — read the existing code and apply targeted fixes. --- ## PHASE 1: DISCOVERY Before writing any code, establish the design context. This phase has four tracks. **Interactive Discovery:** Throughout this phase, use the `AskUserQuestion` tool to gather user input interactively — present selectable options instead of asking open-ended questions in prose. This gives the user a faster, click-to-choose experience. Use `preview` fields when comparing visual directions (e.g., layout mockups, color palettes). Use `multiSelect: true` when choices aren't mutually exclusive. Always keep options to 2-4 per question, with clear labels and descriptions. The user can always pick "Other" for custom input. ### 1A. Competitive Landscape Research When the user provides a business description (even a one-liner like "luxury perfume e-commerce in the Gulf" or "B2B SaaS for construction teams"), research the competitive landscape before designing anything. **Workflow:** 1. Use web search to find 5-8 notable players in the user's industry/niche. 2. For each player, extract their visual signature: - Color family (warm/cool/neutral, primary accent) - Layout approach (editorial, grid-heavy, card-based, full-bleed imagery) - Typography choices (serif/sans, display vs system, hierarchy depth) - Animation style (minimal, functional, cinematic, playful) - Content tone (formal, conversational, technical, aspirational) - Navigation patterns (sticky, minimal, mega-menu, sidebar) 3. Present findings as a curated reference set. Use `AskUserQuestion` to let the user interactively select which competitors feel closest to their desired positioning — present the top 3-4 competitors as selectable options (with descriptions summarizing each one's visual signature), with `multiSelect: true` so they can pick more than one. 4. Note industry conventions AND gaps — if every competitor uses dark backgrounds, that's both a convention worth knowing and a differentiation opportunity. **The user's selections become design anchors.** They feed into token generation alongside the brand's own assets. If the user skips this step or provides no business context, proceed with brand assets alone. ### 1B. Brand Intake Collect the user's brand materials. Accept any combination of: - **Screenshots** of their existing site, Figma mockups, or design references - **Logo** files or descriptions - **Color guidelines** (hex values, palette names, brand book excerpts) - **Font preferences** (specific typefaces or general direction) - **Brand personality brief** (even informal: "clean and premium" or "bold and technical") If the user hasn't provided explicit brand direction, use `AskUserQuestion` to ask about their brand personality (e.g., "Minimal & Clean", "Bold & Expressive", "Warm & Approachable", "Sharp & Technical") and their content density preference (e.g., "Airy/editorial", "Balanced", "Dense/data-heavy"). When the user shares **screenshots**, extract: - Spacing rhythm (base unit, section gaps, component padding) - Alignment tendencies (left-heavy, centered, asymmetric) - Content density (airy/editorial vs packed/dashboard) - Component patterns (card styles, button shapes, nav structure) - Visual hierarchy cues (how they differentiate primary from secondary from tertiary) - Color usage in context (where the accent appears, what's neutral) When the user shares a **logo**, extract: - Dominant and secondary colors - Geometric vs organic character (informs border radii, icon style, layout decisions) - Weight and proportion (heavy/bold logos need more breathing room) - Whether it works on both light and dark backgrounds ### 1C. Content Strategy Establish the verbal personality that drives all generated microcopy. If not already clear from the brand brief, use `AskUserQuestion` to let the user pick their brand voice: - **Formal** → restrained, confident copy. "Begin your session" not "Let's go!" - **Technical** → direct, precise copy. "Deploy to production" not "Launch your creation" - **Conversational** → warm, friendly copy. "Find your next favorite" not "Browse catalog" - **Luxury** → minimal, evocative copy. "Discover" not "Shop now" Apply this voice to every generated text element: button labels, headings, empty states, error messages, loading text, tooltips, placeholder content. No more generic "Get Started" buttons or "Something went wrong" errors — every string should sound like it was written by the brand's copywriter. **Banned copy patterns** (regardless of brand): "Elevate", "Seamless", "Unleash", "Next-Gen", "Revolutionize", "Cutting-edge", "Empower", "Supercharge", "Unlock the power of". Use concrete verbs tied to what the product actually does. ### 1D. Sitemap Architecture After completing competitive research and brand intake, generate an ideal sitemap for the user's website. This happens before any code is written. **Workflow:** 1. Based on the business description, industry research, and competitor analysis, determine the optimal page structure. 2. Present the sitemap using `AskUserQuestion` with `preview` to show the proposed structure visually (as an ASCII tree diagram) alongside alternatives. Offer 2-3 sitemap variations as options: - **Minimal** — lean site with only essential pages (ideal for launches/MVPs) - **Standard** — industry-appropriate page set covering expected user journeys - **Comprehensive** — full-featured site with content marketing, resources, and conversion funnels 3. Once the user selects a direction, output the finalized sitemap as a structured list: ``` / (Homepage) ├── /about ├── /services │ ├── /services/[service-1] │ └── /services/[service-2] ├── /work or /portfolio │ └── /work/[case-study] ├── /blog │ └── /blog/[post] ├── /contact └── /legal ├── /privacy └── /terms ``` **Sitemap principles:** - Pages should map to real user intents, not vanity sections. Every page earns its place by serving a navigation goal or conversion step. - URL slugs should be clean, lowercase, hyphenated, and SEO-friendly. - Group related pages under logical parents (e.g., `/services/branding`, not `/branding`). - For e-commerce: include category → subcategory → product hierarchy. For SaaS: include features, pricing, docs, and changelog. - Flag pages that need dynamic routes (e.g., blog posts, case studies, product pages) vs. static pages. - The sitemap informs the Next.js file-based routing structure (`app/` directory layout) when code generation begins. **The finalized sitemap becomes the structural blueprint for Phase 3.** All navigation components, internal linking, and routing are derived from it. ### 1E. Asset Sourcing When the user has not supplied their own images or videos, source contextually relevant royalty-free assets instead of using random placeholders. This step runs after brand intake so you know the industry, brand personality, and visual direction. **Image sourcing workflow:** 1. Based on the project description, brand personality, and sitemap, identify the specific image subjects needed. Be precise — not "business" but "construction team reviewing blueprints on-site" or "luxury perfume bottles on marble surface with warm lighting." 2. For each needed image, use `WebSearch` to search Unsplash (e.g., `site:unsplash.com construction team blueprints`). Search for 2-3 variations per slot to find the best match. 3. From the search results, navigate to the Unsplash photo pages and extract the **direct image URL** — the stable `images.unsplash.com/photo-*` format. These are permanent and will not break. 4. Append query parameters to control dimensions and cropping: `?w=800&h=600&fit=crop&auto=format&q=80`. Adjust `w` and `h` to match the layout's aspect ratio needs (hero images, card thumbnails, avatars all have different ratios). 5. If Unsplash does not have a strong match, fall back to Pexels (`site:pexels.com`) using the same search strategy. Use the `images.pexels.com/photos/*` direct URLs with `?auto=compress&w=800&h=600`. **Video sourcing workflow (when the project calls for video backgrounds or media sections):** 1. Search Pexels Videos (`site:pexels.com/video`) with specific scene descriptions matching the brand context. 2. Use the direct video file URLs from Pexels (they provide free-to-use MP4 links). 3. Always include `poster` attributes on `