Design automation with Claude Code and Codex starts with one problem: both agents are excellent at changing files, but a design is not a file they can see. They need a place where the design lives as something they can read and edit, with the brand rules and the approval state attached. This guide shows how to connect both agents to a shared design canvas, then walks through seven setups that teams run today: from “build only what was approved” to a scheduled brand review in CI and a full campaign pipeline with Executor and treg.
Set up design automation with Claude Code and Codex
Every setup below uses Doop, an open-source design canvas where people and AI agents work on the same frames. Each frame is real HTML, so an agent edits it exactly instead of guessing from a screenshot. There are two ways in.
Connect Claude Code over MCP
claude mcp add --transport http doop https://doop.design/mcp
Run /mcp inside Claude Code and sign in through the browser window that opens. There are no API keys to copy. Our design MCP for Claude Code page covers the tools in detail.
Connect Codex over MCP
codex mcp add doop --url https://doop.design/mcp
codex mcp login doop
The Codex CLI, the IDE extension and the desktop app all read the same configuration, so one setup covers all three. The Codex MCP docs explain the config file.
Or give either agent the doop CLI
Agents with a shell often work better with files than with tool calls. The doop CLI turns frames into local HTML files, so the agent edits them with its own tools and pushes them back live:
npm install -g @doop-design/cli
doop login
doop link "Spring campaign"
doop init # tells the repository's agents about Doop
For CI, create an agent key under Settings and set it as DOOP_API_KEY. Nobody has to approve a browser sign-in on a build server.

Setup 1: Build only what was approved
The most common failure in AI-built UI is an agent building the exploration instead of the final. In Doop, a person marks finished frames “ready for dev”, and that approval belongs to the exact revision. If the design changes, it flips to “Needs review”. Agents can see all of this, so the brief is short:
Implement every frame on the Checkout canvas that is marked ready for dev,
using the canvas's tokens. Skip anything that needs review and tell me which.
With the CLI, the agent pulls exactly those frames with components and tokens written out:
doop pull --ready --expand
doop tokens pull --format css -o src/tokens.css
The full checklist for developers, printers and ad teams is in our design handoff process guide.
Setup 2: A weekly brand review with Claude Code in CI
Claude Code runs without a person in headless mode. Combined with the doop CLI, that gives you design automation with Claude Code on a schedule: a weekly design review in GitHub Actions.
name: Weekly brand review
on:
schedule:
- cron: "0 9 * * 3" # Wednesdays, 09:00 UTC
workflow_dispatch:
jobs:
review:
runs-on: ubuntu-latest
env:
DOOP_API_KEY: ${{ secrets.DOOP_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
steps:
- run: npm install -g @doop-design/cli @anthropic-ai/claude-code
- run: doop link "Spring campaign"
- run: |
claude --bare -p "Run 'doop guide' and read the canvas style guides.
Pull every frame with 'doop pull --all'. Fix colours and fonts that
break the style guides, then push only the files you changed. Do not
touch frames that are ready for dev. List every change and every
open question." --allowedTools "Bash(doop *),Read,Edit" \
>> "$GITHUB_STEP_SUMMARY"
Every push lands in the frame’s version history, so a bad fix is one click to undo. In addition, Doop refuses a push when someone changed the frame since the agent pulled it, so the agent never overwrites a person’s work. To decide which rules the agent should check, start with our guide to brand compliance checks.
Setup 3: Codex makes the story formats
Codex runs in scripts with codex exec. This setup turns every approved square post into a 9:16 story version:
doop pull --ready
codex exec --sandbox workspace-write \
-c sandbox_workspace_write.network_access=true \
"Run 'doop guide' first. For each file in designs/, create a 1080x1920
story version as a new file. Keep the headline, product and logo, and
move them into the story safe zone. Push each new file with
'doop push <file> --width 1080 --height 1920'. Never edit the originals."
The sandbox needs network access because the CLI talks to Doop. The originals stay approved, and the new frames arrive as drafts for a person to approve.
Setup 4: Hand work over and wait for feedback
An agent that finishes and stops leaves the review loop to people. Instead, the CLI lets an agent hand over its work and wait for the answer:
doop status "Three hero directions ready for review"
doop wait --timeout 60m
doop wait blocks until someone leaves feedback or a comment on the canvas, prints it and exits. Run it in the background, and the agent picks up the feedback the moment it arrives, without anyone re-prompting it.
Setup 5: Tokens and layout checks on every merge
Design tokens drift when code and design change separately. Two CI lines keep them in step and catch broken layouts:
npx @doop-design/cli tokens push tokens.json
npx @doop-design/cli inspect "Pricing" --fail-on-problems
The first line sends only the tokens that changed, so it is safe on every merge. The second exits with an error when a frame has content past its edge, clipped text or overlapping elements. That deterministic gate pairs well with the agent review in Setup 2.
Setup 6: Briefs from Slack and Linear
Not every brief starts in a terminal. With the Doop Slack app installed, anyone can write @Doop plus a brief in a channel. Doop creates a canvas, runs its design agent, and posts the result in the thread. Similarly, in Linear you can delegate an issue to Doop, which designs from the issue’s title and description and reports back in the agent session.
From there, a developer’s Claude Code or Codex picks up the same canvas over MCP. The marketer briefs in Slack, and the engineer builds from the approved result, with no exports in between. For the approval side, read our design approval workflow guide.
Setup 7: A campaign pipeline with treg, Doop and Executor
The most interesting setups chain several tools around the agent. Here is a pipeline for a spring campaign. Each tool does one job, and the agent connects them.
The three tools and their jobs
- treg for research and generation. treg calls itself “OpenRouter for agent tools”. One token reaches thousands of third-party endpoints, such as SERP data, Google Images results, social trends and image models, billed per call. The agent researches what the audience searches for, and it can call a high-resolution image model for a print visual without anyone signing up for another vendor.
- Doop for design and sign-off. The agent drafts three key visual directions on the campaign canvas, following its tokens and style guides. The Brand Compliance role reviews them. Then the creative director approves one, and Doop’s approval-triggered automation drafts every size.
- Executor for actions with side effects. Executor holds the team’s accounts and exposes them to agents through one MCP endpoint. It can wrap any OpenAPI, GraphQL or MCP service, such as Microsoft Graph for Teams, or a print vendor’s order API. Each tool can declare an approval rule, so “submit print order” can always ask a person first.
Connect all three
In Claude Code, add each one as an MCP server:
claude mcp add --transport http doop https://doop.design/mcp
claude mcp add --transport http --scope user executor https://mcp.executor.sh/mcp
claude mcp add --transport http treg https://treg.to/mcp/
With Codex, use codex mcp add <name> --url <url> for each one.
The brief
With all three connected, the brief reads like a project plan:
Use treg to find what people searched for about trail running this month.
Draft three spring key visual directions on the "Spring 26" Doop canvas,
following its style guides, and ask @brand to review them. When a direction
is marked ready for dev, use Executor to post it to the #spring Teams channel
and prepare the print order for 500 A2 posters. Do not submit the order.
In Executor, the order tool’s rule is a one-liner, approval: always(), so the submit step stops for a person even if the agent tries it. Executor also runs schedules and receives webhooks. For example, an Executor app can receive Doop’s signed webhook events and forward agent results to Teams without any agent session running.
The division of labour is the point. treg brings outside data in, Doop holds the design and the sign-off, and Executor guards everything that leaves the building. That separation is what makes design automation with Claude Code safe at campaign scale. Notably, the agent never approves its own work at any stage. For print and Photoshop scenarios, see marketing design automation, and for the overview, the design automation guide.
Frequently asked questions
Can Claude Code design, or only write code?
It can design when it has a canvas to work on. Connected to Doop over MCP or the CLI, Claude Code creates and edits frames, follows the canvas’s tokens and style guides, and takes screenshots to check its work.
Does Codex work with design tools?
Yes. Codex supports MCP servers, so it connects to Doop with codex mcp add. It can also use the doop CLI from a shell, including in codex exec scripts.
How do I run design automation with Claude Code in CI?
Install the doop CLI, set an agent key as DOOP_API_KEY, and run commands like doop tokens push, doop export or doop inspect --fail-on-problems. For agent reviews, run Claude Code with claude -p or Codex with codex exec.
What are Executor and treg?
Executor is an open-source integration layer that gives agents one MCP endpoint for your accounts, with per-tool approval rules. treg is a pay-per-call catalog of third-party API endpoints for agents. Neither is part of Doop, but both work alongside it.
