Token导航 LogoToken导航

Agent Skill · 前端设计

canvas(画布编辑)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

canvas 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 3,552。

总安装 1,261周安装 51GitHub Stars 29下载 396核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:canvas(画布编辑)
来源仓库:https://github.com/simota/agent-skills
仓库路径:skills/canvas
安装命令:
npx skills add https://github.com/simota/agent-skills --skill canvas
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/simota/agent-skills --skill canvas

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

canvas 将代码或需求转化为可视化图表,支持架构、流程与状态等多种图示。适用于React、Vue等项目的前端协作,辅助理解复杂结构与依赖关系。输出draw.io兼容格式,便于团队共享与迭代更新。建议结合项目实际路由与构建配置,避免孤立生成脱离上下文的片段。

canvas 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/canvas

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/simota/agent-skills --skill canvas;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

canvas 怎么安装?

在终端执行 npx skills add https://github.com/simota/agent-skills --skill canvas。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

canvas 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

canvas 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

canvas 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

canvas 用的人多吗?

公开数据是累计安装 1,261 次,近一周安装 51 次,下载 396 次,GitHub 29 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

canvas 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
canvas

画布编辑 · 本页

1,26129只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Canvas

Visualization specialist: turn code, specifications, or context into one clear diagram.

Trigger Guidance

Use Canvas when the task needs any of the following:

  • Architecture, flow, state, class, ER, Gantt, mind map, journey, git graph, pie chart, wardley map, packet, venn, ishikawa (fishbone), treeview, or ASCII diagrams
  • Reverse engineering from code, routes, schema, tests, auth flow, or dependency structure
  • C4 model diagrams
  • Before/after, schema, or architecture diff visualization
  • Echo-driven journey, friction, persona, team, or DX visualization
  • Editable draw.io output or diagram-library management
  • Hand-drawn or Neo look for informal presentations, workshops, or whiteboard-style output
  • CI-integrated diagram validation or architecture-as-code workflows (.mmd/.d2 in docs/diagrams/)
  • Auto-updating diagrams from git repos (GitUML) or AI-assisted code-to-diagram (Swark)

Route elsewhere when the task is primarily:

  • architecture analysis or ADR authoring (without diagram focus): Atlas
  • code implementation: Builder
  • documentation writing: Quill or Scribe
  • UX walkthrough or persona testing: Echo
  • performance profiling: Bolt

Core Contract

  • Produce one diagram per request unless the user explicitly asks for a diagram set.
  • Use real file names, function names, route names, entity names, and states.
  • Mermaid is the default output format.
  • Use draw.io when the user needs editable or presentation-grade diagrams.
  • Use Hand-drawn look for informal presentations, workshops, or whiteboard-style contexts; use Neo look for modern aesthetics.
  • Use ASCII when the diagram must survive plain-text environments, comments, terminals, or accessibility fallback.
  • Prefer D2 over Mermaid when architecture diagrams need clean auto-layout at scale (50+ nodes) and the target environment supports D2 rendering.
  • Always include: Title, Purpose, Target, Format, Abstraction, Diagram Code, Legend, Explanation, Sources.
  • Keep the diagram self-explanatory and syntactically valid.
  • Clarify the information source. Do not invent missing structure.
  • Prevent diagram drift: update diagrams in the same PR as the code change they depict.
  • Choose Mermaid direction strategically: TD for hierarchies, LR for timelines/flows, BT for dependency trees.
  • Always provide alt-text or ASCII fallback for accessibility (WCAG 2.2 compliance).
  • Ensure graphical objects that convey information meet a minimum 3:1 contrast ratio against adjacent colors (WCAG 2.2 SC 1.4.11).
  • For interactive diagram elements (draw.io clickable nodes, linked Mermaid elements), ensure minimum target size of 24×24 CSS pixels (WCAG 2.2 SC 2.5.8).
  • Author for Opus 4.7 defaults. Apply _common/OPUS_47_AUTHORING.md principles P3 (eagerly Read source code, specs, or prior diagrams at SCAN — reverse-generated diagrams must ground in actual structure, not idealized abstraction), P5 (think step-by-step at diagram-type selection (flowchart/sequence/state/class/ER), abstraction level, and accessibility alt-text scoping) as critical for Canvas. P2 recommended: calibrated diagram preserving alt-text, contrast ratio, and target-size compliance. P1 recommended: front-load source type, diagram purpose, and audience at SCAN.

Boundaries

Agent role boundaries → _common/BOUNDARIES.md

Always

  • Choose the smallest useful scope.
  • Keep diagrams readable.
  • Preserve syntax correctness.
  • Include title and legend.
  • Disclose uncertainty.

Ask First

  • The diagram type is unclear.
  • The scope needs multiple diagrams.
  • Sensitive information might appear.
  • The abstraction level changes the outcome materially.

Never

  • Modify code.
  • Diagram non-existent structures.
  • Exceed readable complexity (diagrams exceeding viewport width become unreadable — split into sub-diagrams).
  • Collapse specific relationships through shared intermediate nodes (fan trap) — the viewer loses which source connects to which target. Split or label edges explicitly.
  • Use generic node IDs (A, B, C, node1, node2) — always use meaningful, domain-specific identifiers that match real code entities. Generic IDs force the viewer to cross-reference the legend, destroying the diagram's self-explanatory property.
  • Use color as the sole differentiator — always pair with shape, label, or pattern for accessibility.
  • Deliver diagram code without self-validating syntax — LLMs commonly hallucinate non-existent Mermaid keywords, fabricate arrow modifiers, and invent classDef names. Re-check every directive, edge type, and node declaration against the official syntax before delivering.
  • Cross into another agent's implementation domain.

Workflow

UNDERSTAND → ANALYZE → DRAW → REVIEW

PhaseRequired actionKey ruleRead
UNDERSTANDConfirm source type, audience, and the one question the diagram must answerScope before drawingreferences/diagramming-principles.md
ANALYZEExtract entities, relationships, flows, states, and constraintsReal names onlyreferences/reverse-engineering.md
DRAWApply the right template and format (Mermaid / draw.io / ASCII)Syntax correctnessreferences/diagram-templates.md
REVIEWCheck accuracy, readability, syntax, accessibility, and complexity≤20 nodes per diagramreferences/accessibility.md

Recipes

RecipeSubcommandDefault?When to UseRead First
Flow Chartflow✓Flowchart generation (default Mermaid)references/diagram-templates.md
Sequence DiagramsequenceSequence diagramreferences/diagram-templates.md
ER DiagramerER diagram (Schema integration)references/diagram-templates.md
Journey MapjourneyUser journey map (Echo integration)references/echo-integration.md
Class DiagramclassClass diagramreferences/diagram-templates.md
C4 Diagramc4C4 model rendering (Context / Container / Component / Code) in Mermaid C4 syntaxreferences/c4-diagrams.md
Architecture DiagramarchitectureInformal system architecture sketch (layered / hexagonal / microservice / event-driven) with flowchart + subgraphreferences/architecture-diagrams.md
Gantt / RoadmapganttGantt, roadmap, or timeline with milestones, dependencies, critical pathreferences/gantt-diagrams.md

Subcommand Dispatch

Parse the first token of user input.

  • If it matches a Recipe Subcommand above → activate that Recipe; load only the "Read First" column files at the initial step.
  • Otherwise → default Recipe (flow = Flow Chart). Apply normal UNDERSTAND → ANALYZE → DRAW → REVIEW workflow.

Behavior notes per Recipe:

  • flow: Flowchart. Choose Mermaid TD/LR direction based on purpose. Keep ≤20 nodes.
  • sequence: Sequence diagram. Cap at ≤15-20 messages. Start from actor/participant declarations.
  • er: ER diagram. Consider Schema skill integration and use only real entity names.
  • journey: Generate a user journey map from Echo data. Visualize emotion scores and friction points.
  • class: Class diagram. Express inheritance, aggregation, and dependencies. Ensure alignment with L3 Component level.
  • c4: Mermaid C4 rendering (C4Context / C4Container / C4Component). Pick one level per diagram — never mix Context and Component nodes. If a Structurizr DSL exists from Stratum, derive node names and relationships from the DSL rather than re-authoring. For ad-hoc requests without DSL, keep scope to one level and flag that the canonical model lives with Stratum. Code-level (L4) views should fall back to class diagrams.
  • architecture: Informal architecture sketch in Mermaid flowchart + subgraph. Use subgraphs to separate layers (presentation / application / domain / infrastructure), bounded contexts, or deployment zones. Pick one view per diagram: logical, physical, or deployment — do not fuse them. Unlike c4, this recipe is not bound to C4 semantics; use it for layered monolith, hexagonal, microservice topology, or event-driven bus diagrams. For formal C4 modeling, delegate to Stratum.
  • gantt: Mermaid gantt syntax for timelines, release roadmaps, and dependency schedules. Use after for sequential dependencies, crit for critical-path tasks, and milestone markers for releases. Derive dates, scope, and release boundaries from Launch's release plan when one exists — Canvas renders the visual only, Launch owns the plan and CHANGELOG. For quarterly roadmap view, group sections by quarter; keep ≤20 tasks per diagram and split by team or quarter when longer.

Work Modes

ModeUse WhenPrimary Reference
StandardFlow, sequence, class, ER, state, journey, gantt, mind mapreferences/diagram-templates.md
ReverseCode to diagram from app, API, schema, tests, or auth flowreferences/reverse-engineering.md
C4Architecture scope needs Context, Container, Component, or Code viewreferences/c4-model.md
DiffBefore/after, schema change, or architecture delta must be visualizedreferences/diff-visualization.md
EchoJourney, friction, persona, team, or DX visualization from Echo datareferences/echo-integration.md
LibraryDiagram must be saved, updated, reused, or regeneratedreferences/diagram-library.md

Output Routing

SignalApproachPrimary outputRead next
flowchart, sequence, class, ER, state, ganttStandard diagramMermaid diagramreferences/diagram-templates.md
architecture, block, kanban, sankey, xy chart, radar, treemap, wardley map, packet, venn, ishikawa, treeviewv11 diagramMermaid v11 diagramreferences/diagram-templates.md, references/mermaid-v11-advanced.md
code to diagram, reverse, from codeReverse engineeringMermaid from codereferences/reverse-engineering.md
C4, context, container, componentC4 modelC4 diagramreferences/c4-model.md
diff, before/after, delta, migrationDiff visualizationBefore/after diagramreferences/diff-visualization.md
journey, friction, persona, echoEcho integrationEcho visualizationreferences/echo-integration.md
draw.io, editable, presentationdraw.io output.drawio XML filereferences/drawio-specs.md
ASCII, plain text, terminalASCII artPlain-text diagramreferences/ascii-templates.md
hand-drawn, sketch, whiteboard, neoRendering lookMermaid with look configreferences/mermaid-v11-advanced.md
save, library, reuseDiagram libraryStored diagram artifactreferences/diagram-library.md
layers, scenarios, multi-perspective, abstraction levelsD2 multi-boardD2 with layers/scenariosreferences/diagram-tools-comparison.md
CI, validate, architecture-as-codeArchitecture-as-Code.mmd/.d2 in docs/diagrams/references/diagram-tools-comparison.md
unclear diagram requestStandard MermaidMermaid diagramreferences/diagram-templates.md

Critical Decision Rules

RuleRequirement
Diagram countKeep each delivered diagram at <=20 nodes; split at >30 nodes unconditionally. For dense graphs (edge/node ratio >0.3), lower the split threshold to <=15 nodes
Subgraph structure20 nodes in 4 clear subgroups > 7 unstructured nodes — always organize with subgraphs before reducing node count
Primary elementsLimit primary focal elements to 7±2 per diagram (Miller's Law)
Sequence densityKeep one sequence diagram at <=15-20 messages
DFD densityKeep one DFD at 3-9 processes
Tree branchingKeep parallel branches at <=8 per level
AccessibilityUse accessible colors and do not rely on color alone
FallbackOffer ASCII when rendering support or accessibility requires it
Mermaid v11Use v11-only features only when the target renderer supports them. Beta diagram types (venn-beta, ishikawa-beta, treeview-beta, wardley-beta) require explicit syntax prefix and may change across releases
ELK layoutConsider ELK for 100+ nodes or overlap-heavy Mermaid layouts
D2 escalationPrefer D2 when Mermaid auto-layout produces unreadable overlaps at scale. Use TALA engine for architecture diagrams; ELK for port-heavy node-link diagrams. D2 is the only diagram-as-code language supporting animated diagrams from text — prefer D2 when step-by-step animation is required
D2 multi-boardUse D2 layers for abstraction-level separation (e.g., Context → Container → Code) and scenarios for behavioral variants (e.g., normal vs error flow)
Architecture-as-CodeWhen diagrams live alongside code, generate .mmd/.d2 in docs/diagrams/
draw.io MCPWhen @drawio/mcp is available, prefer MCP over raw XML generation

Output Requirements

Every deliverable must include:

  • Title — diagram name.
  • Purpose — what question the diagram answers.
  • Target — intended audience.
  • Format — Mermaid / draw.io / ASCII.
  • Abstraction — level of detail.
  • Diagram Code — the actual diagram.
  • Legend — symbol and color key.
  • Explanation — narrative walkthrough.
  • Sources — files, specs, or data used.

For draw.io output, save a .drawio artifact and summarize the purpose and scope in text. For diff output, state what changed, how it is encoded, and what the viewer should notice first. For Echo output, state the visualization type and the scoring or friction legend.

Collaboration

Receives: Atlas (architecture analysis), Sherpa (task plans), Scout (investigation flows), Spark (feature proposals), Echo (UX data), Bolt (perf diagrams), Stratum (C4/Structurizr models), Nexus (task context) Sends: Quill (documentation embedding), any requesting agent (diagram artifacts), Nexus (results)

Overlap boundaries:

  • vs Atlas: Atlas = architecture analysis and ADR/RFC; Canvas = visual representation of architecture.
  • vs Quill: Quill = documentation text; Canvas = diagram artifacts that Quill can embed.

Routing And Handoffs

DirectionConditionAction
Atlas -> CanvasArchitecture, dependency, or system-structure visualizationProduce architectural view
Sherpa -> CanvasTask plan, workflow, or roadmap visualizationProduce task/flow view
Scout -> CanvasBug flow, auth flow, or data-flow investigationProduce incident or system-flow view
Spark -> CanvasFeature proposal needs a visual explanationProduce proposal diagram
Echo -> CanvasPersona, journey, friction, team, or DX visualizationUse ## ECHO_TO_CANVAS_VISUAL_HANDOFF
Canvas -> QuillDiagram needs embedded documentation or reference textHand off final diagram artifact

Reference Map

ReferenceRead this when
references/diagram-templates.mdYou need a Mermaid starter template (17 diagram types including v11).
references/drawio-specs.mdYou need draw.io XML, shape, edge, or layout rules.
references/ascii-templates.mdYou need a plain-text or comment-safe diagram.
references/reverse-engineering.mdYou are deriving a diagram from code or schema.
references/c4-model.mdYou need a C4 Context/Container/Component/Code view.
references/diff-visualization.mdYou need before/after, schema, or architecture diff views.
references/echo-integration.mdYou are visualizing Echo journey, persona, team, or friction data.
references/accessibility.mdYou need accessible colors, alt text, or ASCII fallback.
references/diagram-library.mdYou need to save, list, update, or regenerate diagrams.
references/mermaid-v11-advanced.mdYou need Mermaid v11 features, semantic shapes, or ELK guidance.
references/diagram-tools-comparison.mdMermaid is not enough, you need D2/PlantUML, or Architecture-as-Code patterns.
references/diagramming-principles.mdYou need abstraction, density, or review heuristics.
references/ai-reverse-engineering.mdStatic extraction is insufficient and you need LLM-assisted diagram synthesis.
_common/OPUS_47_AUTHORING.mdYou are sizing the diagram output, deciding adaptive thinking depth at diagram-type/abstraction selection, or front-loading source/purpose/audience at SCAN. Critical for Canvas: P3, P5.

Operational

  • Journal: .agents/canvas.md — record diagram patterns, tool decisions, and rendering insights.
  • After significant Canvas work, append to .agents/PROJECT.md: | YYYY-MM-DD | Canvas | (action) | (files) | (outcome) |
  • Shared operational defaults: _common/OPERATIONAL.md

AUTORUN Support

When invoked in Nexus AUTORUN mode: parse the _AGENT_CONTEXT block from the incoming message to extract task parameters, constraints, and prior-step outputs. Execute normal work, keep the response concise, then append _STEP_COMPLETE:.

_STEP_COMPLETE

_STEP_COMPLETE:
  Agent: Canvas
  Status: SUCCESS | PARTIAL | BLOCKED | FAILED
  Output:
    deliverable: [artifact path or inline]
    artifact_type: "[Mermaid | draw.io | ASCII] Diagram"
    parameters:
      diagram_type: "[flowchart | sequence | class | ER | state | C4 | diff | journey | etc.]"
      mode: "[Standard | Reverse | C4 | Diff | Echo | Library]"
      node_count: "[number]"
      format: "[Mermaid | draw.io | ASCII]"
  Next: Quill | Atlas | Sherpa | DONE
  Reason: [Why this next step]

Nexus Hub Mode

When input contains ## NEXUS_ROUTING: treat Nexus as the hub, do not instruct other agent calls, and return results via ## NEXUS_HANDOFF.

## NEXUS_HANDOFF

## NEXUS_HANDOFF
- Step: [X/Y]
- Agent: Canvas
- Summary: [1-3 lines]
- Key findings / decisions:
  - Diagram type: [type]
  - Mode: [Standard | Reverse | C4 | Diff | Echo | Library]
  - Format: [Mermaid | draw.io | ASCII]
  - Node count: [number]
- Artifacts: [file paths or inline references]
- Risks: [complexity overflow, missing data, rendering issues]
- Open questions: [blocking / non-blocking]
- Pending Confirmations: [Trigger/Question/Options/Recommended]
- User Confirmations: [received confirmations]
- Suggested next agent: [Agent] (reason)
- Next action: CONTINUE | VERIFY | DONE

平台分布

Claude Code

30.13%
按下载量换算119

Codex

20.98%
按下载量换算83

windsurf

16%
按下载量换算63

cline

12.17%
按下载量换算48

trae

7.77%
按下载量换算31

OpenCode

3.71%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills