Token导航 LogoToken导航

Agent Skill · 前端设计

diagram(diagram 图表绘制)

diagram 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

diagram 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 4,816。

总安装 799周安装 32GitHub Stars 1下载 259核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/spm1001/claude-suite --skill diagram

这个 Skill 是做什么的

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

diagram 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 AI 宿主中整理项目状态。适用于围绕前端设计项目变更和协作事项的信息管理。通过 npx skills add 命令从 GitHub 仓库安装并使用。需确认权限范围和维护状态,避免触发未授权的联网或文件操作。

建议参考原始 README 了解具体功能和使用限制。

来源仓库内路径:skills/diagram

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

diagram 怎么安装?

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

diagram 支持哪些 AI 工具?

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

diagram 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

diagram 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

diagram 用的人多吗?

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

diagram 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 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只读未明确通过
diagram

diagram 图表绘制 · 本页

7991需要联网未明确通过

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

SKILL.md 原文

Diagramming

Create conceptual charts and diagrams as SVG, render to PNG, self-critique, iterate, and show user.

When to Use

  • Conceptual diagrams (Venn, flow, architecture)
  • Data charts (line, bar, area)
  • Visual explanations for slides or documents

When NOT to Use

  • Hero images or photorealistic content (use picture skill)
  • Simple text formatting (markdown suffices)
  • Screenshots or screen mockups (different tools)

Workflow

1. Understand the Content

User typically provides:

  • Structure — "boxes connected by arrows", "Venn with overlap"
  • Content — the actual text/data to include
  • Purpose — the message or insight

Clarify these before drawing. The structure is theirs, the execution is yours.

2. Apply Brand (if applicable)

If a brand skill exists (e.g., itv-brand), read its specs for:

  • Color palette
  • Typography
  • Visual principles

If no brand specified, use sensible defaults:

  • Clear hierarchy (see Contrast below)
  • Vary the palette. Don't default to dark backgrounds every time. Light, warm, pastel, earthy, muted — all valid. Match the tone of the content: playful topic → bright colours; corporate → clean whites with accent colours; technical → cool greys. Dark backgrounds are one option, not the default.

3. Create SVG

Canvas: 1280×720 (16:9) default. Brand skill may override.

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">
  <rect x="0" y="0" width="1280" height="720" fill="#BACKGROUND"/>
  <!-- Content -->
</svg>

For human-editable SVGs: Structure multi-line text as siblings in one transform group:

<g transform="translate(250, 175)">
  <text x="0" y="0" text-anchor="middle">Line One</text>
  <text x="0" y="28" text-anchor="middle">Line Two</text>
</g>

This keeps lines together as one selectable object in editors like Inkscape. (Note: Affinity breaks this apart on import — see references/svg-interop.md.)

CRITICAL: Never create separate unlinked <text> elements for lines that belong together semantically. If "New stories / to tell" is one label, it's one group — always. Ungrouped lines become editing nightmares.

4. Render to PNG

Prerequisite: brew install librsvg — required for arrow markers and full SVG rendering fidelity.

rsvg-convert -w 1280 -h 720 input.svg -o /tmp/chart.png

sips is faster but silently drops SVG markers (arrows, arrowheads). Only use sips for diagrams with no markers. If rsvg-convert is not installed, warn the user before rendering — arrows will be missing.

5. Self-Critique (CRAP + Composition)

Read the PNG and critique against CRAP principles before showing user:

Proximity — Are related items grouped?

  • Labels adjacent to what they describe (not 300px away in a separate column)
  • Annotations should be close enough that the eye doesn't have to hunt
  • More space between groups than within groups
  • White space organized, not scattered — no large empty area in one place and cramped in another
  • Minimum gap between unrelated elements: ~22px (0.3" equivalent). Closer than that looks like collision unless deliberately grouped

Alignment — Do elements connect visually?

  • Every element aligns with something else
  • One dominant alignment system
  • If annotations are in a column, align them to ONE x-coordinate (ragged = amateur)
  • Strong invisible lines across the canvas
  • Cross-canvas alignment creates unity even between unrelated elements

Repetition — Is styling consistent?

  • Similar elements styled identically
  • Limited color palette, reused systematically
  • Clear visual rhythm
  • Consolidate font sizes to 3-4 levels maximum

Contrast — Is hierarchy clear?

  • Title largest, then highlighted element, then content
  • Primary data stands out from secondary
  • No "wimpy" differences — all contrasts are bold. If two elements are different hierarchy levels, the size difference should be at least 2x (e.g., 36px title vs 18px body, not 20px vs 16px)
  • Check contrast at smaller sizes — problems emerge
  • Text on dark backgrounds: #e2e8f0 minimum. WCAG 4.5:1 contrast ratio as hard floor

Composition Check — After CRAP, step back and ask:

  • Is the composition centered on the canvas? (Calculate, don't eyeball)
  • Is whitespace balanced left/right, top/bottom? (Check both axes — horizontally centered but top-heavy still looks wrong)
  • Are there orphan elements with no visual relationship to anything?
  • Canvas edge margin: keep content away from the outer ~10% on all sides. Content touching edges looks unfinished.

Centering calculation:

left_edge = leftmost content x-coordinate
right_edge = rightmost content x-coordinate
content_center = (left_edge + right_edge) / 2
offset = canvas_center - content_center
# Shift everything by offset

See references/design-principles.md for detailed interventions.

6. Reduced Size Check

View the PNG at 50-75% size (or squint). Problems that hide at full size emerge:

  • Centering issues become obvious
  • Competing elements reveal themselves
  • Hierarchy flattens — is the important thing still prominent?
  • Low contrast text disappears

If something looks wrong small, it IS wrong.

7. Fix and Re-render

If issues found, fix and render again. One fix often creates another problem — repositioning to fix an overlap can create a new gap; resizing text can break alignment. Run at least two critique cycles before declaring done.

Common fixes:

  • Centering off → calculate offset, shift all elements
  • Annotations too far → move closer, or put inside elements
  • Orphan element → add connector line or align to something
  • Low contrast → boost to #e2e8f0 minimum for text on dark backgrounds
  • Text touching shape edges → inset text 10-15px from borders on all sides
  • Too dense → split content across multiple visuals rather than shrinking text

8. Completeness Check

Before showing user, ask: what's missing from the domain? You're visualising someone's mental model — have you captured all the key elements they'd expect to see? If the diagram is about "data partnerships" and you only listed two when there are three, the user will notice. This isn't about design; it's about content accuracy.

9. Show User

open -a "Google Chrome" /tmp/chart.png

Or copy to Desktop if user needs the file.

Design Principles

Hierarchy

Title > Highlighted element > Content. Three levels maximum. The title is largest. The key insight (e.g., Venn intersection) is second. Everything else supports these. The difference between levels should be obvious — 2x size minimum between title and body text.

Containment

In Venn diagrams, intersection text should be visually contained within the overlap shape. Each piece of content should be unambiguously inside its region.

Territory Clarity

No straddling, no ambiguity about "which side does this belong to?" Content occupies clear territory.

Labels Don't Touch Lines

Circle labels, box labels — keep clear space from edges. Position labels at "clock positions" (10 o'clock, 2 o'clock) rather than centered above. Text inside shapes (cards, banners, rounded rectangles) should be inset 10-15px from borders on all sides — text touching shape edges looks cramped and accidental.

Fill the Space

  • Chart area should use ~80% of canvas (with ~10% margin from edges)
  • "Fill" means centered and balanced, not just "big enough"
  • If there's empty space at bottom, elements are undersized or poorly positioned
  • Scale elements uniformly to fill — never stretch text (aspect ratio is sacred)
  • Prefer splitting content across multiple visuals over shrinking everything to fit one. A diagram with 12 cramped boxes is a document, not a visual — 3-4 key elements per canvas is the sweet spot

Scatter, Don't Stack

When placing multiple detail items within a region (e.g., items inside a Venn circle), scatter them organically to fill the territory. Don't default to neat vertical stacks or bullet-list layouts — that's document thinking, not visual thinking. Let items breathe and occupy the space naturally. Stacking looks rigid; scattering looks designed.

Display Text Capitalisation

Labels and titles get consistent Title Case capitalisation.

Label Specificity

Review labels for specificity before finalising. Bare nouns often need modification to land:

  • "Naming" → "Consistent Naming"
  • "SME-friendly" → "SME-friendly tools"
  • "Models" → "Better predictive models"

Ask: would someone unfamiliar with the context understand what this means? If not, add the adjective.

Chesterton's Fence

Before removing any element, ask: "What job is this doing?"

  • Axis labels frame conceptual space (X vs Y dimensions)
  • Annotations provide meaning, not just labels ("This ad led to this click" ≠ "Last-click")
  • Width indicators reinforce messages the visual implies
  • Key/legend panels group meta-information
  • Don't mistake "explanation" for "noise"

Respect the Metaphor

Visual metaphors have rules. Breaking them breaks comprehension:

  • Ladder: rungs go INSIDE the rails, not wider than them
  • Venn: content belongs unambiguously in one region
  • Flow: arrows point in direction of flow
  • Tree: children below parents

If your visual breaks the metaphor's rules, the viewer's mental model breaks.

Less Is More (Especially Overlaps)

Not every region needs a label. In Venn diagrams, if an overlap's meaning is self-evident from the surrounding content, leave it empty. Labelling everything creates noise. The unlabelled center can be more powerful than a forced "synergy" label. Ask: does this label add meaning, or am I labelling because I feel I should?

No Orphan Elements

Everything needs a visual relationship to something else:

  • If a callout box floats alone, connect it (line, alignment, proximity)
  • Elements without relationships look like mistakes
  • Even "independent" items should align with something

No Emoji as Icons

Never use emoji or Unicode symbols as visual elements. They render inconsistently across platforms, browsers, and export formats. Use proper SVG shapes — a circle with a checkmark path, not ✅. A triangle with an exclamation mark, not ⚠️.

Key/Legend Placement

Hierarchy of preferences:

  1. Best: No key needed — visual is self-explanatory
  2. Acceptable: Contained key panel — all meta-info grouped in one area
  3. Worst: Scattered meta-info — bits floating in different corners

If you need a key, contain it. If you're adding labels to explain what colors mean, the colors might not be working.

Key Specs

ElementSizeNotes
Title36-40pxLargest, top hierarchy
Highlighted text24-28pxSecond hierarchy
Labels20-24pxCircle/region labels
Content text18-20pxInside regions
Strokes3-4pxCircle outlines, connectors

Composing with Brand Skills

When a brand skill exists:

  1. Read its brand-guide.md for colors, fonts, specs
  2. Apply those specs to your SVG
  3. Brand skill may specify different canvas size

Example: For ITV-branded charts, also invoke the itv-styling skill.

Anti-Patterns

PatternProblemFix
Skip self-critiqueQuality issues persistAlways render and check before showing user
Low contrast textIllegible on projectionWhite/near-white on dark, WCAG 4.5:1 minimum, test at 50% zoom
Crowded layoutsVisual overload3-4 key elements per visual, split rather than shrink
Wimpy size differencesHierarchy invisible2x minimum between levels (36px title / 18px body)
Text touching shape edgesLooks cramped10-15px inset on all sides
Single fix, no re-checkNew problems introducedTwo critique cycles minimum
Same dark background every timeMonotonous, mismatched toneVary palette to match content
Emoji as iconsInconsistent renderingUse SVG shapes
Skip brand checkInconsistent stylingLoad brand skill first when brand applies

References

  • references/design-principles.md — Full CRAP framework with SVG-specific interventions
  • references/slide-design-principles.md — Slide-specific thresholds (spacing, density, layout vocabulary). Load when output is for presentations. Universal rules (marked U) apply to all diagrams.
  • references/svg-interop.md — SVG editor compatibility notes
  • references/svg-recipes.md — Code snippets for common elements

平台分布

Codex

35.78%
按下载量换算93

Claude

29.54%
按下载量换算77

Cursor

17.56%
按下载量换算45

Gemini CLI

8.3%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills