Skip to content
Back to search

codex-canvas

SkillWorks with Claude CodeGitHub

安装、更新并使用 Codex-Canvas。通过 Red SkillHub 或其他 Skill 渠道获得本 Skill 后,继续把最新稳定版 Codex-Canvas 安装为 Codex personal plugin;Skill 安装不是终态。适用于用户要求安装或升级 codex-canvas、输入 /canvas、打开本地无限画布、收集生成图片、把画布图片发送回 Codex 对话,或运行 Quick Edit、Remove BG、Expand、Edit Text、Edit Elements 等图片操作。

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

Its scripts were only partly scanned.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/Xiangyu-CAS/codex-canvas with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/Xiangyu-CAS/codex-canvas'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/xiangyu-cas--codex-canvas/badge.svg)](/listings/xiangyu-cas--codex-canvas)

HTML

<a href="/listings/xiangyu-cas--codex-canvas"><img src="/api/listings/xiangyu-cas--codex-canvas/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Copy this prompt into Codex:

Please install Codex-Canvas according to https://github.com/Xiangyu-CAS/codex-canvas.git and its INSTALL.md.
After installation, tell the user to start a new Codex task and type `@Codex-Canvas open the codex canvas`.

See the full installation guide in [`INSTALL.md`](INSTALL.md).

Stable versions ship through GitHub Releases. **Settings → Version** only installs a `vX.Y.Z` release after its assets are complete and its manifest matches the tag, never unreleased commits from `main`. The old server exits after an update; reopen the canvas and start a new Codex task.

After installation, start a new Codex task and open the canvas:

@Codex-Canvas open the codex canvas

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 74 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. ---
  2. name: codex-canvas
  3. description: 安装、更新并使用 Codex-Canvas。通过 Red SkillHub 或其他 Skill 渠道获得本 Skill 后,继续把最新稳定版 Codex-Canvas 安装为 Codex personal plugin;Skill 安装不是终态。适用于用户要求安装或升级 codex-canvas、输入 /canvas、打开本地无限画布、收集生成图片、把画布图片发送回 Codex 对话,或运行 Quick Edit、Remove BG、Expand、Edit Text、Edit Elements 等图片操作。
  4. ---
  5. # Codex-Canvas
  6. 把这个根 Skill 作为 Codex-Canvas 的发现和安装入口。最终运行形态必须是完整 Codex 插件:personal marketplace 中存在 `codex-canvas@personal`,Codex 已把插件复制到版本化缓存,并在新任务中加载插件自带的 skills 和 MCP server。
  7. ## 安装为 Codex 插件
  8. 当用户要求安装、升级或修复 Codex-Canvas,或者当前目录来自 `redskill install codex-canvas` 时,先执行本节。不要在 Skill 文件下载完成后停止。
  9. 1. 将包含本文件的目录视为 `<codex-canvas-skill-root>`。如果本 Skill 刚由 RedSkill 安装,优先使用 `redskill install` 输出的安装目录;默认通常是当前 workspace 下的 `skills/codex-canvas/`。
  10. 2. 在 `<codex-canvas-skill-root>/scripts/` 中查找唯一以 `install-codex-plugin` 命名的 JavaScript 安装器。仓库源码与 SkillHub 兼容包可能使用不同的模块扩展名;只运行实际存在的那个文件。
  11. 3. 执行:
  12. `node <installer-path> --json`
  13. 4. 安装器必须完成整条稳定链路:把官方 GitHub 仓库放到用户长期目录、切换到最新已发布且校验通过的稳定 Release、安装锁定依赖、写入 personal marketplace、执行 `codex plugin add codex-canvas@personal`,再用 `codex plugin list --json` 验证安装状态和版本。
  14. 5. 默认跳过可选 RapidOCR 安装,以保持首次安装稳定快速。只有用户明确要求同时安装本地 OCR 时,才追加 `--with-ocr`。
  15. 6. 如果安装器报告缺少 `git`、`node`、`npm` 或 `codex`,如实报告缺失项。不要改用未校验的 `main` 分支、手工拼装插件缓存、系统 UI 自动化或直接链接临时 workspace Skill 目录。
  16. 7. 成功后告诉用户:插件已经安装,但当前任务不会动态获得刚安装插件的 MCP server 和专用 skills;关闭旧画布并新建一个 Codex 任务,再使用 `@Codex-Canvas`、`$canvas` 或“打开 Codex-Canvas 画布”。
  17. 重复执行安装器应更新或复用同一个稳定源码目录和 personal marketplace 条目。遇到非 Codex-Canvas 仓库、脏工作树或普通目录占用了目标位置时必须停止,不得覆盖用户文件。
  18. ## 定位运行时
  19. 1. 完成上面的插件安装后,优先使用已安装插件缓存中的 Codex-Canvas runtime。只有安装或故障恢复期间才把当前 Skill 目录视为 `<codex-canvas-root>`。
  20. 2. 执行 CLI 前,先确认 `<codex-canvas-root>/bin/codex-canvas.mjs` 存在。
  21. 3. 使用 Node.js 18.18 或更新版本运行命令。
  22. 4. 将所有画布数据保存在当前工作区的 `canvas/` 目录下。
  23. ## 打开画布
  24. 1. 默认调用插件的 `codex-canvas.open_canvas` MCP 工具,传入当前工作区的绝对路径 `projectDir` 和当前对话的 `threadId`。工具被延迟加载时先发现该工具。
  25. 2. 默认 `presentation: "sidebar"`,工具结果直接在右侧打开原生 MCP App 插件画布,不需要 IP 地址、HTTP 端口或 Browser。成功后不要再打开浏览器。
  26. 3. 也可以从对话的插件侧栏入口打开;如果尚未绑定工作区,面板按钮会请当前对话调用 `open_canvas` 完成绑定。不要猜测其他对话的工作区或 thread id。
  27. 4. 只有旧版宿主不支持 MCP App、插件 MCP 工具不可用,或用户明确要求浏览器时,才用 `node <codex-canvas-root>/bin/codex-canvas.mjs open --project <workspace> --thread-id <thread-id>`,或 `open_canvas` 的 `presentation: "browser"`。优先在 Codex 内置浏览器复用返回 URL;不可用时返回 Markdown 链接,不启动系统浏览器。
  28. ## 图片收集
  29. 1. 对生成或编辑后的图片,尽量将输出保存到当前工作区。
  30. 2. 已知图片路径时,用以下命令导入:
  31. `node <codex-canvas-root>/bin/codex-canvas.mjs import <image-path> --project <workspace> --thread-id <thread-id>`
  32. 3. 如果输出路径不明确,用以下命令收集近期图片:
  33. `node <codex-canvas-root>/bin/codex-canvas.mjs collect --project <workspace> --thread-id <thread-id> --since-minutes 30 --limit 5`
  34. 4. 默认收集只扫描 `~/.codex/generated_images/<thread-id>`。未绑定 thread 时默认收集会安全地不执行;只有用户明确要求手动恢复时,才使用 `--from <dir,dir>` 扫描指定目录。
  35. 5. 遵守 Codex-Canvas 的放置规则:同一批生成图横向排列;从画布对象派生的结果放到源图片右侧。
  36. ## AI 操作边界
  37. AI 图片操作必须使用稳定的 Codex-Canvas action id 和后端 job。不要把具体操作 prompt 写进前端代码。
  38. - `quick-edit`:使用 `skills/canvas-quick-edit/SKILL.md`。
  39. - `remove-bg`:使用 `skills/canvas-remove-bg/SKILL.md`。
  40. - `expand`:使用 `skills/canvas-expand/SKILL.md`。
  41. - `edit-text`:使用 `skills/canvas-edit-text/SKILL.md`。
  42. - `edit-elements`:使用 `skills/canvas-edit-elements/SKILL.md`。
  43. 只有在对应 action 被请求时,才加载匹配的操作技能。平移、缩放、拖拽、选择、删除、铅笔绘制、文本对象编辑、工具栏状态、视口 framing 等确定性画布交互应保留在本地应用代码中。
  44. ## 跨平台规则
  45. - 保持 macOS 和 Windows 跨平台兼容。
  46. - 核心行为不要依赖 AppleScript、`osascript`、System Events、Windows UI Automation、坐标点击、模拟按键、剪贴板粘贴或操作系统特定的浏览器启动方式。
  47. - 优先使用 Codex 支持的浏览器、插件、MCP、CLI 和后端 job 集成面。
  48. - 修改工具栏、dock 和控件 UI 时,使用成熟图标集和应用既有图标风格。
  49. ## 插件兼容
  50. 不要要求 `.codex-plugin/plugin.json` 指向这个根 Skill。Skill 负责发现、bootstrap 和故障恢复;正式使用由 personal marketplace 安装的插件负责。插件安装路径继续暴露现有 `skills/` 目录和 MCP server 配置。
  51. ## 原生透明前景
  52. 前景生成或抠图默认使用原生 PNG alpha。先检查本会话 imagegen 的真实 schema;暴露 `transparent_background` 布尔参数时设为 `true`,不要猜测 `transparent` 参数。保留主体洋红色、细边缘与半透明材质,不绘制棋盘格或色底。无原生透明支持时明确报告限制;只有服务器显式选择 `CODEX_CANVAS_TRANSPARENCY_MODE=chroma-key` 的兼容作业才使用色键流程。导入前验证真实 alpha,不能把不透明棋盘格视为成功。兼容模式边界见 `skills/canvas-remove-bg/SKILL.md`。
README.md · README · 150 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Codex-Canvas
  2. [English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md)
  3. Codex-Canvas is an infinite canvas plugin for Codex. It requires no API setup and uses Codex's built-in GPT-image-2 workflow to edit images on a local canvas. It opens directly inside Codex, collects generated images into the current project, and lets you organize, annotate, edit, compare, and reuse visual assets.
  4. It brings a Lovart-like workflow to Codex: chat on one side, canvas on the other, with powerful image editing tools designed around the same creative loop.
  5. <p align="center">
  6. <img src="assets/readme/overview.webp" alt="Open Codex Canvas" width="760">
  7. </p>
  8. ## Installation
  9. Copy this prompt into Codex:
  10. ```text
  11. Please install Codex-Canvas according to https://github.com/Xiangyu-CAS/codex-canvas.git and its INSTALL.md.
  12. After installation, tell the user to start a new Codex task and type `@Codex-Canvas open the codex canvas`.
  13. ```
  14. See the full installation guide in [`INSTALL.md`](INSTALL.md).
  15. Stable versions ship through GitHub Releases. **Settings → Version** only installs a `vX.Y.Z` release after its assets are complete and its manifest matches the tag, never unreleased commits from `main`. The old server exits after an update; reopen the canvas and start a new Codex task.
  16. After installation, start a new Codex task and open the canvas:
  17. ```text
  18. @Codex-Canvas open the codex canvas
  19. ```
  20. ## Roadmap
  21. - [x] GPT-image-2 powered image editing
  22. - [ ] Editable PPT generation and export
  23. - [ ] draw.io flowchart generation and editing
  24. ## Highlights
  25. ### 1. Open a canvas and collect generated images automatically
  26. Type `@Codex-Canvas open the codex canvas` in your current Codex conversation, and Codex-Canvas opens the project canvas directly in Codex’s plugin side panel as an MCP App. No IP address, HTTP port, or browser tab is needed. Keep chatting on the left while managing visual assets on the right. Once bound, Codex-Canvas collects only that thread's outputs from `~/.codex/generated_images/<thread-id>`; it does not scan other projects, other threads, or the whole project directory. Results are persisted into that thread's canvas.
  27. <p align="center">
  28. <img src="assets/readme/auto-collect.webp" alt="Auto collect generated images" width="640">
  29. </p>
  30. ### 2. Quick Edit: mark what you want changed
  31. Quick Edit now defaults to an arrow-note tool: drag from a note position outside the image to the region you want changed, then type the instruction inline. Brush masks, colors, standalone text, and an optional overall prompt remain available. The source and annotations stay in place while the running placeholder and final revision remain on the canvas to the right.
  32. <p align="center">
  33. <img src="assets/readme/quick-edit-comparison.webp" alt="Quick Edit comparison" width="700">
  34. </p>
  35. ### 3. Edit Elements: separate layers and rearrange them
  36. Edit Elements separates an image into movable layers such as background, text, products, people, and price tags. You can rearrange those layers on the canvas, while Codex-Canvas can continue completing the background that was hidden behind foreground objects. Downloading any layer from an Edit Elements group exports the whole group as a PSD, with each canvas layer mapped to a Photoshop layer for further editing in tools like Photoshop or Photopea.
  37. <p align="center">
  38. <img src="assets/readme/edit-elements-comparison.webp" alt="Edit Elements comparison" width="700">
  39. </p>
  40. ### 4. Edit Text: recognize and rewrite text in images
  41. Edit Text recognizes text in the image and lists it as editable fields. You can revise individual lines while asking the model to preserve the original typography, layout relationships, and visual tone.
  42. <p align="center">
  43. <img src="assets/readme/edit-text-comparison.webp" alt="Edit Text comparison" width="700">
  44. </p>
  45. ### 5. Remove BG: remove backgrounds in one step
  46. For posters, portraits, product shots, and other assets, Codex-Canvas can create a transparent-background result directly on the canvas. The result stays in the same project canvas, ready for composition, layout, or reuse in Codex.
  47. <p align="center">
  48. <img src="assets/readme/remove-bg-result.webp" alt="Remove BG result" width="560">
  49. </p>
  50. ### 6. Expand: outpaint to a new aspect ratio
  51. Expand provides a visual expansion frame and common aspect-ratio presets such as 1:1, 3:4, 16:9, and 9:16. Choose the target canvas first, then let the model complete the surrounding image content.
  52. <p align="center">
  53. <img src="assets/readme/expand-comparison.webp" alt="Expand comparison" width="700">
  54. </p>
  55. ## Features
  56. - Opens a local infinite canvas directly in Codex’s plugin side panel; the CLI/browser remains a compatibility fallback.
  57. - Automatically collects Codex/ImageGen outputs into the bound thread canvas without leaking outputs from other projects or conversations.
  58. - Supports uploading, importing, arranging, selecting, dragging, deleting, and downloading canvas images.
  59. - Supports explicitly linked arrow notes, brush annotations, and temporary text labels, including notes outside the image.
  60. - Supports Quick Edit without an overall prompt, sending a clean source, annotation board, and structured annotation details to the model.
  61. - Supports background removal.
  62. - Supports Expand/outpaint with an adjustable expansion preview frame.
  63. - Supports Edit Text; local OCR is used first when available, with Codex vision fallback when needed.
  64. - Supports Edit Elements, separating images into foreground object/text layers and a background layer.
  65. - Supports background completion for Edit Elements and replaces the background layer in place.
  66. - Supports downloading Edit Elements layer groups as PSD files, with each canvas layer mapped to a Photoshop layer.
  67. - Supports prompt history and generated-version groups.
  68. - Keeps separate canvases for different Codex conversations to avoid mixing contexts.
  69. - Supports copying a selected image as an `@file` reference and pasting it back into Codex chat.
  70. ## Usage Notes
  71. Codex-Canvas stores canvas data in the current project's `canvas/` directory. Generated assets, job logs, and intermediate files stay local to the project.
  72. MCP startup and tool discovery do not create this directory. `status` (including `npm run validate`), search, prompt history, and version queries read existing state without creating files or claiming a legacy canvas for a thread. An absent scope reports an empty canvas unless eligible legacy data can be previewed; copying assets and claiming that legacy canvas still happen only when the canvas is explicitly opened or written. Collection with no new images also leaves an unused project untouched.
  73. `open` / `open_canvas` and `start` explicitly initialize a canvas and write its runtime file, even with `--no-auto-collect`. Importing images and other mutations also create storage. The HTTP server restores previously registered canvases, but skips scopes whose stored state has been removed. A running auto-collector stops when its stored canvas disappears. Close/stop the server before moving or deleting data: the canvas UI and in-flight writes can still create it again.
  74. `Send to chat` is currently a prototype path through the Codex app-server. It can submit at the protocol layer, but it may not always appear in the currently visible Codex desktop chat UI. The more reliable workflow is to use `Copy @file`, then paste that reference into the current Codex chat box.
  75. ## Uninstall (keep your assets)
  76. There is no npm uninstall hook: removing a package alone does not stop a detached server or remove the Codex plugin registration.
  77. 1. Wait for image/text jobs to finish. For foreground `start`, press Ctrl+C in its terminal. For a server launched by `open`, closing the browser tab is **not** enough: inspect `canvas/.codex-canvas-runtime.json` for its URL and PID, verify the live process command points to this plugin's `bin/codex-canvas.mjs start` and the expected project, then stop that specific process using Activity Monitor on macOS or Task Manager on Windows (or your OS process tools). Do not terminate a PID solely from an old runtime file; PIDs can be reused. Repeat for any other Canvas server instances. A server may serve multiple projects, so stopping it stops collection for all of them.
  78. 2. Remove/disable **codex-canvas@personal** in Codex's plugin management. For CLI installations, run `codex plugin --help` and use the removal subcommand supported by your installed version, then verify with `codex plugin list --json`. End old Codex tasks and restart Codex so already-loaded MCP processes/skills are no longer available. If you manually added a `codex-canvas` MCP entry, remove only that entry from the configuration where you added it.
  79. 3. To remove the personal marketplace listing, back up `~/.agents/plugins/marketplace.json` and remove only the plugin object whose `name` is `codex-canvas`; keep every other entry. Remove `~/plugins/codex-canvas` only after verifying it is the installer's symlink/junction, deleting the link itself without following its target. If it is a real directory, leave it in place for manual review. With `CODEX_CANVAS_PERSONAL_HOME`, use that installation's home instead. If installed through Red SkillHub, also remove its separate `codex-canvas` bootstrap skill using that manager so it cannot reinstall the plugin.
  80. 4. After all servers are stopped, optionally remove the plugin-specific `~/.agents/codex-canvas/projects.json` registry (or your `CODEX_CANVAS_PROJECT_REGISTRY_PATH` override) and each project's `canvas/.codex-canvas-runtime.json`. These are registration/runtime metadata, not images. Keeping them is harmless once the plugin is uninstalled. Do not remove the shared `.agents` or `.codex` directories.
  81. 5. Keep or back up each project's **entire `canvas/` folder**: it contains user images, thread canvases, state, job outputs and intermediate files. Delete it only after reviewing and backing up what you need. Optionally archive/remove the plugin's verified source checkout and leftover plugin-specific cache after inspecting them for local changes; never recursively delete through `~/plugins/codex-canvas`. Leave shared Python dependencies and `~/.codex/generated_images/` alone, since other workflows may use them.
  82. ## Development
  83. Common local commands:
  84. ```bash
  85. npm install
  86. npm test
  87. npm run build:app # Node 20+; rebuild after UI changes
  88. node ./bin/codex-canvas.mjs open --project .
  89. ```
  90. Related docs:
  91. - [`INSTALL.md`](INSTALL.md): installation guide and optional local dependencies.
  92. - [`docs/RELEASING.md`](docs/RELEASING.md): versioning, Release PR, tag, and artifact workflow.
  93. - [`docs/CANVAS_TO_CHAT.md`](docs/CANVAS_TO_CHAT.md): current canvas-to-chat validation results and limitations.
  94. ## Credits
  95. Thanks to [Cowart](https://github.com/zhongerxin/Cowart) for the canvas concept.
  96. ### Python runtime troubleshooting
  97. If image post-processing reports `spawn … ENOENT` despite Python working in a terminal, run `npm run setup:image-deps` from the plugin source in that working environment. Once dependencies are verified, setup remembers the absolute Python executable for subsequent jobs, including jobs in an already running service with an older PATH. OCR setup stores its own interpreter. `doctor:*` remains read-only and reports `pythonExecutable`; a missing or broken saved interpreter falls back to PATH candidates.
  98. Set `CODEX_CANVAS_PYTHON` to an executable path (without arguments) to explicitly choose an interpreter for setup or the service. This override is authoritative. Records live in `~/.agents/codex-canvas/python/`; `CODEX_CANVAS_PYTHON_CONFIG_DIR` can override that directory and must match between setup and the service. No job installs Python or dependencies automatically. Services running older plugin code must first be restarted with the fix; a service with an incorrect explicit override also requires an environment correction and restart. See [installation troubleshooting](INSTALL.md) for examples.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.