Codex Draw logo

Codex Draw

Community
simonmesmith
codex-draw

Launch and operate a local Codex drawing workspace: a lightweight vector board where the user and Codex share editable scene state through a browser UI, workspace-backed JSON, local API mutations, and SVG export. Use when the user wants to draw, edit, inspect, generate, refine, or export simple vector artifacts such as logos, icons, diagrams, badges, layout sketches, SVG assets, or visual scratchpad scenes.

Overview

Publishersimonmesmith
Repositoryagent-skills
Skill namecodex-draw
Stars
51
Forks
5
Bundled files
6
LicenseGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by simonmesmith on GitHub. Read the source before you install it.

Installation

Install the Codex Draw AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/simonmesmith/agent-skills/tree/main/skills/codex-draw
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/simonmesmith/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/codex-draw .claude/skills/codex-draw
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Codex Draw in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Codex Draw on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Codex Draw is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Codex Draw

Create and edit a local vector drawing board that both the user and Codex can modify. The browser UI is for visual editing; Codex should inspect and mutate the scene through the local API.

Start The Workspace

Run from the project or artifact workspace:

bash
python3 skills/codex-draw/scripts/codex_draw.py --workspace drawings

The server prints a local URL such as http://127.0.0.1:8765. Open that URL in the Codex preview or in-app browser when practical.

Useful options:

bash
python3 skills/codex-draw/scripts/codex_draw.py --workspace drawings --port 8787
python3 skills/codex-draw/scripts/codex_draw.py --workspace /path/to/workspace/drawings --scene codex-draw-scene-20260604-113000.json

When --scene is omitted, the server creates a new timestamped scene JSON in the workspace.

The workspace contains:

  • *.json: saved scene graphs; new drawings use timestamped names such as codex-draw-scene-20260604-113000.json
  • exports/*.svg: exported SVG files
  • assets/: user or generated image assets that can be inserted into scenes

Generated drawings/ workspaces are ignored by this repo by default.

Core Workflow

  1. Start the server and open the printed URL.
  2. Let the user draw or ask Codex to create objects.
  3. Use GET /api/scene before making agentic edits.
  4. For agent-created drawings, build in visible stages: add the title/background first, then major figures, then details and labels. Use short pauses or browser reloads between larger batches so the user can see the drawing come to life.
  5. Mutate the scene with object API calls, then re-read the scene if precision matters.
  6. Let the user choose an SVG destination with the UI export button, or use POST /api/export/svg-content when an agent needs raw SVG text.
  7. Return the active scene path and any important limitations.

Prefer API edits over browser-click automation. Only drive the UI directly when verifying visual behavior or when the user specifically asks.

Scene API

Replace {base} with the printed localhost URL.

bash
curl {base}/api/scene
curl -X POST {base}/api/objects -H 'Content-Type: application/json' -d '{"type":"rect","x":120,"y":90,"width":220,"height":120,"fill":"#ffffff","stroke":"#1a1c1f","strokeWidth":2}'
curl -X PATCH {base}/api/objects/rect-1 -H 'Content-Type: application/json' -d '{"fill":"#339cff"}'
curl -X DELETE {base}/api/objects/rect-1
curl -X POST {base}/api/selection -H 'Content-Type: application/json' -d '{"selection":["rect-1"]}'
curl -X POST {base}/api/export/svg-content

Available endpoints:

  • GET /api/scene: return full scene JSON.
  • POST /api/scene: replace the full scene.
  • POST /api/objects: create an object and assign an ID if missing.
  • PATCH /api/objects/:id: update an object.
  • DELETE /api/objects/:id: delete an object.
  • POST /api/objects/reorder: set object order with {"order":["id-a","id-b"]} from back to front.
  • GET /api/selection: return selected IDs and object data.
  • POST /api/selection: set selected IDs.
  • POST /api/save: force-save the active scene JSON.
  • POST /api/new: save the current scene, switch to a new timestamped scene JSON, and return the blank active scene.
  • POST /api/export/svg-content: return {"filename":"...svg","svg":"..."} without writing to the workspace.
  • POST /api/export/svg-save-as: open a native macOS save dialog and write the SVG to the user-selected path.
  • POST /api/export/svg: write an SVG to exports/ and return its path. Prefer the UI export button for user-facing downloads.

The UI autosaves after object changes and shows the active scene path plus the last save time in the top status line. It also polls scene state, so API mutations appear in the browser shortly after they are saved.

Scene Model

Scenes are JSON:

json
{
  "version": 1,
  "revision": 1,
  "canvas": {
    "width": 1200,
    "height": 800,
    "background": "#ffffff"
  },
  "objects": [],
  "selection": []
}

Object fields are intentionally explicit and human-readable:

  • Common: id, type, name, x, y, width, height, rotation, fill, stroke, strokeWidth, opacity, locked, visible, zIndex
  • rect: uses x, y, width, height
  • ellipse: uses x, y, width, height
  • line and arrow: use x, y, x2, y2
  • text: uses x, y, text, fontSize, fontFamily, fill
  • image: uses x, y, width, height, href

Keep coordinates in canvas pixels. Keep object order stable by setting zIndex values from back to front.

Visual Direction

Codex Draw should feel like a small Codex utility, not a generic SaaS tool. The app uses compact Codex theme variables with fallbacks:

  • --codex-base-accent
  • --codex-base-surface
  • --codex-base-ink

The UI should stay quiet: crisp borders, compact icon-like tool buttons, clear focus states, no landing page, no decorative gradients, and no marketing copy.

Validation

After editing this skill, run:

bash
python3 -m py_compile skills/codex-draw/scripts/codex_draw.py
python3 skills/codex-draw/scripts/codex_draw.py --workspace /tmp/codex-draw-test --port 8765

In another shell, verify:

bash
curl http://127.0.0.1:8765/api/scene
curl -X POST http://127.0.0.1:8765/api/objects -H 'Content-Type: application/json' -d '{"type":"ellipse","x":120,"y":90,"width":120,"height":120,"fill":"#339cff"}'
curl -X POST http://127.0.0.1:8765/api/export/svg-content

Open the URL in the Codex in-app browser when practical and confirm the canvas is visible, object creation works, API-created objects appear, the right panel scrolls independently for long object lists, and the UI export button lets the user choose a destination.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Codex Draw AI skill do?

Launch and operate a local Codex drawing workspace: a lightweight vector board where the user and Codex share editable scene state through a browser UI, workspace-backed JSON, local API mutations, and SVG export. Use when the user wants to draw, edit, inspect, generate, refine, or export simple vector artifacts such as logos, icons, diagrams, badges, layout sketches, SVG assets, or visual scratchpad scenes.

Why use Codex Draw on TypingMind?

Because you install it once and use it with any model. Codex Draw is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Codex Draw in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/simonmesmith/agent-skills/tree/main/skills/codex-draw. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Codex Draw?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Codex Draw?

As many as you like. As long as a model supports skills, you can use Codex Draw with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Codex Draw AI skill free?

Yes. It is published on GitHub by simonmesmith under the GPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇