claude-code-setup

iromanovich/claude-code-setup Checked 2 days ago

CLAUDE.md templates behind a Figma to Shopify pipeline: OS 2.0 theme rules and the Figma Dev Mode MCP workflow

The rules behind my Figma to Shopify pipeline: CLAUDE.md templates I drop into every Shopify theme project, plus the external skills I rely on. Extracted from production work, kept current as the pipeline changes. Figma's Dev Mode MCP server is raw on its own: it returns React and Tailwind for a frame and links to assets.

Summary extracted from the README.

claude-code-setup

Claude Code Shopify Figma License: MIT

The rules behind my Figma to Shopify pipeline: CLAUDE.md templates I drop into every Shopify theme project, plus the external skills I rely on. Extracted from production work, kept current as the pipeline changes.

What's inside

  • templates/shopify.md: how a Shopify OS 2.0 theme should be built. Everything configurable from the theme editor, reuse the theme before writing anything, pixel-exact to Figma, section structure, schema and CSS rules, what never to do.
  • templates/figma-mcp.md: working with Figma's Dev Mode MCP server from Claude Code. Preconditions, registration, the six tools and the order to call them, the node-id trap (frame vs nested element), sections split across unrelated frames, asset extraction, converting the React + Tailwind output into Liquid and CSS.
  • skills/README.md: external skills I use, with sources and install notes.

The pipeline these rules drive

Figma's Dev Mode MCP server is raw on its own: it returns React and Tailwind for a frame and links to assets. With these two templates loaded, Claude Code reads the frame, its metadata and assets, converts them into an OS 2.0 section by the conventions of the specific theme (existing snippets, CSS variables, every value in schema settings, blocks for repeated items), and then opens the result in the browser to check it against the Figma frame. A section goes from a frame to a working, editable section in hours, pixel-exact, and review rounds start from real edge cases rather than spacing fixes.

I run it on every production project. The storefronts it produced are on romanovich-e.com; code excerpts from one of them are in shopify-subscription-storefront.

How to use

For a new Shopify theme project:

cp templates/shopify.md /path/to/your/theme/CLAUDE.md

Adjust paths and project conventions to match the theme. For Figma, copy the rules from templates/figma-mcp.md into that CLAUDE.md, or into ~/.claude/CLAUDE.md to use them across projects.

Principles

  • Reuse the theme's existing patterns before writing new ones.
  • Configure from the theme editor, not from code.
  • Pixel-exact to the design, with values taken from Figma, not guessed.
  • The agent builds and checks; I decide what ships.

Contributing

Personal setup. If you spot something worth adding, open an issue first.

License

MIT