Create or register a canvas extension in the awesome-copilot repository. Use when asked to scaffold a new canvas extension, create its plugin.json, add a reusab
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-create-canvas-extension-d37b87e15313 ,按照其中的说明把「create-canvas-extension」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use this skill only for the github/awesome-copilot repository. Canvas extensions are reusable source components. They do not have a plugin.json under extensions/.
Before creating files, ask for each missing value:
1.0.0)MIT when appropriate)extension.mjs. If not, create a minimal entrypoint only when the user provides enough implementation details; otherwise create the directory and leave an explicit TODO.assets/preview.png path or ask the user to add it. Do not invent a binary image or silently use a misleading placeholder.plugins/<extension-id>../extensions/<extension-id> to that plugin's extensions.com.github.awesome-copilot.extensions.For a new extension plugin, create this structure:
extensions/<extension-id>/
├── extension.mjs
└── assets/
└── preview.png
plugins/<extension-id>/
├── plugin.json
└── README.md
The extension source may contain additional files such as package.json, canvas assets, or supporting modules. Keep all reusable implementation files under extensions/<extension-id>/.
Create plugins/<extension-id>/plugin.json with this shape:
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "<extension-id>",
"description": "<description>",
"version": "1.0.0",
"author": {
"name": "<author>"
},
"repository": "https://github.com/github/awesome-copilot",
"license": "MIT",
"keywords": [
"<keyword>"
],
"extensions": {
"com.github.copilot": {
"logo": "assets/preview.png"
},
"com.github.awesome-copilot": {
"extensions": [
"./extensions/<extension-id>"
]
}
}
}
Keep Agent Plugins fields at the manifest top level. Repository composition belongs only under extensions.com.github.awesome-copilot; do not put agents, commands, hooks, or skills at the top level or directly under extensions. MCP servers are declared in mcp.json at the plugin root, never in plugin.json. Do not add x-awesome-copilot, standalone, or other repository-specific top-level fields.
For an existing parent plugin, create or update:
plugins/<parent-plugin>/plugin.json (`extensions.com.github.awesome-copilot.extensions`)
Its extensions property must contain sorted repository-relative paths:
{
"extensions": [
"./extensions/<extension-id>"
]
}
Do not copy the extension source into the parent plugin. Materialization resolves the IDs from the root extensions/ directory, so the same source can be bundled by multiple plugins.
Inspect the repository before editing:
extensions/<extension-id> and plugins/<extension-id> do not already conflictAsk only the missing required questions from the decisions above.
Create the source and plugin directories with the required files.
If creating a new entrypoint, keep it minimal and clearly mark implementation TODOs rather than fabricating behavior.
Add or update extensions.com.github.awesome-copilot.extensions for every parent plugin that should ship the extension. Keep paths alphabetically sorted and unique.
Ensure there is no extensions/<extension-id>/.github/plugin/plugin.json.
Run:
npm run plugin:validate
npm run build
npm run website:data
Report the created paths, the plugins that ship the extension, and any missing user-provided assets or TODOs.
When migrating an existing extension:
plugins/<extension-id>/plugin.json.extensions.com.github.copilot.logo shape.extensions/<extension-id>.extensions.com.github.awesome-copilot.extensions.