create-canvas

Author, validate, and debug Copilot CLI canvas extensions rendered in the app side panel.

5.1k|530|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/github/gh-aw --skill create-canvas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-canvas
Source: https://github.com/github/gh-aw/tree/main/.github/skills/create-canvas
Command: npx skills add https://github.com/github/gh-aw --skill create-canvas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @github/copilot-sdk.

What problem does it solve?

Building a canvas extension for the GitHub Copilot app involves a specific runtime contract — JSON-RPC over stdio, joinSession declaration, loopback HTTP servers, and a three-part ID model — and small mistakes like a stray console.log or a reserved action name silently break the extension. This Skill provides the exact authoring workflow, API reference, and debugging checklist to get a canvas working.

Core Features & Use Cases

  • Guided authoring workflow: Scaffold a canvas extension via extensions_manage, edit extension.mjs, reload, and verify with list/inspect operations.
  • Canvas API reference: Covers createCanvas, open, actions[] handlers, onClose, input schema validation, and the loopback server pattern with Server-Sent Events.
  • Validation and debugging checklist: Step-by-step verification of discovery, open, action invocation, input validation errors, and reserved-verb rejection, plus log-based troubleshooting.
  • Use Case: You want a triage board panel inside the Copilot app. Use this Skill to scaffold a project-scoped canvas extension, implement an action that refreshes issue data, and validate it end-to-end with open_canvas and invoke_canvas_action.

Quick Start

Ask the agent to scaffold a new project-scoped canvas extension named triage-board and walk through implementing and validating its open handler and actions.

Frequently Asked Questions about create-canvas

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a canvas extension for the GitHub Copilot app?

Scaffold it with extensions_manage using operation scaffold, kind canvas, and a chosen location (project, user, or session). This generates an extension.mjs with joinSession, a createCanvas declaration, a loopback HTTP server, and an example action that you then edit and reload.

How do I debug a Copilot canvas extension that fails to load?

Run extensions_manage with operation list to check whether the extension is marked failed, then operation inspect to view its log file path and tail. After any edit, call extensions_reload before retrying, and confirm the file is named exactly extension.mjs in a discovered directory.

Can I use TypeScript or console.log in a Copilot CLI extension?

No. Extensions must be a single extension.mjs file using ES modules; TypeScript is not supported. stdout is reserved for JSON-RPC, so console.log corrupts the protocol — use session.log with a level and ephemeral flag instead.

What is the difference between canvasId, extensionId, and instanceId?

canvasId identifies the canvas type declared by the extension, extensionId is the auto-derived source:name identifier used only to disambiguate duplicate canvasIds, and instanceId is a caller-chosen handle for one running panel. invoke_canvas_action requires an instanceId, not a canvasId.

Why does my canvas action return canvas_reserved_action_name?

Action names starting with the canvas. prefix are reserved by the runtime and rejected at declaration or invocation time. Rename the action to a custom verb that is unique within the canvas and does not use the reserved prefix.