cowart-image-gen
Generate a bitmap for the Cowart canvas via Astravia generate_image, then insert or replace via Cowart MCP. Use when the user asks to create, fill, replace, or place an AI-generated image on a Cowart canvas.
Install
npx skills add https://github.com/maomaochong-ai/open-astravia/tree/main/packages/plugins/externals/cowart-astravia/agent/skills/cowart-image-gen
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install maomaochong-ai-open-astravia@llmmart
git clone https://github.com/maomaochong-ai/open-astravia.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole maomaochong-ai/open-astravia collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Cowart Image Gen (Astravia)
Astravia image tools (required)
| Intent | Tool |
|---|---|
| Brand-new image / fill AI image holder / invent a scene | generate_image |
| Revise an existing image or annotation screenshot | edit_image (use cowart-image-edit skill) |
Do not use an imagegen skill or ad-hoc scripts. After the bitmap exists on disk, place it with Cowart MCP insert_cowart_image.
Preconditions
Cowart MCP tools should be available (plugin cowart-astravia enabled). Prefer opening the canvas first (open_cowart_canvas).
Workflow
Read selection with MCP
get_cowart_selection(projectDir= user workspace).If exactly one selected shape is an AI image holder (
isAiImageHolderormeta.cowartAiImageHolder), use holder size (props.w/props.h) as the generation contract.Call
generate_imageto produce the bitmap. Resolve the real local output path.Call MCP
insert_cowart_imagewithprojectDirand that image path:- Holder selected → prefer replace the holder (
replaceAiImageHolder: true). - Otherwise insert onto the current page (from view/canvas state).
- Holder selected → prefer replace the holder (
Constraints
- Pass user projectDir, not the plugin root.
- Keep original holders only if the user asks to preserve slots.
- Include target aspect ratio in the
generate_imageprompt when replacing a holder.
Files (open-astravia)
-
SKILL.md 1.6 KB
--- name: cowart-image-gen description: Generate a bitmap for the Cowart canvas via Astravia generate_image, then insert or replace via Cowart MCP. Use when the user asks to create, fill, replace, or place an AI-generated image on a Cowart canvas. --- # Cowart Image Gen (Astravia) ## Astravia image tools (required) | Intent | Tool | |--------|------| | Brand-new image / fill AI image holder / invent a scene | **`generate_image`** | | Revise an existing image or annotation screenshot | **`edit_image`** (use `cowart-image-edit` skill) | Do **not** use an `imagegen` skill or ad-hoc scripts. After the bitmap exists on disk, place it with Cowart MCP `insert_cowart_image`. ## Preconditions Cowart MCP tools should be available (plugin **cowart-astravia** enabled). Prefer opening the canvas first (`open_cowart_canvas`). ## Workflow 1. Read selection with MCP `get_cowart_selection` (`projectDir` = user workspace). 2. If exactly one selected shape is an AI image holder (`isAiImageHolder` or `meta.cowartAiImageHolder`), use holder size (`props.w` / `props.h`) as the generation contract. 3. Call **`generate_image`** to produce the bitmap. Resolve the real local output path. 4. Call MCP **`insert_cowart_image`** with `projectDir` and that image path: - Holder selected → prefer **replace** the holder (`replaceAiImageHolder: true`). - Otherwise insert onto the current page (from view/canvas state). ## Constraints - Pass **user projectDir**, not the plugin root. - Keep original holders only if the user asks to preserve slots. - Include target aspect ratio in the `generate_image` prompt when replacing a holder.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.