create-canvas
БесплатноБез исполняемых скриптовНе проверенAuthor, validate, and debug canvas extensions that the agent can open in the GitHub Copilot app's side panel. Use when creating, reviewing, or troubleshooting…
от github★ 5 758 звёзд на GitHubОб этом скилле
Extension Canvas Authoring
Use this skill when creating or debugging an extension canvas that integrates with the runtime canvas model.
The host app no longer participates in extension canvas registration. Extensions declare canvases directly to the runtime via the Copilot SDK on joinSession; the runtime routes provider callbacks (canvas.open, canvas.action.invoke, etc.) straight to the declaring connection; the host app just renders whatever URL the provider returns.
Authoring workflow (do this in order)
Decide the scope. Project (
.github/extensions/<name>/) is committed to the repo and shared with the team. User ($COPILOT_HOME/extensions/<name>/) is local to the current user. Session ($COPILOT_HOME/session-state/<sessionId>/extensions/<name>/) is loaded only for the current session — ideal for a throwaway canvas for one conversation. Unless the request makes it obvious, ask before creating files — the choice changes who sees the extension, whether it's committed, and the resultingextensionId.Scaffold via tool, don't hand-write the skeleton.
extensions_manage({ operation: "scaffold", kind: "canvas", name: "<name>", location: "project" | "user" | "session" })The scaffold produces
extension.mjswith a loopback server per instance, an example action, andonClosecleanup. ImportjoinSessionandcreateCanvasfrom@microsoft/copilot-sdk/extension. In v1 scaffolds, move the barecanvasesandtoolsarrays intocanvases.definitionsandtools.definitions,hooksintohooks.handlers, andonPermissionRequestintopermissions.onRequest, as shown below.Edit the file. Implement your
open,actions[], optionalonClose, and (if needed) tools/hooks alongside.Reload. Call
extensions_reload. Stale canvas instances flip tostale, then back toreadyonce the provider reconnects.Verify. Call
extensions_manage({ operation: "list" })andextensions_manage({ operation: "inspect", name: "<name>" }). If the extension is marked failed,inspectsurfaces the log file path and a tail — that log is the primary debugging surface.Drive it. Run the validation checklist below via
list_canvas_capabilities,open_canvas, andinvoke_canvas_action.
Extension shape
A canvas extension is a Copilot CLI extension running as a forked Node process that speaks JSON-RPC over stdio to the CLI.
- Entry file must be named
extension.mjs(ES modules only; TypeScript is not supported). - Discovery scans only immediate subdirectories of
.github/extensions/(relative to git root),$COPILOT_HOME/extensions/, and$COPILOT_HOME/session-state/<sessionId>/extensions/. - The runtime auto-derives a stable
extensionIdof${source}:${name}(e.g.project:my-extension); session-scoped extensions embed the session id assession:<sessionId>:<name>. - Use a Copilot CLI that resolves
@microsoft/copilot-sdk/extensionautomatically (such as 1.0.113). Do not add apackage.jsonornode_modulesfor it. stdoutis reserved for JSON-RPC. Neverconsole.log. Usesession.log(message, { level, ephemeral }).- Tool names must be globally unique across all loaded extensions — collisions cause the second extension to fail.
joinSession signature
import { joinSession, createCanvas, CanvasError } from "@microsoft/copilot-sdk/extension";
const session = await joinSession({
canvases: { definitions: [createCanvas({ /* ... */ })] },
tools: { definitions: [/* optional */] },
hooks: { handlers: {/* optional */} },
permissions: { onRequest: async (request) => ({ kind: "approve-once" }) }, // optional
});
// session.sessionId, session.workspacePath (string | undefined),
// session.send, session.sendAndWait, session.log, session.on, session.rpc
Canvas API (canvas.d.ts)
import { createCanvas, CanvasError, joinSession } from "@microsoft/copilot-sdk/extension";
const canvas = createCanvas({
id: "main", // unique within this extension
displayName: "My canvas", // human-readable label shown in host chrome
description: "Short summary the agent sees in the system-prompt canvas catalog.",
inputSchema: { /* JSON Schema for open input (optional) */ },
actions: [
{
name: "do_thing", // unique within this canvas; MUST NOT start with `canvas.`
description: "...",
inputSchema: { /* JSON Schema (optional) */ },
handler: async (ctx) => {
// ctx: { sessionId, extensionId, canvasId, instanceId, actionName, input, host }
// Return raw result; throw CanvasError("code", "message") for errors.
return { /* ... */ };
},
},
],
open: async (ctx) => {
// ctx: { sessionId, extensionId, canvasId, instanceId, input, host }
// Idempotent: same instanceId may arrive again after provider reconnect.
re
Установить create-canvas в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл create-canvas?
Author, validate, and debug canvas extensions that the agent can open in the GitHub Copilot app's side panel. Use when creating, reviewing, or troubleshooting a canvas extension — including its actions, inputs, rendered content, and the surrounding extension wiring (tools, hooks, lifecycle).
Как установить скилл create-canvas?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл create-canvas запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic