Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计未展示

makepad-2.0-vector化妆板 2 0 向量

Agent Skill

用于搭建或维护带检索增强的 RAG 工作流,适合让 Agent 处理知识库问答、向量检索、来源引用和事实核查。它可以辅助整理数据接入、Embedding、向量库、召回参数和回答生成流程。使用时需要确认数据来源、更新频率、召回阈值和引用展示方式,避免把未命中的资料或过期内容包装成确定事实。

总安装

291

周安装

12

GitHub Stars

737

下载量

95
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/zhanghandong/makepad-skills --skill makepad-2.0-vector

简介

用于搭建和维护基于向量检索的知识库问答系统,支持 RAG 流程。

  • 适合处理数据接入、Embedding 生成和回答引用等任务。
  • 需确认数据来源、召回阈值和更新频率,避免传播未经验证的信息。
  • 建议在测试集上验证答案准确性,确保引用可追溯。
  • makepad-2.0-vector 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Makepad 2.0 Vector Graphics Skill

Version: makepad-widgets (dev branch) | Last Updated: 2026-03-03

Overview

The Vector widget renders resolution-independent vector graphics using SVG-like syntax. It supports paths, shapes, gradients, filters, groups, transforms, and property animation via Tween.

Two ways to use SVG in Splash:

  • Vector{} - Define shapes inline in Splash (paths, rects, circles, etc.)
  • Svg{} - Load external .svg files via crate_resource() or http_resource(), with optional animation and custom GPU shaders

Documentation

Refer to the local files for detailed documentation:

  • ./references/vector-reference.md - Complete Vector API, shapes, gradients, filters, animation

Basic Usage

Vector{
    width: 48 height: 48
    viewbox: vec4(0 0 24 24)
    Path{
        d: "M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"
        fill: false
        stroke: #4488ff
        stroke_width: 2.0
        stroke_linecap: "round"
        stroke_linejoin: "round"
    }
}

Key Properties

PropertyDescriptionExample
width / heightWidget size in pixels48
viewboxSVG viewBox as vec4vec4(0 0 24 24)

CRITICAL: Shape Properties vs Widget Properties

**Vector shapes use SVG-style properties, NOT draw_bg.* widget properties:**

// CORRECT — SVG properties
Path{d:"M 0 0 L 10 10" stroke:#x66aaff stroke_width:2.5}
Circle{cx:10 cy:10 r:5 fill:#x44ddaa}

// WRONG — these do nothing on Vector shapes!
Path{d:"..." draw_bg.stroke_color:#x66aaff draw_bg.stroke_width:2.}
Circle{cx:10 cy:10 r:5 draw_bg.fill_color:#x44ddaa}

Shape Types

Path (SVG path data)

Path{
    d: "M10 10 L20 20 L10 20 Z"
    fill: #f00
    stroke: #000
    stroke_width: 1.5
}

Built-in Shapes

Rect{x: 0 y: 0 width: 100 height: 50 fill: #f00 rx: 5}
Circle{cx: 50 cy: 50 r: 25 fill: #00f}
Ellipse{cx: 50 cy: 30 rx: 40 ry: 20 fill: #0f0}
Line{x1: 0 y1: 0 x2: 100 y2: 100 stroke: #fff stroke_width: 2}
Polyline{points: "0,0 50,25 100,0" fill: false stroke: #fff}
Polygon{points: "50,0 100,100 0,100" fill: #f0f}

Gradients

Linear Gradient

Gradient{
    id: "myGrad"
    x1: 0 y1: 0 x2: 1 y2: 1
    Stop{offset: 0 color: #ff0000}
    Stop{offset: 1 color: #0000ff}
}
Path{d: "..." fill: "url(#myGrad)"}

Radial Gradient

RadGradient{
    id: "radGrad"
    cx: 0.5 cy: 0.5 r: 0.5
    Stop{offset: 0 color: #ffffff}
    Stop{offset: 1 color: #000000}
}

Groups & Transforms

Group{
    transform: "translate(10 20) rotate(45 50 50)"
    opacity: 0.8

    Circle{cx: 0 cy: 0 r: 10 fill: #f00}
    Rect{x: 20 y: 0 width: 20 height: 20 fill: #0f0}
}

Filters

Filter{
    id: "shadow"
    DropShadow{dx: 2 dy: 2 blur: 4 color: #0008}
}
Path{d: "..." fill: #fff filter: "url(#shadow)"}

Tween Animation (SVG Property Animation)

CRITICAL: Tween is a property value, NOT a container. It replaces a shape property (fill, stroke, opacity, cx, cy, r, etc.) with an animated value.

Basic Syntax

// Animate opacity (pulse effect)
Circle{cx:8 cy:8 r:6 fill:#x44ddaa opacity:Tween{from:0.3 to:1.0 dur:1.5 loop_:true}}

// Animate position (moving dot)
Circle{cx:Tween{from:20 to:380 dur:3.0 loop_:true} cy:25 r:5 fill:#x66aaff}

// Animate color
Circle{fill:Tween{from:#x44ddaa to:#x6688dd dur:3.0 loop_:true} cx:10 cy:10 r:8}

// Animate stroke
Path{d:"M 0 0 L 100 0" stroke:Tween{from:#x333333 to:#x66aaff dur:2.0 loop_:true} stroke_width:2.}

CRITICAL: loop_ Must Be Boolean

// CORRECT — indefinite loop
opacity:Tween{from:0.3 to:1.0 dur:1.5 loop_:true}

// CORRECT — play 3 times
opacity:Tween{from:0.3 to:1.0 dur:1.5 loop_:3.0}

// WRONG — string doesn't trigger Indefinite, plays only once!
opacity:Tween{from:0.3 to:1.0 dur:1.5 loop_:"indefinite"}

Tween Properties

PropertyTypeDescriptionDefault
fromvalueStart value (color, float, string)-
tovalueEnd value-
valuesVecKeyframe values (alternative to from/to)-
durf32Duration in seconds1.0
beginf32Delay offset in seconds0.0
loop_bool/f32true = indefinite, float = repeat count1.0
calcstring"discrete", "paced", "spline""linear"
fill_modestring"freeze" or "remove""remove"

Animatable Properties

Any shape property can be animated with Tween:

  • fill, stroke — color animation
  • stroke_width, opacity, stroke_opacity — float animation
  • cx, cy, r (Circle) — position/size animation
  • d (Path) — path morphing animation

Common Patterns

Pulsing indicator:

Vector{width:16 height:16
  Circle{cx:8 cy:8 r:6 fill:#x44ddaa opacity:Tween{from:0.3 to:1.0 dur:1.5 loop_:true}}
}

Moving dot along a line:

Vector{width:Fill height:40
  Path{d:"M 20 20 L 380 20" stroke:#x333355 stroke_width:1.}
  Circle{cx:Tween{from:20 to:380 dur:3.0 loop_:true} cy:20 r:4 fill:Tween{from:#x44ddaa to:#xffaa44 dur:3.0 loop_:true}}
}

Delayed sequential animation:

Circle{cx:8 cy:8 r:6 fill:#x44ddaa opacity:Tween{from:0.3 to:1.0 dur:1.5 begin:0.0 loop_:true}}
Circle{cx:8 cy:8 r:6 fill:#xffaa44 opacity:Tween{from:0.3 to:1.0 dur:1.5 begin:0.5 loop_:true}}
Circle{cx:8 cy:8 r:6 fill:#x6688dd opacity:Tween{from:0.3 to:1.0 dur:1.5 begin:1.0 loop_:true}}

Tween vs Animator

FeatureTween (Vector)Animator (Widget)
ScopeSVG shape propertiesWidget shader instance vars
SyntaxProperty value replacementanimator: Animator{...} block
TriggersAutomatic on renderState transitions (hover, etc.)
Looploop_:trueLoop {duration: 1.0}
Use forSVG animationsUI hover/focus/active effects

Icon Pattern (Common)

Most Vector widgets in Makepad 2.0 are used as icons with SVG paths:

let IconCheck = Vector{width: 18 height: 18 viewbox: vec4(0 0 24 24)
    Path{d: "M20 6L9 17L4 12" fill: false stroke: theme.color_highlight stroke_width: 2.5
        stroke_linecap: "round" stroke_linejoin: "round"}
}

let IconTrash = Vector{width: 14 height: 14 viewbox: vec4(0 0 24 24)
    Path{d: "M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" fill: false stroke: theme.color_label_inner_inactive stroke_width: 1.8 stroke_linecap: "round" stroke_linejoin: "round"}
}

Use with theme colors for consistent styling across light/dark modes.


Vector vs Svg vs SDF2D

FeatureVector{}Svg{}SDF2D Shader
InputInline shapes in SplashExternal .svg fileShader code
SVG path dataYes (d: "...")Yes (parsed from file)No
Gradientslet bindingsSVG <defs>Manual
FiltersFilter{DropShadow{}}SVG <filter>Manual
AnimationTween{}SVG <animate> + animating: trueShader uniforms
Custom GPU shadershader_iddraw_svg +: {get_color: fn(){...}}Full control
URL loadingNoYes (http_resource())No
Resolution-independentYesYesYes
PerformanceGood for staticGood for complex SVGsBest for animated

Use Vector{} for: Inline icons, illustrations, programmatic vector graphics Use Svg{} for: Loading pre-made SVG files, complex SVG assets, SVG from URLs Use SDF2D for: Animated shapes, hover effects, custom widget backgrounds


Hex Color Escape

When using hex colors containing the letter 'e', prefix with #x:

// WRONG - parser misreads 'e' as exponent
stroke: #2ecc71

// CORRECT
stroke: #x2ecc71

Best Practices

  1. Use viewbox to define coordinate space independent of widget size
  2. Use theme colors for icon strokes/fills for dark/light mode support
  3. Use let bindings for reusable icon definitions
  4. Keep paths simple - Complex SVG paths can impact performance
  5. Use fill: false for outline-only icons (most common pattern)
  6. Set stroke_linecap: "round" for cleaner line endings on icons

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.03%
按下载量换算31

Claude

31.2%
按下载量换算30

Cursor

20.86%
按下载量换算20

Gemini CLI

9.06%
按下载量换算9

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills