AgentSkillsCN

Graphic Design Skill

视觉设计、SVG 制作、版面构图、字体排版与品牌识别的通用模式。

SKILL.md
--- frontmatter
name: "Graphic Design Skill"
description: "Patterns for visual design, SVG creation, layout composition, typography, and brand identity."

Graphic Design Skill

Patterns for visual design, SVG creation, layout composition, typography, and brand identity.

Design Principles

Visual Hierarchy

LevelPurposeTechniques
PrimaryFirst thing seenLargest, boldest, highest contrast
SecondarySupporting infoMedium size, moderate weight
TertiaryDetailsSmaller, lighter, subtle

Hierarchy Tools

  • Size — Larger = more important
  • Weight — Bolder = more attention
  • Color — High contrast = focal point
  • Position — Top/center = primary
  • Whitespace — Isolation = emphasis

Balance Types

TypeCharacteristicsBest For
SymmetricalMirror image, formalCorporate, traditional
AsymmetricalVisual weight balanced, dynamicModern, creative
RadialElements radiate from centerLogos, icons

Layout & Composition

Grid Systems

text
┌─────┬─────┬─────┬─────┐
│  1  │  2  │  3  │  4  │   12-column grid
├─────┼─────┼─────┼─────┤   (most flexible)
│  5  │  6  │  7  │  8  │
├─────┼─────┼─────┼─────┤
│  9  │ 10  │ 11  │ 12  │
└─────┴─────┴─────┴─────┘

Golden Ratio (1:1.618)

  • Use for proportions that feel "right"
  • Width to height relationships
  • Spacing progressions
  • Element sizing

Rule of Thirds

text
┌─────────┬─────────┬─────────┐
│         │    ●    │         │  Place key elements
├─────────┼─────────┼─────────┤  at intersection
│    ●    │         │    ●    │  points for dynamic
├─────────┼─────────┼─────────┤  composition
│         │    ●    │         │
└─────────┴─────────┴─────────┘

Alignment Principles

PrincipleRule
Edge alignmentElements share common edges
Center alignmentElements share center axis
Baseline alignmentText shares baseline
Optical alignmentVisually aligned (may differ from mathematical)

Typography

Type Scale (1.25 ratio)

LevelSizeUse
Display72pxHero headlines
H148pxPage titles
H236pxSection headers
H328pxSubsections
Body16pxMain content
Caption12pxSupporting text

Font Pairing Rules

CombinationExampleVibe
Serif + SansGeorgia + HelveticaClassic, professional
Sans + SansMontserrat + Open SansModern, clean
Display + BodyPlayfair + Source SansElegant, editorial

Typography Best Practices

  • Line height: 1.4–1.6× font size for body
  • Line length: 45–75 characters optimal
  • Letter spacing: Increase for ALL CAPS
  • Contrast: Dark on light or light on dark
  • Hierarchy: Max 3 font sizes per design

Color Theory

Color Relationships

text
        Primary
           ●
          /|\
         / | \
        /  |  \
       ●───●───●
   Secondary  Tertiary

Color Schemes

SchemeDescriptionMood
MonochromaticOne hue, varied lightnessCohesive, elegant
ComplementaryOpposite on wheelHigh contrast, vibrant
AnalogousAdjacent on wheelHarmonious, natural
TriadicThree equidistantBalanced, dynamic
Split-complementaryBase + two adjacent to complementSofter contrast

Color Psychology

ColorAssociationsUse Cases
BlueTrust, stability, techCorporate, software
GreenGrowth, nature, successHealth, finance
RedEnergy, urgency, passionCTAs, alerts
PurpleCreativity, luxuryPremium, creative
OrangeFriendly, energeticSocial, youth
YellowOptimism, attentionHighlights, warnings

Contrast & Accessibility

WCAG LevelContrast RatioUse
AA (normal)4.5:1Body text
AA (large)3:118px+ or 14px bold
AAA7:1Maximum accessibility

Applying Color Theory to Mermaid Diagrams

Color theory principles translate directly to Mermaid diagram styling. The GitHub Pastel Palette v2 (defined in the markdown-mermaid skill) implements these principles:

Semantic Color Mapping (from color psychology):

Semantic PurposePalette ColorFillTextStroke
Primary actionsBlue#ddf4ff#0550ae#80ccff
Success/outputGreen#d3f5db#1a7f37#6fdd8b
Business logicGold#fff8c5#9a6700#d4a72c
Special/DevOpsPurple#d8b9ff#6639ba#bf8aff
Errors/criticalRed#ffebe9#cf222e#f5a3a3
Raw/ingestionBronze#fff1e5#953800#ffb77c
BackgroundNeutral#eaeef2#24292f#d0d7de

Design Principles Applied:

  1. Triadic harmony: Blue + Gold + Red form a balanced triad
  2. Analogous groups: Green + Blue are adjacent, creating calm flow sections
  3. Light fills + dark text: Ensures WCAG AA contrast (4.5:1+)
  4. Neutral arrows (#57606a): Don't compete with colored nodes — visual hierarchy preserved
  5. Consistent stroke family: Each color has a matching mid-tone stroke (not jarring black borders)

When to Override the Palette:

  • Diagrams comparing two systems → Use just 2 contrasting colors (complementary scheme)
  • Status dashboards → Green/Yellow/Red RAG mapping
  • Sequential processes → Monochromatic gradient (light to dark within one hue)

SVG Design

SVG Structure

xml
<svg viewBox="0 0 width height" xmlns="...">
  <defs>
    <!-- Reusable definitions -->
    <linearGradient id="grad1">...</linearGradient>
    <filter id="shadow">...</filter>
  </defs>

  <!-- Background layer -->
  <rect .../>

  <!-- Main content -->
  <g transform="translate(x, y)">
    <!-- Grouped elements -->
  </g>

  <!-- Foreground/overlay -->
</svg>

Common SVG Elements

ElementUseKey Attributes
<rect>Rectangles, backgroundsx, y, width, height, rx (rounded)
<circle>Circles, dotscx, cy, r
<ellipse>Ovalscx, cy, rx, ry
<line>Straight linesx1, y1, x2, y2
<path>Complex shapesd (path data)
<text>Typographyx, y, text-anchor, dominant-baseline
<g>Groupingtransform

SVG Path Commands

CommandMeaningExample
MMove toM 10 20
LLine toL 30 40
HHorizontal lineH 50
VVertical lineV 60
QQuadratic curveQ cx cy, x y
CCubic curveC cx1 cy1, cx2 cy2, x y
ZClose pathZ

SVG Text Alignment

xml
<!-- Horizontal alignment -->
text-anchor="start|middle|end"

<!-- Vertical alignment -->
dominant-baseline="auto|middle|central|hanging"

<!-- Centered text -->
<text x="50%" y="50%" text-anchor="middle" dominant-baseline="central">
  Perfectly Centered
</text>

SVG Gradients

xml
<!-- Linear gradient -->
<linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="0%">
  <stop offset="0%" stop-color="#007ACC"/>
  <stop offset="100%" stop-color="#00a8e8"/>
</linearGradient>

<!-- Radial gradient -->
<radialGradient id="glow" cx="50%" cy="50%" r="50%">
  <stop offset="0%" stop-color="#007ACC" stop-opacity="0.4"/>
  <stop offset="100%" stop-color="#007ACC" stop-opacity="0"/>
</radialGradient>

SVG Transforms

TransformSyntaxUse
Translatetranslate(x, y)Move element
Rotaterotate(deg, cx, cy)Spin around point
Scalescale(x, y)Resize
SkewskewX(deg) / skewY(deg)Shear

Banner & Marketing Design

Banner Dimensions

PlatformSizeAspect
VS Code Marketplace1280×6402:1
GitHub Social1280×6402:1
Twitter Header1500×5003:1
LinkedIn Banner1584×3964:1
Open Graph1200×630~1.9:1

Banner Composition

text
┌─────────────────────────────────────────┐
│  ┌─────────────────────────────────┐    │
│  │         VISUAL ELEMENT          │    │  Top third: Logo/Icon
│  └─────────────────────────────────┘    │
│                                         │
│           MAIN HEADLINE                 │  Middle: Primary message
│           Subtitle Text                 │
│                                         │
│  [Badge 1]  [Badge 2]  [Badge 3]        │  Bottom third: CTAs/Details
└─────────────────────────────────────────┘

Badge/Pill Design

xml
<!-- Rounded pill badge -->
<g>
  <rect x="-50" y="-16" width="100" height="32" rx="16"
        fill="#007ACC" opacity="0.15"/>
  <text x="0" y="0" text-anchor="middle" dominant-baseline="central"
        font-size="12" fill="#94a3b8">Label</text>
</g>

Icon Design

Icon Grid

text
┌────────────────────┐
│ ┌──────────────┐   │  Outer: Padding zone
│ │              │   │  Inner: Safe area
│ │   CONTENT    │   │  Content: Icon artwork
│ │              │   │
│ └──────────────┘   │  Standard: 24×24, 16×16
└────────────────────┘

Icon Principles

  • Simplicity — Recognize at small sizes
  • Consistency — Same stroke weight, style
  • Optical balance — Visually centered, not mathematically
  • Metaphor — Universally understood symbols

Icon Styles

StyleCharacteristicsUse
OutlinedStroke only, no fillLight, modern UI
FilledSolid shapesBold, clear visibility
DuotoneTwo tones/colorsDistinctive, branded
GlyphSingle color, simplifiedSystem icons

Design Systems

Spacing Scale (8px base)

TokenValueUse
xs4pxTight spacing
sm8pxDefault gap
md16pxSection spacing
lg24pxComponent gaps
xl32pxMajor sections
2xl48pxHero spacing

Elevation/Shadow

LevelShadowUse
0NoneFlat elements
10 1px 2pxSubtle lift
20 2px 4pxCards
30 4px 8pxDropdowns
40 8px 16pxModals

Border Radius Scale

TokenValueUse
none0Sharp corners
sm4pxSubtle rounding
md8pxStandard buttons
lg16pxCards, pills
full9999pxCircles, pills

Design Review Checklist

Visual Quality

  • Consistent spacing throughout
  • Aligned elements (check edges)
  • Balanced composition
  • Clear visual hierarchy
  • Appropriate whitespace

Typography

  • Readable font sizes
  • Proper line height
  • Consistent font usage
  • Good contrast ratios
  • Appropriate letter spacing

Color

  • Consistent color palette
  • Sufficient contrast
  • Meaningful color use
  • Works in different contexts
  • Accessible (WCAG compliant)

Technical

  • Optimized file size
  • Correct dimensions
  • Responsive/scalable
  • Cross-platform compatible
  • Proper naming conventions

Synapses

High-Strength Connections

  • [creative-writing] (High, Complements, Bidirectional) — "Visual storytelling"
  • [vscode-extension-patterns] (High, Applies, Forward) — "Extension branding and UI"

Medium-Strength Connections

  • [markdown-mermaid] (Medium, Extends, Bidirectional) — "Diagram visualization"
  • [cognitive-load] (Medium, Applies, Forward) — "Visual information processing"
  • [ascii-art-alignment] (Medium, Complements, Bidirectional) — "Text-based visual design"

Supporting Connections

  • [writing-publication] (Low, Supports, Forward) — "Document visual design"
  • [meditation-facilitation] (Low, Uses, Forward) — "Reflective design iteration"