Agent skill

Canvas

by Xiangyu-CAS in Xiangyu-CAS/codex-canvas

Open and use Codex-Canvas, a project-local infinite canvas for Codex image generation.

MITAuto-check passedMedia & Creative

Install Canvas

skills CLI
$ npx skills add Xiangyu-CAS/codex-canvas --skill canvas -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Xiangyu-CAS/codex-canvas canvas --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Xiangyu-CAS/codex-canvas.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/canvas .claude/skills/canvas && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
canvas
GitHub stars
137
Token cost
~1.7k tokens
SKILL.md length
926 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Open and use Codex-Canvas, a project-local infinite canvas for Codex image generation.

  • Works in 8 steps: Start or reuse the local canvas server… → Fast open behavior → Open the returned URL directly in the… → …
  • The user says /canvas
  • SKILL.md covers Workflow and Notes
  • Calls node

What it does

Canvas is an agent skill from Xiangyu-CAS/codex-canvas. Open and use Codex-Canvas, a project-local infinite canvas for Codex image generation. Use when the user says /canvas, asks to open the canvas, or wants generated images collected on a visual board.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Media & Creative, covering Image generation. The repository describes itself as: Infinite canvas plugin for codex; Codex无限画布插件,图层分离,涂抹修改. The licence is MIT.

When your agent uses it

  • The user says /canvas
  • Asks to open the canvas
  • Wants generated images collected on a visual board

Example prompts

  • “/canvas”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Start or reuse the local canvas server for the active project
  2. Fast open behavior
  3. Open the returned URL directly in the Codex in-app browser.
  4. When the user asks for image generation or image editing while this skill is active
  5. Quick Edit, Remove BG, Expand, Edit Text, and Edit Elements are implemented as background Codex-Canvas jobs. They create a canvas…
  6. Edit Text is a two-step interaction: first run text recognition and show the formatted editable text list in the canvas UI; after the user…
  7. Edit Elements asks ImageGen for a low-detail instance segmentation map, then Codex-Canvas locally splits the source image into…
  8. Canvas-to-chat requires a bound Codex thread. Each bound thread uses a separate canvas scope under canvas/threads//. The frontend…

What it can do on your machine

Read from SKILL.md and the folder at commit b801839. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Canvas loads about 1.7k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 926 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Xiangyu-CAS/codex-canvas at commit b801839, republished under its MIT licence (© Xiangyu-CAS). 926 words, ~1,660 tokens.

Download SKILL.mdSave it as .claude/skills/canvas/SKILL.md (or your agent's skills folder).
name
canvas
description
Open and use Codex-Canvas, a project-local infinite canvas for Codex image generation. Use when the user says /canvas, asks to open the canvas, or wants generated images collected on a visual board.

Codex-Canvas

Use this skill to open the local Codex-Canvas board and keep generated images collected in the active project.

Workflow

  1. Start or reuse the local canvas server for the active project:
    • Use the CLI opener as the default path: node <plugin-root>/bin/codex-canvas.mjs open --project <workspace>.
    • Pass the current Codex thread id with --thread-id <thread-id> whenever it is available; Codex-Canvas uses this explicit binding for canvas-to-chat image sends and to keep one canvas per Codex thread.
    • Opening never installs an update. After the UI loads, its version control checks for a published Codex-Canvas release in the background.
    • codex-canvas open will also read CODEX_THREAD_ID or CODEX_CANVAS_CODEX_THREAD_ID from the environment. If neither an explicit thread id nor an environment thread id is available, the canvas is the shared project default, not a per-thread canvas.
    • If the codex-canvas.open_canvas MCP tool is already exposed in the thread, it is also acceptable to use it with projectDir and threadId, but do not probe for it or announce anything about MCP availability. Treat CLI opening as the normal supported behavior.
  2. Fast open behavior:
    • Prefer reusing the existing runtime URL in <workspace>/canvas/.codex-canvas-runtime.json when it responds.
    • Prefer codex-canvas open --project <workspace> over codex-canvas start; open already reuses the saved runtime or starts a detached server only when needed.
    • If the Codex in-app browser already has a tab on that exact Codex-Canvas URL, reuse it and make it visible. Do not open a duplicate tab or reload the page unless the user asks.
    • Do not repeat Browser plugin bootstrap/path discovery when a browser tab is already connected and usable in this turn; reuse the existing tab binding.
  3. Open the returned URL directly in the Codex in-app browser.
    • Use the Browser plugin / in-app browser control surface for this step. The intended result is that the canvas appears inside Codex, next to the chat.
    • Do not open the URL with the operating system default browser. Do not use open, xdg-open, start, PowerShell Start-Process, AppleScript, clipboard paste, coordinate clicking, or any desktop UI automation as a fallback.
    • Do not rely on the user clicking a printed URL; that commonly opens Chrome or the system default browser instead of Codex's in-app browser.
    • Whenever you show the canvas URL to the user, format it as a Markdown link: [Open Codex-Canvas](<url>). Do not show only a bare url field, because some Codex surfaces do not make that clickable.
    • If the Browser plugin / in-app browser control surface is unavailable in the current Codex surface, return a Markdown link and state that Codex-Canvas is running but the in-app browser could not be opened from this surface. Do not launch an external browser.
  4. When the user asks for image generation or image editing while this skill is active:
    • Use Codex imagegen for the image work.
    • Save or identify the generated image file path and keep the current Codex thread id attached to the canvas operation.
    • Immediately add the result to the canvas with codex-canvas.add_image, or by running: node <plugin-root>/bin/codex-canvas.mjs import <image-path> --project <workspace> --thread-id <thread-id>.
    • If the exact output path is unclear, call codex-canvas.collect_recent_images with the active workspace, or run: node <plugin-root>/bin/codex-canvas.mjs collect --project <workspace> --thread-id <thread-id> --since-minutes 30 --limit 5.
    • Default collection scans only ~/.codex/generated_images/<thread-id>. Without a bound thread it is a safe no-op. Use explicit roots / --from only for a user-requested manual recovery scan.
    • Session-generated images are placed in a vertical column by generation batch. Multiple images from the same generation batch are aligned in one horizontal row.
    • Canvas-derived images, when collected with a sourceObjectId, are placed in a horizontal row to the right of the source image.
  5. Quick Edit, Remove BG, Expand, Edit Text, and Edit Elements are implemented as background Codex-Canvas jobs. They create a canvas placeholder immediately, run Codex/ImageGen through the matching Codex-Canvas operation skill and bundled Codex App CLI, then replace the placeholder with the collected output.
  6. Edit Text is a two-step interaction: first run text recognition and show the formatted editable text list in the canvas UI; after the user changes one or more fields and clicks Run, call imagegen to produce the edited PNG.
    • Text recognition should try local RapidOCR first when available. If local OCR is unavailable, fails, or returns no text, fall back to Codex vision recognition.
  7. Edit Elements asks ImageGen for a low-detail instance segmentation map, then Codex-Canvas locally splits the source image into four-channel transparent PNG object/text layers plus a residual background. Codex-Canvas immediately imports the residual background and transparent object/text layers, stacks them to the right of the source image so they reconstruct the original composition, and continues a background-completion pass from the original image plus residual background in the background. When completion finishes, Codex-Canvas replaces the existing background layer asset in place and refreshes that layer. Intermediate segmentation and raw completion images stay internal to the job and are not added to the canvas.
  8. Canvas-to-chat requires a bound Codex thread. Each bound thread uses a separate canvas scope under canvas/threads/<canvasId>/. The frontend send-to-chat action sends a localImage turn through Codex app-server thread/resume + turn/start; MCP/HTTP callers may explicitly use mention-file for a Codex @file-style mention turn. The frontend @file toolbar button must not directly send a turn; it prepares/copies an @<absolute-path> reference for the user to paste into the Codex chat box. Do not use desktop UI automation or clipboard paste as a fallback.
Show full SKILL.md (41 more words)Show less

Notes

  • Canvas data is stored under <workspace>/canvas/.
  • The visible canvas runs as a local web service and is intended to be opened in Codex in-app browser.
  • The first milestone should preserve generated images as project assets, not only as chat attachments.

© Xiangyu-CAS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/canvas of Xiangyu-CAS/codex-canvas.

Open the folder on GitHubat commit b801839

Compare with similar skills

Canvas next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Canvas compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Canvas this skillXiangyu-CAS/codex-canvas137—~1.7kAutomated safety check: PassMIT
AI Image Generation and Editingzhayujie/CowAgent47k—~1.3kAutomated safety check: PassMIT
Structured Image Generationbytedance/deer-flow84k4 repos~2.9kAutomated safety check: PassMIT
Canghe Comicfreestylefly/canghe-skills4618 repos~3.2kAutomated safety check: PassNone
Generate Imageynulihao/AgentSkillOS61810 repos~1.7kAutomated safety check: NotesNone
GPT Image Generation CLIwuyoscar/GPT-Image2-Skill5.7k—~2.5kAutomated safety check: NotesMIT

Similar skills

  • Generates or edits images from text prompts through a Python script that picks an image backend based on which API keys are configured.

    47k GitHub stars~1.3k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Structured Image Generation

    bytedance/deer-flow

    Turns an image request into a structured JSON prompt and runs a bundled Python script to generate the picture, optionally guided by reference images.

    84k GitHub starsUsed in 4 repos~2.9k tokens
    Media & CreativeAuto-check passed
  • Canghe Comic

    freestylefly/canghe-skills

    Knowledge comic creator supporting multiple art styles and tones.

    461 GitHub starsUsed in 8 repos~3.2k tokens
    Media & CreativeAuto-check passed
  • Generate Image

    ynulihao/AgentSkillOS

    Generate or edit images using AI models (FLUX, Gemini). An agent skill from ynulihao/AgentSkillOS.

    618 GitHub starsUsed in 10 repos~1.7k tokens
    Media & CreativeAuto-check: notes
  • GPT Image Generation CLI

    wuyoscar/GPT-Image2-Skill

    Generates and edits images with GPT Image 2 or 2.5 through a packaged CLI and a prompt gallery, after settling which model fits the request.

    5.7k GitHub stars~2.5k tokensUpdated 11 days ago
    Media & CreativeAuto-check: notes
  • Minimal Zine Poster Generator

    LiamGvchi/gc-minimal-zine-poster

    Creates or analyzes quiet, paper-texture zine posters with big negative space, one color accent and experimental type, returning an image prompt and the generated poster.

    7.3k GitHub stars~2.9k tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed

More from Xiangyu-CAS/codex-canvas

  • Codex Canvas

    Xiangyu-CAS/codex-canvas

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

    137 GitHub stars~880 tokensUpdated 10 days ago
    Auto-check passed
  • Canvas Edit Elements

    Xiangyu-CAS/codex-canvas

    Generate an instance segmentation map for a selected Codex-Canvas image, split the source into transparent element layers, and collect the layers back onto the canvas.

    137 GitHub stars~1.1k tokensUpdated 10 days ago
    Auto-check passed
  • Canvas Quick Edit

    Xiangyu-CAS/codex-canvas

    Run a user-described Quick Edit on a selected Codex-Canvas image and collect the result back onto the canvas.

    137 GitHub stars~505 tokensUpdated 10 days ago
    Auto-check passed
  • Canvas Edit Text

    Xiangyu-CAS/codex-canvas

    Recognize visible text in a selected Codex-Canvas image, apply a user-described text edit with imagegen, and collect the result back onto the canvas.

    137 GitHub stars~365 tokensUpdated 10 days ago
    Auto-check passed
  • Canvas Expand

    Xiangyu-CAS/codex-canvas

    Outpaint a selected Codex-Canvas image beyond its current frame and collect the expanded image back onto the canvas.

    137 GitHub stars~390 tokensUpdated 10 days ago
    Auto-check passed
  • Canvas Remove Bg

    Xiangyu-CAS/codex-canvas

    Remove the background from a selected Codex-Canvas image and collect a transparent PNG result back onto the canvas.

    137 GitHub stars~400 tokensUpdated 10 days ago
    Auto-check passed

Questions about Canvas

What does Canvas do?

Open and use Codex-Canvas, a project-local infinite canvas for Codex image generation. Canvas is an agent skill from Xiangyu-CAS/codex-canvas. Open and use Codex-Canvas, a project-local infinite canvas for Codex image generation.

When should I use Canvas?

Canvas fits situations like: the user says /canvas; asks to open the canvas; wants generated images collected on a visual board.

How do I install Canvas in Claude Code?

Run `npx skills add Xiangyu-CAS/codex-canvas --skill canvas -a claude-code`. Or copy the skill folder (skills/canvas in Xiangyu-CAS/codex-canvas) into .claude/skills/canvas in your project. Claude Code loads it when a task matches its description.

How do I install Canvas in Codex?

Run `npx skills add Xiangyu-CAS/codex-canvas --skill canvas -a codex`. Or copy the skill folder (skills/canvas in Xiangyu-CAS/codex-canvas) into .agents/skills/canvas in your project. Codex loads it when a task matches its description.

Can I use Canvas in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Xiangyu-CAS/codex-canvas --skill canvas -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/canvas, .gemini/skills/canvas, .github/skills/canvas and .opencode/skills/canvas in your project.

What does Canvas need to run?

Going by SKILL.md and its folder, Canvas needs the command-line tools its instructions call (node).

Does Canvas access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Canvas safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Canvas use?

Canvas is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Canvas use?

About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Canvas?

Skills that share tags, products or a category with Canvas: AI Image Generation and Editing (zhayujie/CowAgent, 47k stars), Structured Image Generation (bytedance/deer-flow, 84k stars), Canghe Comic (freestylefly/canghe-skills, 461 stars) and Generate Image (ynulihao/AgentSkillOS, 618 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Canvas?

Xiangyu-CAS (a GitHub user) maintains it in Xiangyu-CAS/codex-canvas, which has 137 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 1, 2026.

Source: Xiangyu-CAS/codex-canvas on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.