CommunityProductivity & Collaborationgithub.com

BIGboss248/nextjs-wordpress

AI screen scaffolding, layout generation, and variant exploration workflow powered by Google Stitch (StitchMCP). Consumes a component design specification (docs/design/components/[page name]/[component name]/design-spec.md), verifies and reuses the central Stitch project in docs/project.json (or creates/persists one if absent), seeds the project's design system into Stitch, synthesizes layout prompts to generate a screen and create one variant of the given design spec file, downloads and saves Stitch JPG screenshots and HTML code files directly into docs/design/components/[page name]/[component name]/stitch/ using binary-safe PowerShell Invoke-WebRequest, outputs image prompts to the user if visual assets are needed (without calling generate_image to conserve tokens), updates design-spec.md with Stitch layout benchmarks, and audits asset download integrity with an independent subagent. Triggers on "/stitch-design", "generate stitch screen", "create stitch variant", "scaffold screen with stitch", or "stitch...

What is nextjs-wordpress?

nextjs-wordpress is a Claude Code agent skill that aI screen scaffolding, layout generation, and variant exploration workflow powered by Google Stitch (StitchMCP). Consumes a component design specification (docs/design/components/[page name]/[component name]/design-spec.md), verifies and reuses the central Stitch project in docs/project.json (or creates/persists one if absent), seeds the project's design system into Stitch, synthesizes layout prompts to generate a screen and create one variant of the given design spec file, downloads and saves Stitch JPG screenshots and HTML code files directly into docs/design/components/[page name]/[component name]/stitch/ using binary-safe PowerShell Invoke-WebRequest, outputs image prompts to the user if visual assets are needed (without calling generate_image to conserve tokens), updates design-spec.md with Stitch layout benchmarks, and audits asset download integrity with an independent subagent. Triggers on "/stitch-design", "generate stitch screen", "create stitch variant", "scaffold screen with stitch", or "stitch...

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/BIGboss248/nextjs-wordpress/tree/HEAD/.agents/skills/stitch-design

Installed? Explore more Productivity & Collaboration skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Preview

From the skill README

Primary Screen Design
Variant 1 Design

Documentation

Google Stitch UI Prototyping & Variant Skill (stitch-design)

This skill defines the complete workflow for taking an established component design specification (design-spec.md) and using Google Stitch (StitchMCP) to scaffold screen layouts, generate spatial variants, download high-resolution visual assets (JPG screenshots and raw HTML exports) into the codebase, and update the design specification with concrete layout benchmarks.

[!IMPORTANT] Input Prerequisite: This skill requires a completed design specification at docs/design/components/[page name]/[component name]/design-spec.md (typically generated by component-design). If no spec exists, run /component-design first.

[!CAUTION] Binary Download Safety Rule: NEVER use read_url_content to download Stitch JPG screenshots or HTML exports. read_url_content is text-only and converts responses to markdown, corrupting binary images and mangling HTML structure. All downloads MUST use run_command with PowerShell Invoke-WebRequest -Uri <url> -OutFile <path>. Signed download URLs expire quickly—download immediately upon receiving the Stitch response.

[!TIP] Zero In-Skill Image Generation (Token Conservation Rule): To conserve tokens, this skill MUST NOT invoke generate_image directly. If the screen requires custom background images, illustrations, or icons, formulate and output structured prompts to the user so they can generate and place them in the project files.


1. Core Deliverables & Workflow Overview

flowchart TD
    Start["Invoke /stitch-design<br/>(Target: docs/design/components/[page]/[component]/design-spec.md)"] --> Step1["Step 1: Ingest Design Specification<br/>(Read design-spec.md & docs/project.json)"]
    Step1 --> Step2["Step 2: Stitch Project Persistence & Token Seeding<br/>(Check/reuse stitch.project_id in docs/project.json, seed design system)"]
    Step2 --> Step3["Step 3: Screen & Variant Generation via StitchMCP<br/>(generate_screen_from_text + generate_variants for 1 variant)"]
    Step3 --> Step4["Step 4: Binary-Safe Asset Download<br/>(PowerShell Invoke-WebRequest → stitch/screen.jpg, screen.html, variant-1.jpg, variant-1.html)"]
    Step4 --> Step5["Step 5: Design Spec Benchmark Integration<br/>(Embed stitch/screen.jpg & variant benchmarks into design-spec.md)"]
    Step5 --> Step6["Step 6: Independent Subagent Verification<br/>(invoke_subagent verifies file sizes, metadata, and spec alignment)"]
    Step6 --> Finish["Visual Prototypes Ready<br/>(Stitch JPG + HTML saved in codebase)"]

Deliverable: The Stitch Assets Subfolder

Every Stitch run creates or populates the stitch/ subfolder inside the component's design directory:

docs/design/components/[page name]/[component name]/
├── design-spec.md          # Updated with Stitch benchmarks & embedded screenshots
└── stitch/                 # Downloaded Google Stitch design files
    ├── screen.jpg          # Stitch-generated JPG screenshot of the primary screen
    ├── screen.html         # Stitch-generated raw HTML export of the primary screen
    ├── variant-1.jpg       # Stitch-generated JPG screenshot of the variant
    ├── variant-1.html      # Stitch-generated raw HTML export of the variant
    └── stitch-meta.json    # Stitch project ID, screen ID, variant IDs, and generation prompt

2. Step-by-Step Execution Workflow

Step 1: Ingest Design Specification & Project Context

  1. Locate Target Component:
    • Identify the component path: docs/design/components/[page name]/[component name]/.
    • Read design-spec.md to extract:
      • Executive summary, persona, and emotional tone.
      • Visual hierarchy (1st, 2nd, and 3rd focal points).
      • Layout grid and breakpoint behaviors.
      • Design tokens (colors, radii, elevation).
      • Per-locale typography pairings.
  2. Read Project Context:
    • Read docs/project.json to verify the canonical design system and check for existing Stitch configuration.

Step 2: Google Stitch Project Persistence & Design System Seeding (StitchMCP)

[!IMPORTANT] Single Project Per Repository Rule (Zero Duplicate Projects): Every repository must maintain exactly one shared Google Stitch project container for all of its component and screen designs. NEVER create multiple Stitch projects for the same repository.

  1. Check docs/project.json First:
    • Inspect docs/project.json for an existing "stitch" object with project_id.
  2. Reuse Existing Project:
    • If stitch.project_id exists, ALWAYS reuse that projectId directly for all screen scaffolding, variants, and design system updates. Do NOT call create_project.
  3. Create & Immediately Persist (Only if Absent):
    • If no stitch.project_id exists in docs/project.json:
      • Call call_mcp_tool on StitchMCP with list_projects to check if a project matching the repository title already exists.
      • If none exists, call create_project with title: "[Project Title] Design System & Components".
      • IMMEDIATELY persist the project properties to docs/project.json under "stitch":
        "stitch": {
          "project_id": "<projectId>",
          "project_name": "projects/<projectId>",
          "title": "<title>"
        }
        
  4. Seed Design Tokens:
    • Provide the project's canonical design system (from docs/project.json) to Stitch via upload_design_md or create_design_system_from_design_md to establish global color, font, and radius consistency.

Step 3: Screen & Variant Generation via StitchMCP

  1. Synthesize Detailed Design Prompt:
    • Combine the component purpose, user persona, emotional tone, and layout requirements from design-spec.md.
    • Explicitly specify visual tokens: background canvas, surface cards, primary accent, secondary accent, status colors, and typography from docs/project.json.
    • Specify target viewport: deviceType: "DESKTOP" (or "MOBILE" / "TABLET" if targeting a mobile-first component).
  2. Generate Primary Screen:
    • Call generate_screen_from_text on StitchMCP:
      • projectId: Active Stitch project ID.
      • prompt: Synthesized design prompt.
      • deviceType: "DESKTOP".
    • Extract the generated screen ID and resource name (format: projects/{projectId}/screens/{screenId}).
  3. Generate One Variant:
    • Call generate_variants on StitchMCP using the generated screen ID to produce one spatial/visual variant of the design spec file (e.g. exploring an alternative layout density, card vs. full-bleed, or asymmetric visual flow).
    • Record the variant screen ID.

Step 4: Binary-Safe Asset Download Protocol

[!CAUTION] PowerShell Invoke-WebRequest Required: Run each download command as a discrete single operation. Verify that each file downloaded has a non-zero byte size (> 10KB for JPGs).

  1. Ensure Directory Exists:
    • Target directory: docs/design/components/[page name]/[component name]/stitch/.
  2. Download Primary Screen JPG:
    • Extract screenshot.downloadUrl from the primary screen response.
    • Execute:
      powershell -Command "Invoke-WebRequest -Uri '<screenshot.downloadUrl>' -OutFile 'docs/design/components/[page]/[component]/stitch/screen.jpg'"
      
  3. Download Primary Screen HTML:
    • Extract htmlCode.downloadUrl from the primary screen response.
    • Execute:
      powershell -Command "Invoke-WebRequest -Uri '<htmlCode.downloadUrl>' -OutFile 'docs/design/components/[page]/[component]/stitch/screen.html'"
      
  4. Download Variant-1 JPG:
    • Extract screenshot.downloadUrl from the variant response.
    • Execute:
      powershell -Command "Invoke-WebRequest -Uri '<variant.screenshot.downloadUrl>' -OutFile 'docs/design/components/[page]/[component]/stitch/variant-1.jpg'"
      
  5. Download Variant-1 HTML:
    • Extract htmlCode.downloadUrl from the variant response.
    • Execute:
      powershell -Command "Invoke-WebRequest -Uri '<variant.htmlCode.downloadUrl>' -OutFile 'docs/design/components/[page]/[component]/stitch/variant-1.html'"
      
  6. Save Stitch Metadata (stitch-meta.json):
    • Write docs/design/components/[page]/[component]/stitch/stitch-meta.json:
      {
        "projectId": "<stitchProjectId>",
        "screenId": "<screenId>",
        "screenName": "projects/<projectId>/screens/<screenId>",
        "deviceType": "DESKTOP",
        "generationPrompt": "<synthesizedPrompt>",
        "variantIds": ["<variantScreenId1>"]
      }
      

Step 5: Design Spec Benchmark Integration

Update docs/design/components/[page name]/[component name]/design-spec.md with the Stitch results:

  1. Embed Stitch Primary Screen & Variant:
    ## Google Stitch Layout Architecture & Benchmarks
    
    ### Primary Screen Design
    ![Primary Screen Design](stitch/screen.jpg)
    
    ### Variant 1 Exploration
    ![Variant 1 Design](stitch/variant-1.jpg)
    
  2. Document Layout Architecture Observations:
    • Note the spatial grid, visual weight, whitespace rhythm, and typography hierarchy demonstrated in the Stitch screens.
    • Compare the primary screen with Variant 1, highlighting the strengths of each composition.

Step 6: Visual Asset Prompts (If Applicable)

[!NOTE] If inspecting the Stitch layouts reveals a need for bespoke visual assets (e.g. ambient backgrounds, custom icons, or diagrams), do NOT call generate_image. Output structured prompts to the user:

### Recommended Visual Asset: [Asset Name]
- **Target File Path:** `docs/design/components/[page]/[component]/[filename].png`
- **Recommended Aspect Ratio:** `16:9` or `1:1`
- **Generation Prompt:**
  > "[Detailed prompt describing the visual asset matching the Stitch layout]"

Step 7: Independent Subagent Verification Loop (invoke_subagent)

[!IMPORTANT] Subagent Review Protocol: Always verify downloaded assets and spec updates via an independent subagent before reporting completion.

1. Spawn Verification Subagent

Call invoke_subagent with:

  • TypeName: "self"
  • Role: "Stitch Asset & Download Auditor"
  • Model: "inherit"
  • Prompt:
You are an independent Stitch Asset Auditor. Your job is to verify that Google Stitch assets were downloaded cleanly and integrated into the component directory.

TARGET COMPONENT DIRECTORY:
docs/design/components/[page name]/[component name]/

Deliverables to Audit:
1. docs/design/components/[page name]/[component name]/stitch/screen.jpg (must exist, non-zero bytes)
2. docs/design/components/[page name]/[component name]/stitch/screen.html (must exist, raw HTML)
3. docs/design/components/[page name]/[component name]/stitch/variant-1.jpg (must exist, non-zero bytes)
4. docs/design/components/[page name]/[component name]/stitch/variant-1.html (must exist, raw HTML)
5. docs/design/components/[page name]/[component name]/stitch/stitch-meta.json (valid JSON with projectId, screenId, generationPrompt, variantIds)
6. docs/design/components/[page name]/[component name]/design-spec.md (must embed stitch/screen.jpg and stitch/variant-1.jpg)

Audit against these strict criteria:
1. Binary File Integrity: Confirm screen.jpg and variant-1.jpg are not empty or corrupted (size > 10KB).
2. HTML Integrity: Confirm screen.html and variant-1.html are valid HTML files and not corrupted markdown.
3. Metadata Integrity: Confirm stitch-meta.json has valid fields.
4. Spec Integration: Confirm design-spec.md contains the embedded screenshot links and Stitch layout benchmark notes.
5. Token Conservation: Confirm generate_image was NOT called directly.

Respond in this exact format:
VERDICT: PASS | ISSUES_FOUND

ISSUES (if any):
- LOCATION: {file:line or section}
- PROBLEM: {what is non-compliant or broken}
- FIX: {concrete instruction to fix}

SUMMARY: {brief overall evaluation}

2. Evaluate Review & Resolve

If ISSUES_FOUND, immediately resolve them (e.g. re-downloading any failed asset or fixing metadata) before completing execution.


3. Execution Verification Checklist

Before completing execution, verify:

  • design-spec.md was ingested from docs/design/components/[page]/[component]/.
  • Stitch project ID was verified/reused from docs/project.json (or created and immediately persisted).
  • Design tokens were seeded into Stitch via upload_design_md or create_design_system_from_design_md.
  • Primary screen was generated via generate_screen_from_text.
  • Exactly one variant was generated via generate_variants.
  • All assets were downloaded using PowerShell Invoke-WebRequest -OutFile (zero use of read_url_content).
  • screen.jpg, screen.html, variant-1.jpg, variant-1.html are saved in stitch/ with non-zero sizes.
  • stitch/stitch-meta.json was saved with complete metadata.
  • design-spec.md was updated with embedded screenshots and Stitch layout benchmarks.
  • generate_image was NOT called directly; image prompts were output for the user if needed.
  • Independent subagent audit was invoked via invoke_subagent and passed.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

BIGboss248/nextjs-wordpress

Create, configure, manage, and validate Google Antigravity customizations including skills, rules, MCP servers, lifecycle hooks, plugins, and custom JSON configs. Use when adding new capabilities to Antigravity, configuring MCP servers, writing rules, creating skills, setting up hooks, or modernizing legacy workflows.

BIGboss248/nextjs-wordpress

Spawn multiple agents into a shared conversation where they debate, disagree, and converge on a solution via a shared chat.json file. Use for architecture decisions, code review debates, design trade-offs, or any problem that benefits from adversarial reasoning. Triggers on "chatroom", "agent debate", "have agents discuss", "agent chatroom", "debate this", or /agent-chatrooms. Also triggers on phrases like "have 3 agents argue about", "multi-agent discussion", or "let them debate".

BIGboss248/nextjs-wordpress

Always-active code intelligence, search, and navigation skill utilizing the codebase-memory MCP server. Enforces an index-first protocol (verifying and refreshing the knowledge graph via index_repository or index_status before searching, required because background auto_watch is disabled to eliminate editor stutter and system lag), followed by graph-first exploration (search_graph, trace_path, get_code_snippet, query_graph, get_architecture, detect_changes) instead of naive text grep or full-file reads. Always activate before searching the codebase, inspecting unknown architecture, finding symbols, or tracing callers/callees.

BIGboss248/nextjs-wordpress

>- Discover, interview, and craft comprehensive UX/UI design specifications (design-spec.md) and design tokens for web components. Triggers on "/component-design", "design component", "design section", "design UI", "wireframe component", or "create design spec".

BIGboss248/nextjs-wordpress

>- Configure and query WooCommerce APIs including WPGraphQL, WooGraphQL, and JWT auth for headless frontends. Use when connecting Next.js to WooCommerce or fetching store catalog data.

BIGboss248/nextjs-wordpress

Orchestrate parallel browser automation using multiple Chrome DevTools MCP instances. Use when a task requires doing the same browser action across many targets simultaneously (e.g., submitting contact forms, filling applications, scraping pages that need JS rendering). Spin up 1-5 parallel Chrome agents.

BIGboss248/nextjs-wordpress

Workflow for spawning an independent subagent to conduct unbiased code reviews and inject adversarial edge-case tests ([ComponentName].edge.test.tsx).

BIGboss248/nextjs-wordpress

>- Build Next.js App Router React components with Suspense skeletons, semantic OKLCH tokens, Jest + RTL unit tests, Playwright visual/hydration checks, and Tailwind logical styling. Triggers on "/nextjs-component-dev", "create component", "new component", "build component", or "develop component".

BIGboss248/nextjs-wordpress

>- Bootstrap, configure, and verify the complete Next.js App Router development environment, developer tooling, testing suites, MCP servers, Docker containerization, and CI/CD. Triggers on "/nextjs-dev-setup", "setup nextjs dev environment", "start a nextjs project", or "containerize nextjs app".

BIGboss248/nextjs-wordpress

>- Configure production health monitoring endpoints (/api/health), Docker Compose probes, and runtime metrics in Next.js App Router applications. Use when asked to "setup health check", "add health endpoint", "docker compose healthcheck nextjs", "configure health monitor", or "/nextjs-healthcheck".

BIGboss248/nextjs-wordpress

Bootstrap, configure, and verify next-intl App Router internationalization (proxy.ts/middleware.ts, next/root-params, [locale] layout, routing). Triggers on "/nextjs-i18n-setup", "setup i18n", "install next-intl", "configure next-intl", "add internationalization", "setup locale routing", "migrate to [locale]".

BIGboss248/nextjs-wordpress

Read/write translation dictionaries (messages/[locale].json), next-intl hooks (getTranslations/useTranslations), providers (Storybook/tests/subtrees), and BiDi styling. Triggers on "/nextjs-i18n-usage", "i18n dictionary", "use translations", "read dictionary", "i18n provider", "next-intl hooks", "storybook i18n", "test i18n", "add translation keys", "localize component", "create a component", "update a component".

BIGboss248/nextjs-wordpress

>- Configure, test, and verify OpenTelemetry (OTel) observability in Next.js App Router applications. Triggers on "/nextjs-otel", "setup otel", "configure opentelemetry", "test otel", or "verify opentelemetry".

BIGboss248/nextjs-wordpress

Step-by-step workflow for designing and building Next.js App Router pages (RSC page.tsx, loading skeleton, metadata, JSON-LD schema, and dynamic static params). Triggers on "/nextjs-page-dev", "create page", "new page", "develop page", "build route", or "implement page".

BIGboss248/nextjs-wordpress

>- Orchestrate end-to-end planning for Next.js App Router projects, generating canonical specifications, design systems, and a 7-phase modular implementation roadmap in docs/plan/. Triggers on "/nextjs-plan", "plan a nextjs project", "plan nextjs app", "create nextjs project plan", "outline nextjs architecture", or "generate plan".

BIGboss248/nextjs-wordpress

Workflow and engineering standards for crafting co-located Storybook CSF3 stories ([ComponentName].stories.tsx) with interactive controls, action spies, and 4 canonical theme variants.

BIGboss248/nextjs-wordpress

>- Build Next.js e-commerce frontends backed by WooCommerce APIs, handling ISR catalogs, cart sessions, and JWT authentication. Use when building or querying Next.js stores with WooCommerce.

BIGboss248/nextjs-wordpress

Self-correcting rules engine and feedback loop that learns from user corrections, mistakes, and project-specific constraints by maintaining a persistent autofix ruleset. Scans learned rules before starting any task, resolves conflicts, and automatically appends new rules upon corrections. Triggers on user corrections ("no, do it this way", "never do X", "always use Y"), /learn, "self repair", "add rule", "update rules", or when diagnosing assumptions and bugs. CRITICAL ALWAYS-ACTIVE LIFECYCLE SKILL. Must always be kept in context, loaded at session start, and consulted before starting ANY task to read and apply active constraints from autofix.json. MUST ALWAYS be triggered immediately whenever the user provides ANY correction, preference, criticism, rejection of an approach, or adjustment ("no", "don't do X", "use Y", "remember", "prefer"), or when any mistake/bug is identified. Automatically and immediately formulates and appends the new imperative rule to the project's autofix.json ruleset file.

BIGboss248/nextjs-wordpress

Setup, automate, and execute SEO audits, CI/CD pre-push/pre-deploy checks, and ranking optimizations using the seo CLI and MCP server.

BIGboss248/nextjs-wordpress

End-to-end repository onboarding and development environment setup skill. Scans repository structure, configures project metadata (docs/project.json), sets up the codebase-memory-mcp code intelligence knowledge graph server (in workspace mcp.json and globally for AGY only), configures git hooks with Husky and Commitlint, establishes multi-stage production Docker containerization, and automates credit-optimized Release Please CI/CD with multi-arch (AMD64 & ARM64) GHCR package deployment. Triggers on "/setup-repository", "setup repository", "setup repo", "initialize repository", "new repo setup", or when preparing any repository for development and AI agent workflows.

Related Skills