Skip to content

gabelul/stitch-kit / skills/stitch-nextjs-components

stitch-nextjs-components

Verified

Converts a Stitch screen, a local HTML file, or a URL into production-ready Next.js 15 App Router components — Server vs Client split, dark mode via CSS variables, TypeScript strict, ARIA, and responsive mobile-first layout. Only the Stitch route needs an API key.

resources/architecture-checklist.md

View on GitHub
# Next.js Components — Architecture Checklist

Run through this checklist before marking the task complete.

## Structure

- [ ] Components are in separate files — no single-file spaghetti
- [ ] Static content is in `src/data/mockData.ts`, not hardcoded in JSX
- [ ] Shared TypeScript types are in `src/types/index.ts`
- [ ] Each component file has a `Readonly<ComponentNameProps>` interface
- [ ] Custom hooks (if any) are in `src/hooks/`

## App Router correctness

- [ ] Pages are in `app/[route]/page.tsx`, not `pages/`
- [ ] Interactive components have `'use client'` at the top
- [ ] Non-interactive components do NOT have `'use client'`
- [ ] No `useState` / `useEffect` in Server Components
- [ ] `next/image` used for all images (never `<img>`)
- [ ] `next/link` used for all internal navigation (never `<a>`)

## TypeScript

- [ ] No `any` types
- [ ] All function parameters are typed
- [ ] All component props use `Readonly<>`
- [ ] No `@ts-ignore` or `@ts-expect-error` without a comment explaining why

## Styling — CSS variables

- [ ] No hardcoded hex colors in JSX or CSS
- [ ] All colors reference `var(--color-*)` tokens
- [ ] Dark mode works — toggle `.dark` class on `<html>` and verify visually
- [ ] `design-tokens.css` is imported in `globals.css`

## Responsive

- [ ] Layout works at 320px (small mobile) — no horizontal overflow
- [ ] Layout works at 768px (tablet)
- [ ] Layout works at 1280px (desktop)
- [ ] Navigation collapses appropriately on mobile
- [ ] All images have correct `sizes` attribute for responsive loading

## Accessibility baseline

- [ ] Semantic HTML: `<nav>`, `<main>`, `<section>`, `<article>` where appropriate
- [ ] `<main id="main-content">` exists on every page
- [ ] Skip navigation link is first element in `app/layout.tsx`
- [ ] All interactive elements are `<button>` or `<a>`, not `<div>`
- [ ] All images have descriptive `alt` text (or `alt=""` for decorative)
- [ ] Icon-only buttons have `aria-label`
- [ ] No `outline-none` without a visible `focus-visible:ring-*` replacement

## Dark mode

- [ ] `ThemeProvider` is wrapping `{children}` in `app/layout.tsx`
- [ ] `suppressHydrationWarning` is on the `<html>` tag
- [ ] Both light and dark modes look correct (test by toggling class)
- [ ] No elements that "disappear" in dark mode (white on white, etc.)

## Performance

- [ ] No `console.log` statements left in production code
- [ ] Images use `next/image` with `width` and `height` (or `fill` + `sizes`)
- [ ] Heavy dependencies are dynamically imported if not needed on initial load
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall