.agents/skills/implement-stitch-design/SKILL.md
Implement HTML/Tailwind designs generated by Google Stitch into the CPHport Next.js application.
npx skillsauth add simonpaag/cphport .agents/skills/implement-stitch-designInstall 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.
This skill provides a strict step-by-step process for integrating raw HTML/Tailwind CSS designs generated by Google's Stitch tool into the CPHport React/Next.js frontend.
CRITICAL RULE: Do NOT attempt to convert the HTML, apply translations (next-intl), and connect backend data (Supabase) all at once. This leads to broken layouts and CSS conflicts. Follow the phased approach below exactly.
When generating designs in Stitch, the user or AI should use the following prompt guidelines to ensure compatibility with CPHport:
text-primary (#0091aa), bg-background-light (#f8f6f6), and bg-background-dark (#101a1d).glass-card.Instead of overwriting existing complex integrated components, start by creating a "Raw" version.
Raw suffix (e.g., src/components/home/HeroRaw.tsx).return statement of this functional React component.class -> className, onclick -> onClick, closing standalone tags like <img /> and <br />).next-intl translation hooks (useTranslations). Leave the hardcoded text exactly as it is in the Stitch file.min-h-screen bg-light on a <body> tag) that shouldn't be inside a component, and remove them.Before making the component functional, ensure the basic visual styling works.
Raw component on the relevant page (e.g., in src/app/[locale]/page.tsx, swap <Hero /> with <HeroRaw />).--color-primary, --color-background-light) in src/app/globals.css are correctly mapped and not overridden by OS-level dark mode settings.npm run dev) and visually inspect the Raw component. Do not proceed to Phase 3 until the user confirms the layout looks perfect.Once the raw visual layout is approved, integrate it into the real system.
Raw component.messages/da.json and messages/en.json with the new strings, overwriting old keys if replacing an existing design.const t = useTranslations('Namespace'); to the component and replace text with {t('key')}.interface Article { title: string; ... })..map() functions driven by props.HeroRaw.tsx to Hero.tsx (or update the original target layout file with the new code).next build or npm run dev) to ensure no Turbopack or syntax errors exist.testing
How to systematically verify changes after a live deployment
testing
Check list and standards for search-engine optimizing every new page and entity on CPHport.com.
documentation
Standard guidelines and design system details for CPHport.com, combining Maritime and Industrial aesthetics.
documentation
Guide for creating a new standardized page or content entry based on predefined templates (e.g., tourism, businesses, cruise ships).