Agent SkillsNiall-Young/Canvasight › canvasight-imagegen

canvasight-imagegen

GitHub

调用系统图像生成技能,将生成的位图作为资产节点导入Canvasight页面。严格遵循工作流获取上下文、执行生成及验证,并支持产品设计选项探索流程。

plugins/canvasight/skills/canvasight-imagegen/SKILL.md Niall-Young/Canvasight

Trigger Scenarios

用户要求生成新图像 使用@Canvasight指令 请求绘制或渲染新图像

Install

npx skills add Niall-Young/Canvasight --skill canvasight-imagegen -g -y
More Options

Non-standard path

npx skills add https://github.com/Niall-Young/Canvasight/tree/main/plugins/canvasight/skills/canvasight-imagegen -g -y

Use without installing

npx skills use Niall-Young/Canvasight@canvasight-imagegen

指定 Agent (Claude Code)

npx skills add Niall-Young/Canvasight --skill canvasight-imagegen -a claude-code -g -y

安装 repo 全部 skill

npx skills add Niall-Young/Canvasight --all -g -y

预览 repo 内 skill

npx skills add Niall-Young/Canvasight --list

SKILL.md

Frontmatter
{
    "name": "canvasight-imagegen",
    "description": "Generate new raster images with Codex imagegen and add every final result to the active Canvasight Page as a managed Asset Node. Use when the user invokes @Canvasight or otherwise asks to generate, create, draw, or render a new image directly into Canvasight. Do not use for editing an existing Canvasight Asset in place."
}

Canvasight Image Generation

Generate with the system $imagegen Skill, then import the accepted bitmap outputs through Canvasight's atomic generated-image tool. Never hand-edit .scatter, pass an unmanaged path to write_canvasight_graph, or substitute browser automation.

Workflow

  1. Read the active task's exact CODEX_THREAD_ID.
  2. Reuse a Canvasight native widget only when this task already has verified fullscreen ready evidence. Otherwise follow canvasight-open: call open_canvasight with that threadId, preserve its sessionId and openAttemptId, then call await_canvasight_widget_ready. Stop before generation unless the result is verified status: "ready" with React, project hydration, rendered canvas, and visible non-zero canvas evidence.
  3. Call get_canvasight_graph_context with the same threadId. Preserve its projectPath, contextId, documentRevision, and active Page identity before starting image generation. Later Page switches must not retarget the import.
  4. Invoke the system $imagegen Skill. Use its built-in tool path by default, one call per requested final image or variant. Follow its transparency, inspection, retry, and CLI-consent rules exactly.
  5. Keep only outputs that pass imagegen inspection. Call add_canvasight_generated_images with:
    • the exact threadId and captured projectPath;
    • the captured contextId and documentRevision as expectedRevision;
    • one stable unique clientMutationId for this exact batch, reused only for retries;
    • one { "path", "title"? } entry per final image, in the requested display order.
  6. Treat written, merged, and conflict-copy as successful imports. Report the target Page, created node count, managed project-relative paths, final prompt set, and whether imagegen used the built-in or user-approved CLI path.

Product-design option flow

When the request is to explore a product or UI design before frontend implementation:

  1. Resolve the target surface, intended user, outcome, viewport, and hard constraints before generation.
  2. Unless the user specifies another count, generate exactly three independent UI images. Each image is one distinct direction with a meaningfully different hierarchy, layout, or interaction model; never combine multiple directions into one image.
  3. Import all accepted options as separate Asset Nodes in their visible result order, then stop so the user can connect the preferred image into the ordinary canvas flow. Do not choose a direction or start implementation on the user's behalf.
  4. Run continues to start only from executable Task or Group surfaces. For this option flow, run the ordinary Task flow: connected image Assets travel with that Task exactly like node attachments did, while generated images outside its reachable flow are unrelated. An Asset never runs independently, and no separate selection marker or persisted role is needed.
  5. If the project exposes a matching product-design or image-to-code Skill, it may be named visibly in the downstream Task body. Do not persist a hidden Skill assignment or assume that an unavailable external Skill is installed.

Boundaries

  • This Skill creates new PNG, JPEG, or WebP Asset Nodes only. Do not use it to mutate or replace an existing Canvasight Asset.
  • Import at most 16 final images per tool call. For a larger explicit request, use successive batches without dropping results.
  • Do not generate anything when native Canvasight opening or ready verification fails; the requested result could not be delivered to the canvas.
  • If imagegen fails, do not create a placeholder node. If import fails, keep the generated source and report the actionable Canvasight error.
  • On context_expired or context_revision_mismatch, do not guess a different Page. Explain that the captured Page binding expired and ask the user to repeat the image request.
  • Never expose daemon URLs, tokens, or managed absolute paths in the user-facing result.

Version History

  • c0bdccb Current 2026-08-12 11:05

Same Skill Collection

plugins/canvasight/skills/canvasight-open/SKILL.md
plugins/canvasight/skills/canvasight-run/SKILL.md
plugins/canvasight/skills/canvasight-update/SKILL.md
plugins/canvasight/skills/canvasight/SKILL.md
plugins/canvasight/skills/canvasight-agent-team/SKILL.md
plugins/canvasight/skills/canvasight-graph-writer/SKILL.md
plugins/canvasight/skills/canvasight-troubleshooting/SKILL.md

Metadata

Files
0
Version
c0bdccb
Hash
603a88f7
Indexed
2026-08-12 11:05

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-13 05:17
浙ICP备14020137号-1 $お客様$