Google Stitch Integration
Panopticon integrates with Google Stitch, Google’s AI-powered UI design tool, enabling design-to-code workflows.What is Google Stitch?
Google Stitch generates production-ready UI designs from natural language prompts or image inputs. It’s free (350 standard + 50 experimental generations/month) and requires only a Google account.Setup (Optional)
Use the/pan-stitch skill to set up the integration:
How It Works
When Stitch is configured, the planning agent can:- Create UI designs - Generate screens for UI-related issues
- Document in STATE.md - Record Stitch project/screen IDs for workers
- Worker agents pick up designs - Use the Stitch skills to convert to React
Bidirectional Sync
Designs are stored in your Google account and sync bidirectionally:- MCP → Web UI: Designs created by agents appear in Stitch web UI
- Web UI → MCP: Designs created in web UI are accessible to agents
- Edit anywhere: Refine AI-generated designs in the web UI before workers convert them
Available MCP Tools
| Tool | Purpose |
|---|---|
create_project | Create a new Stitch project |
list_projects | List all your projects (owned/shared) |
get_project | Get project details |
list_screens | List screens in a project |
get_screen | Get screen details + HTML/CSS download URLs |
generate_screen_from_text | Generate a screen from a text prompt |
Stitch Skills
| Skill | Purpose |
|---|---|
/pan-stitch | Setup and configure Stitch MCP |
/stitch-design-md | Create DESIGN.md from Stitch projects |
/stitch-react-components | Convert Stitch HTML to React components |
STATE.md Integration
When planning UI work, add a Stitch section to STATE.md:Workflow: From Design to Code
1. Planning Phase
During issue planning, the planning agent can create designs:2. Implementation Phase
The implementation agent picks up the design:3. Iteration
If the design needs changes:- Open https://stitch.withgoogle.com
- Find your project and screen
- Edit using the visual tools
- Re-run
/stitch-react-componentsto get updated code
Manual Workflow (No MCP)
If you prefer not to set up the MCP:- Design at https://stitch.withgoogle.com
- Export HTML/CSS from the UI
- Use
/stitch-react-componentswith the exported files
Best Practices
Design Quality
- Be specific in prompts - Include details about colors, spacing, and layout
- Use device types - Specify MOBILE or DESKTOP for appropriate layouts
- Iterate in the web UI - Fine-tune designs visually before converting
Code Quality
- Review generated code - AI-generated components may need cleanup
- Extract common components - Don’t duplicate similar UI elements
- Follow project conventions - Adapt generated code to match your style guide
Team Collaboration
- Share Stitch projects - Multiple team members can access the same designs
- Document decisions - Note why specific design choices were made in STATE.md
- Version control DESIGN.md - Track design evolution alongside code changes
Troubleshooting
”Permission denied” errors
Make sure you’ve authenticated with gcloud:“API not enabled” errors
Enable the Stitch API:MCP not connecting
Verify the MCP is registered:stitch in the list.
Related Guides
- Skills - Understanding Panopticon skills
- Quickstart - Initial setup
- Concepts - Core Panopticon concepts