dtyq/magic/canvas-manager
Claude Code and agent skill by dtyq/magic
- community
Checking that the SKILL.md file is still in the repository.
Manage a Canvas through its business tools only — initialize and query projects, create Elements and Content candidates, frame Elements, wait on generation, and process design markers. Use when the user asks to create, edit, or generate anything on a Canvas, such as images, videos, storyboards, video edits, or a final composed video, or when the message contains [@design_canvas_project:...] or [@design_marker:...]. Also use when the user says 'generate an image on my canvas', 'make a video from…
Install
npx vskill@latest install dtyq/magic/canvas-managerSKILL.md
The same SKILL.md was published earlier as dtyq/magic/canvas-manager.
Canvas Manager
Purpose
You maintain a Canvas through its business tools first. Every normal read and write goes through these tools in Code mode. Only the controlled recovery fallback described below may read or edit the target project's magic.project.js after the Canvas tools cannot complete a user-requested repair.
Ground rules
- Act only on a concrete Canvas task from the user.
- Call Canvas tools only in Code mode and continue decisions only from
result.content. - Preserve the exact
project_pathsupplied by the user or runtime; never guess, shorten, or replace it. - Treat every Canvas path returned by a query or write result as authoritative. A path such as
./images/foo.webpis relative to the current Canvas project, not automatically relative to the workspace. Reuse it verbatim for Canvas generation fields. When passing that asset to a workspace-anchored tool such asvisual_understanding, convert it deterministically to a workspace-relative path by prefixing the exact currentproject_path(for example,My Canvas+/images/foo.webpbecomesMy Canvas/images/foo.webp); do not guess a directory, filename, or Element ID. If the returned path is already workspace-relative or the conversion is ambiguous, query the exact Element details and stop rather than inventing a path. - When an existing video needs FFmpeg or another media transformation, perform the transformation in a system temporary directory first. Keep the Canvas workspace dedicated to persistent project assets and Canvas state. Import the completed result only after the runtime capability returns an exact Canvas-importable media reference, then use the imported result for later Canvas operations.
- Treat an uploaded image that already appears as a Canvas Image Element as an existing asset, not a new import candidate. Query the Canvas first, then reuse its exact
element_id, Content ID, and project-relativesrcfor visual understanding and generation. Do not calladd_canvas_elementswithsource=importedfor that same asset. Import only when the supplied workspace file has no matching Canvas Element. - Write
prompt,name, and all user-facing text (plans, descriptions, confirmation messages) in the user's language. Keep tool names, parameter names, IDs, paths, and code identifiers unchanged. - Use one language consistently for user-facing Canvas terminology. Translate product nouns, table labels, action text, confirmation questions, cost summaries, status summaries, and error explanations into the user's language; do not mix translated sentences with English product nouns.
- Match Canvas product terminology to the user's language. Use these established term pairs when responding:
画布 = Canvas, 积分 = Points, 元素 = Element, 内容 = Content, 连接 = Connection, 分镜 = Storyboard, 视频剪辑 = Video Edit, 图片 = Image, 视频 = Video, 音频 = Audio, 项目 = Project, and 预估费用 = Estimated cost. Use the Chinese term set consistently in Chinese responses and the English term set consistently in English responses.
- Keep exact tool names, parameter names, IDs, paths, code identifiers, and protocol values unchanged inside code or when identifying a returned field. In prose, use the product terminology that matches the user's language.
- Keep each sentence and its product terms in one language. For example, in an English response write
Estimated cost: 151 Points. Confirm to submit the generation task.For other languages, translate both the sentence and the product terms consistently. - Examples use a one-level, space-free path such as
Demo. This is only an example convention; when the user or runtime provides a path, preserve that exact path, including valid nested directories or spaces. - Never use file, directory, or shell tools to inspect or modify Canvas state during normal operations. The only exception is the controlled
magic.project.jsrecovery fallback described in the asset-reconciliation reference. - Reuse the exact
element_id,content_id,connection_id, andgeneration_task_idreturned by earlier results; never guess IDs from names or positions. - Element/Content deletion and batch file rename require the scope-bound human confirmation in
references/element-management.mdorreferences/naming.md. Never infer confirmation from a tool success or a default answer. - Connection deletion or replacement requires an exact Connection ID and explicit user intent.
- A generated Content may be retried at most 2 times, only when its status is explicitly
failed, and only with the user's explicit consent; never loop retries automatically and never retrypending,processing,queued,running, orcompletedContent. - A timeout or a
pending,processing,queued, orrunningstate is a waiting state, not a failure. Waiting for an asynchronous task is conditional: wait when the next step needs the completed media, its path, dimensions, status, or user preview; otherwise return the submitted state and preserve the exact task ID for later tracking. When waiting, use bounded follow-up calls with the same generation task ID and never submit a duplicate generation request. Only an explicit failed status enters the retry flow. - The first Content of any Element is automatically its main Content; never ask whether to make it main and never call the main-selection tool for it. For a later candidate appended to an Element that already has a main Content, show the completed candidate and select it as main only after explicit user confirmation. Revising a Content never overwrites it. Image revisions normally create independent Elements; append image Content only when the user explicitly requests versions inside one Element.
- Billed video generation requires an independent point-estimation step and explicit user confirmation before submission. The estimate ID is not a generation-tool credential.
- Re-query after any write when the next step depends on persisted state.
- Provider-managed asset URIs such as
asset://...are generation references, not workspace files. Never pass them tovisual_understanding, file tools, import tools, or Canvas queries that expect a local media path. - You may read every Element type. You may create or change Content only for
frame,storyboard,video-edit,image,video, andaudio. - Never create
text,rectangle,ellipse,triangle,star, orgroup, change their Content or main selection, or retry them. Dedicated management tools may rename, arrange, frame or remove existing Elements without unlocking them; read the matching reference first.
Mandatory request preflight
Before every write-tool call, validate the request against the minimum structures below. Do not depend on server errors to discover omitted fields, and do not substitute similarly named fields for protocol fields.
add_canvas_elements: every item must have a uniqueitem_refand a validelement_type. Whencontentis present, it must explicitly providesourceandcontent_type. Generated image/video Content must have anamethat describes the actual result. Imported Content must haveasset_pathand the correctcontent_type. Every entry inconnectionsmust containsource_element_id; keep a stableitem_reffor every item so batch results remain traceable.add_canvas_contents: every item must containitem_ref, the exactelement_id, andcontent. Content must explicitly providesourceandcontent_type; generated image/video Content must havename. Never substituteelement_id,content_id, anditem_reffor one another.manage_canvas_connections: every item must have a uniqueitem_ref. Creation or replacement requires exactsource_element_idandtarget_element_id; removal or replacement also requires the exact queried Connection ID and explicit user intent.- Generation tasks: when a write result returns
generation_task_id, decide whether the current workflow needs the completed media immediately. Wait when a downstream operation, confirmation, or final response depends on it; otherwise keep the submitted result and preserve the exactgeneration_task_id,element_id,content_id, anditem_reffor later tracking. A timeout or apending,processing,queued, orrunningstate is not a failure and must not trigger another generation submission. Only an explicitstatus=failedenters controlled retry. - Paths: Canvas-returned
./images/...,./videos/..., and./audios/...paths are for fields scoped to the current Canvas project. Before passing one to a Workspace tool, combine the exactproject_pathwith the project-relative path after removing its leading./. Without an authoritative returned path, never construct one from a name, directory guess, or file listing.
If the preflight cannot be satisfied, query the current Canvas state or report the missing information to the user. Do not bypass preflight with guessed values, empty strings, placeholder IDs, or extra file operations.
Capabilities
You can:
- Initialize, restore, and query Canvas projects.
- Create Frames, Storyboards, Video Edits, and media Elements; generate images and videos; import media assets.
- Create or add the first Content as the automatic main Content; append later candidates, retry failed Content, and select an appended candidate as main after user confirmation.
- Frame sibling Elements.
- Track async generation tasks and wait only when the current workflow needs a completed result.
- Process
[@design_marker:...]annotations into image revisions. - Search the curated prompt library for inspiration when the user has no idea (
search_canvas_image_prompts).
Layout strategies, Connections, video point estimation, final video composition, image search, asset reconciliation, and prompt inspiration are covered in the references below.
Real-asset repair boundary
When the user asks to restore real assets from .tmp, another Workspace location, or an explicitly supplied local absolute path, use only source paths that actually exist and were supplied by the user or system. Never create, download, generate, copy, or rename substitute files. Never use shell commands such as mkdir or cp to modify Canvas state, and never represent a missing source file as a successful repair.
If the original asset is missing, inaccessible, or cannot be mapped reliably to a supplied local path, report that no real asset is available for repair and stop the import. After a successful import, call query_canvas_element_details with the exact returned element_id and verify the actual Content, status, and media path. Never claim that restoration is complete from an overview, file listing, or name alone.
When the user has explicitly requested a Canvas repair and the available Canvas tools cannot complete it, use the controlled magic.project.js recovery fallback in references/asset-reconciliation.md. Modify only the exact target project's file, preserve its JSONP wrapper and unrelated fields, decode and re-encode only the MAGICPROJECTDESIGNDATA:// canvas value with gzip + Base64, keep sidecars and version fields intact, write atomically, and re-read the file to verify the repaired pointers. Do not use this fallback for ordinary Canvas edits, unsupported project versions, or guessed project paths.
Execution and test-reporting boundary
When reporting a Canvas workflow, distinguish passed, initial call failed but recovered, partially passed, external resource failed, skipped at the user's request, not tested, and invalid test. A task that completes after a wait timeout is a recovery case, not a generation failure. An external candidate download or validation failure is not automatically a Canvas workflow failure. Never claim full coverage, end-to-end success, or a 100% success rate for tools or stages that were not actually executed.
You cannot:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbackend/super-magic/agents/skills/canvas-manager/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dtyq/magic/canvas-manager)