canvas by markdown-viewer/skills
npx skills add https://github.com/markdown-viewer/skills --skill canvas快速开始: 使用 id、type、x、y、width、height 定义节点 → 在 100px 网格上规划布局 → 使用 fromNode/toNode 连接边 → 应用颜色 (1-6) → 用 ````canvas` 代码块包裹。原点 (0,0) 位于左上角,X 轴向右,Y 轴向下。兼容 Obsidian Canvas。
{
"nodes": [
{"id": "n1", "type": "text", "text": "Node 1", "x": 0, "y": 0, "width": 120, "height": 50}
],
"edges": []
}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 类型 | 必需字段 | 用途 |
|---|---|---|
text | text | 显示自定义文本内容 |
file | file | 引用外部文件 |
link | url | 外部 URL 引用 |
group | label | 用于分组的视觉容器 |
所有节点都需要:id、type、x、y、width、height
| 值 | 颜色 |
|---|---|
"1" | 红色 |
"2" | 橙色 |
"3" | 黄色 |
"4" | 绿色 |
"5" | 青色 |
"6" | 紫色 |
{
"id": "e1",
"fromNode": "n1",
"fromSide": "right",
"toNode": "n2",
"toSide": "left",
"toEnd": "arrow"
}
| 问题 | 解决方案 |
|---|---|
| 节点重叠 | 增加间距 (100+ px) |
| 边不可见 | 验证 fromNode/toNode 是否与节点 ID 匹配 |
| 无效 JSON | 检查引号和逗号 |
| ID 无效 | 仅使用 a-z, A-Z, 0-9, -, _ |
```canvas
{
"nodes": [...],
"edges": [...]
}
```
关于详细语法和高级功能,请参考以下资料:
每周安装量
74
代码仓库
GitHub 星标数
5
首次出现
2026 年 1 月 31 日
安全审计
安装于
opencode71
gemini-cli70
github-copilot70
codex68
kimi-cli66
amp66
Quick Start: Define nodes with id, type, x, y, width, height → Plan layout on 100px grid → Connect edges with fromNode/toNode → Apply colors (1-6) → Wrap in ````canvas` fence. Origin (0,0) at top-left, X right, Y down. Obsidian Canvas compatible.
{
"nodes": [
{"id": "n1", "type": "text", "text": "Node 1", "x": 0, "y": 0, "width": 120, "height": 50}
],
"edges": []
}
| Type | Required Fields | Purpose |
|---|---|---|
text | text | Display custom text content |
file | file | Reference external files |
link | url | External URL references |
group |
All nodes require: id, type, x, y, width, height
| Value | Color |
|---|---|
"1" | Red |
"2" | Orange |
"3" | Yellow |
"4" | Green |
"5" | Cyan |
"6" | Purple |
{
"id": "e1",
"fromNode": "n1",
"fromSide": "right",
"toNode": "n2",
"toSide": "left",
"toEnd": "arrow"
}
| Issue | Solution |
|---|---|
| Nodes overlapping | Increase spacing (100+ px) |
| Edges not visible | Verify fromNode/toNode match node IDs |
| Invalid JSON | Check quotes and commas |
| IDs invalid | Use only a-z, A-Z, 0-9, -, _ |
```canvas
{
"nodes": [...],
"edges": [...]
}
```
For detailed syntax and advanced features, refer to references below:
Weekly Installs
74
Repository
GitHub Stars
5
First Seen
Jan 31, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode71
gemini-cli70
github-copilot70
codex68
kimi-cli66
amp66
新闻稿撰写工具:使用 inference.sh CLI 进行事实核查与专业新闻稿创作
7,700 周安装
Datadog自动化监控:通过Rube MCP与Composio实现指标、日志、仪表板管理
69 周安装
Intercom自动化指南:通过Rube MCP与Composio实现客户支持对话管理
69 周安装
二进制初步分析指南:使用ReVa工具快速识别恶意软件与逆向工程
69 周安装
PrivateInvestigator 道德人员查找工具 | 公开数据调查、反向搜索与背景研究
69 周安装
TorchTitan:PyTorch原生分布式大语言模型预训练平台,支持4D并行与H100 GPU加速
69 周安装
screenshot 截图技能:跨平台桌面截图工具,支持macOS/Linux权限管理与多模式捕获
69 周安装
label |
| Visual container for grouping |