Skip to main content

cowart-canvas-workflow

Open and operate a bundled Cowart/tldraw local canvas for Codex projects. Use when the user asks to open a Cowart canvas, use an infinite visual canvas, insert generated images into a project canvas, preserve before/after image revisions, or apply Cowart annotation screenshots by generating clean revised images beside originals.

Jump to install

Source facts

Repository
liyujinyu/cowart-canvas-skill
Last source activity
June 21, 2026 at 08:36
Detected SKILL.md language
English
Stars
28
Forks
4

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
cowart-canvas-workflow
description
Open and operate a bundled Cowart/tldraw local canvas for Codex projects. Use when the user asks to open a Cowart canvas, use an infinite visual canvas, insert generated images into a project canvas, preserve before/after image revisions, or apply Cowart annotation screenshots by generating clean revised images beside originals.
# Cowart Canvas Workflow ## Core Rules - Use the active Codex workspace as the project directory unless the user gives another directory. - Save Cowart data in `<projectDir>/canvas/`; do not save user canvas data inside the skill folder. - Never delete or move the original image or annotation marks when creating a revised image. - For annotation edits, use the user-provided screenshot as the edit brief. Do not infer edit intent by scanning unrelated canvas content. - After generating or editing images, keep final project-bound images in the project, then insert or paste them into Cowart. ## Open Canvas Run the bundled service: ```bash <skill-dir>/scripts/start-canvas.sh /absolute/path/to/project ``` Open the printed `Cowart canvas:` URL in the Codex in-app browser. Default URL is: ```text http://127.0.0.1:43217/ ``` If the script prints a different port, use that exact URL. If startup fails with `listen EPERM`, request permission to run the local service outside the sandbox. ## Insert Image Use the bundled insert script for project-local images: ```bash node <skill-dir>/scripts/insert-image.mjs \ --image /absolute/path/to/image.png \ --project-dir /absolute/path/to/project \ --canvas-url http://127.0.0.1:43217 ``` Useful options: - `--anchor selected`: place beside the selected shape. - `--anchor first-image`: place beside the largest image on the current page. - `--placement right`: default before/after layout. - `--dry-run`: calculate position without writing files or canvas state. - `--meta-json '{"cowartGeneratedFromAnnotationEdit":true}'`: add metadata for generated revisions. The script copies the image into `canvas/pages/<page-id>/assets/`, creates a tldraw image asset and shape, and saves through `/api/canvas`. ## Annotation Edit Flow 1. Read the supplied Cowart screenshot. 2. Extract visible edit notes, arrows, and target regions from that screenshot. 3. Generate a clean revised bitmap without annotation arrows, labels, selection handles, or UI chrome. 4. Save the bitmap in the project with a versioned filename. 5. Insert the revision beside the original image with `scripts/insert-image.mjs`. 6. Verify that the original image and annotations are still visible. ## Extra Reference Read `references/cowart-workflow.md` when you need command examples, API details, or troubleshooting.
View on GitHub