Token导航 LogoToken导航

Agent Skill · 开发

moai-tool-svg(摩艾工具 svg)

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

moai-tool-svg 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 9,896。

总安装 2,496周安装 101GitHub Stars 964下载 808核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/modu-ai/moai-adk --skill moai-tool-svg

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

moai-tool-svg 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过 npx skills add 命令从 moai-adk 仓库安装并使用。

安装前建议确认权限范围和维护状态,注意是否会触发联网或文件读写操作。具体用法可结合来源仓库 README 进一步核验实际功能边界。

来源仓库内路径:skills/moai-tool-svg

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

moai-tool-svg 怎么安装?

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

moai-tool-svg 支持哪些 AI 工具?

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

moai-tool-svg 需要什么权限?

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

moai-tool-svg 是免费的吗?

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

moai-tool-svg 用的人多吗?

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

moai-tool-svg 安全吗?

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

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

值得选的地方

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

先想清楚的地方

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

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

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

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
moai-tool-svg

摩艾工具 svg · 本页

2,496964需要联网未明确通过

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

SKILL.md 原文

SVG Creation and Optimization Specialist

Comprehensive SVG development covering vector graphics creation, SVGO optimization, icon systems, data visualizations, and animations. This skill provides patterns for all SVG workflows from basic shapes to complex animated graphics.


Quick Reference (30 seconds)

Basic SVG Template

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
  <title>Accessible Title</title>
  <desc>Description for screen readers</desc>
  <!-- Content here -->
</svg>

Common Shapes Cheatsheet

Rectangle: <rect x="10" y="10" width="80" height="60" rx="5" />

Circle: <circle cx="50" cy="50" r="40" />

Ellipse: <ellipse cx="50" cy="50" rx="40" ry="25" />

Line: <line x1="10" y1="10" x2="90" y2="90" stroke="black" />

Polyline: <polyline points="10,10 50,50 90,10" fill="none" stroke="black" />

Polygon: <polygon points="50,10 90,90 10,90" />

Path Commands Quick Reference

Movement Commands:

  • M x y: Move to absolute position
  • m dx dy: Move relative
  • L x y: Line to absolute
  • l dx dy: Line relative
  • H x: Horizontal line absolute
  • h dx: Horizontal line relative
  • V y: Vertical line absolute
  • v dy: Vertical line relative
  • Z: Close path

Curve Commands:

  • C x1 y1 x2 y2 x y: Cubic bezier (two control points)
  • S x2 y2 x y: Smooth cubic (reflects previous control)
  • Q x1 y1 x y: Quadratic bezier (one control point)
  • T x y: Smooth quadratic (reflects previous control)
  • A rx ry rotation large-arc sweep x y: Arc

SVGO CLI Commands

Install globally: npm install -g svgo

Optimize single file: svgo input.svg -o output.svg

Optimize directory: svgo -f./src/icons -o./dist/icons

Show optimization stats: svgo input.svg --pretty --indent=2

Use config file: svgo input.svg --config svgo.config.mjs

Fill and Stroke Quick Reference

Fill properties: fill, fill-opacity, fill-rule (nonzero, evenodd)

Stroke properties: stroke, stroke-width, stroke-opacity, stroke-linecap (butt, round, square), stroke-linejoin (miter, round, bevel), stroke-dasharray, stroke-dashoffset


Implementation Guide (5 minutes)

SVG Document Structure

The SVG element requires the xmlns attribute for standalone files. The viewBox defines the coordinate system as "minX minY width height". Width and height set the rendered size.

<svg xmlns="http://www.w3.org/2000/svg"
     viewBox="0 0 200 200"
     width="200" height="200"
     preserveAspectRatio="xMidYMid meet">

  <!-- Reusable definitions -->
  <defs>
    <linearGradient id="grad1">
      <stop offset="0%" stop-color="#ff0000" />
      <stop offset="100%" stop-color="#0000ff" />
    </linearGradient>
  </defs>

  <!-- Grouped content -->
  <g id="main-group" transform="translate(10, 10)">
    <rect width="100" height="100" fill="url(#grad1)" />
  </g>
</svg>

Creating Reusable Symbols

Symbols define reusable graphics that can be instantiated with use elements. They support their own viewBox for scaling.

<svg xmlns="http://www.w3.org/2000/svg">
  <defs>
    <symbol id="icon-star" viewBox="0 0 24 24">
      <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
    </symbol>
  </defs>

  <!-- Use the symbol multiple times -->
  <use href="#icon-star" x="0" y="0" width="24" height="24" />
  <use href="#icon-star" x="30" y="0" width="24" height="24" fill="gold" />
  <use href="#icon-star" x="60" y="0" width="48" height="48" />
</svg>

Path Creation Patterns

Simple icon path combining moves, lines, and curves:

<path d="M10 20 L20 10 L30 20 L20 30 Z" />

Rounded rectangle using arcs:

<path d="M15 5 H85 A10 10 0 0 1 95 15 V85 A10 10 0 0 1 85 95 H15 A10 10 0 0 1 5 85 V15 A10 10 0 0 1 15 5 Z" />

Heart shape using cubic beziers:

<path d="M50 88 C20 65 5 45 5 30 A15 15 0 0 1 35 30 Q50 45 50 45 Q50 45 65 30 A15 15 0 0 1 95 30 C95 45 80 65 50 88 Z" />

Gradient Implementation

Linear gradient from left to right:

<defs>
  <linearGradient id="horizontal-grad" x1="0%" y1="0%" x2="100%" y2="0%">
    <stop offset="0%" stop-color="#3498db" />
    <stop offset="50%" stop-color="#9b59b6" />
    <stop offset="100%" stop-color="#e74c3c" />
  </linearGradient>
</defs>
<rect fill="url(#horizontal-grad)" width="200" height="100" />

Radial gradient with focal point:

<defs>
  <radialGradient id="sphere-grad" cx="50%" cy="50%" r="50%" fx="30%" fy="30%">
    <stop offset="0%" stop-color="#ffffff" />
    <stop offset="100%" stop-color="#3498db" />
  </radialGradient>
</defs>
<circle fill="url(#sphere-grad)" cx="50" cy="50" r="40" />

SVGO Configuration

Create svgo.config.mjs in project root:

export default {
  multipass: true,
  plugins: [
    'preset-default',
    'prefixIds',
    {
      name: 'sortAttrs',
      params: {
        xmlnsOrder: 'alphabetical'
      }
    },
    {
      name: 'removeAttrs',
      params: {
        attrs: ['data-name', 'class']
      }
    }
  ]
};

Configuration preserving specific elements:

export default {
  multipass: true,
  plugins: [
    {
      name: 'preset-default',
      params: {
        overrides: {
          removeViewBox: false,
          cleanupIds: {
            preserve: ['icon-', 'logo-']
          }
        }
      }
    }
  ]
};

Embedding SVG in React

Inline SVG component:

const Icon = ({ size = 24, color = 'currentColor' }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none">
    <path d="M12 2L2 7l10 5 10-5-10-5z" stroke={color} strokeWidth="2" />
  </svg>
);

SVG sprite with use element:

const SpriteIcon = ({ name, size = 24 }) => (
  <svg width={size} height={size}>
    <use href={`/sprites.svg#${name}`} />
  </svg>
);

Text Elements

Basic text positioning:

<text x="50" y="50" text-anchor="middle" dominant-baseline="middle"
      font-family="Arial" font-size="16" fill="#333">
  Centered Text
</text>

Text on a path:

<defs>
  <path id="text-curve" d="M10 80 Q95 10 180 80" fill="none" />
</defs>
<text font-size="14">
  <textPath href="#text-curve">Text following a curved path</textPath>
</text>

Advanced Implementation (10+ minutes)

Complex Filter Effects

Drop shadow with blur:

<defs>
  <filter id="drop-shadow" x="-20%" y="-20%" width="140%" height="140%">
    <feGaussianBlur in="SourceAlpha" stdDeviation="3" result="blur" />
    <feOffset in="blur" dx="3" dy="3" result="offsetBlur" />
    <feMerge>
      <feMergeNode in="offsetBlur" />
      <feMergeNode in="SourceGraphic" />
    </feMerge>
  </filter>
</defs>

Glow effect:

<filter id="glow">
  <feGaussianBlur stdDeviation="4" result="coloredBlur" />
  <feMerge>
    <feMergeNode in="coloredBlur" />
    <feMergeNode in="SourceGraphic" />
  </feMerge>
</filter>

Clipping and Masking

Clip path for cropping:

<defs>
  <clipPath id="circle-clip">
    <circle cx="50" cy="50" r="40" />
  </clipPath>
</defs>
<image href="photo.jpg" width="100" height="100" clip-path="url(#circle-clip)" />

Gradient mask for fade effect:

<defs>
  <linearGradient id="fade-grad">
    <stop offset="0%" stop-color="white" />
    <stop offset="100%" stop-color="black" />
  </linearGradient>
  <mask id="fade-mask">
    <rect width="100" height="100" fill="url(#fade-grad)" />
  </mask>
</defs>
<rect width="100" height="100" fill="blue" mask="url(#fade-mask)" />

CSS Animation Integration

Keyframe animation for SVG elements:

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.animated-circle {
  animation: pulse 2s ease-in-out infinite;
  transform-origin: center;
}

Stroke drawing animation:

.draw-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 2s ease forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

Accessibility Best Practices

Always include title and desc for meaningful graphics:

<svg role="img" aria-labelledby="title desc">
  <title id="title">Company Logo</title>
  <desc id="desc">A blue mountain with snow-capped peak</desc>
  <!-- graphic content -->
</svg>

For decorative SVGs, hide from screen readers:

<svg aria-hidden="true" focusable="false">
  <!-- decorative content -->
</svg>

Performance Optimization

Reduce precision in path data from 6 decimals to 2:

Before: M10.123456 20.654321 L30.987654 40.123456

After: M10.12 20.65 L30.99 40.12

Convert shapes to paths for smaller file size when appropriate. Use symbols for repeated elements. Apply SVGZ compression for 20-50% size reduction.

For detailed patterns on each topic, see the modules directory.


Module Index

  • modules/svg-basics.md: Document structure, coordinate system, shapes, paths, text
  • modules/svg-styling.md: Fills, strokes, gradients, patterns, filters, clipping, masking
  • modules/svg-optimization.md: SVGO configuration, compression, sprites, performance
  • modules/svg-animation.md: CSS animations, SMIL, JavaScript, interaction patterns

Works Well With

  • moai-domain-frontend: React/Vue SVG component integration
  • moai-docs-generation: SVG diagram generation for documentation
  • moai-domain-uiux: Icon systems and design system integration

Common Rationalizations

RationalizationReality
"PNG is fine, SVG is overkill for this icon"PNGs blur at different resolutions and require multiple sizes. SVGs scale perfectly and are smaller for simple graphics.
"I will optimize the SVG later"Unoptimized SVGs from design tools contain editor metadata, hidden layers, and precision decimals that bloat file size by 50-80%.
"Inline SVG is always better than an img tag"Inline SVGs increase HTML payload and prevent browser caching. Use img tags for static icons that do not need dynamic styling.
"Accessibility does not apply to decorative icons"Decorative icons need aria-hidden=true to be properly ignored by screen readers. Without it, they read meaningless content.
"SVGO defaults are fine for all SVGs"SVGO defaults remove viewBox and title elements. Custom configuration is required to preserve accessibility and responsiveness.

Red Flags

  • SVG file contains editor metadata (Illustrator, Sketch, Figma export cruft)
  • SVG missing viewBox attribute (breaks responsive scaling)
  • Interactive SVG missing role and aria-label attributes
  • Decorative SVG missing aria-hidden="true"
  • SVG file larger than the equivalent PNG for the same visual

Verification

  • SVGs optimized with SVGO or equivalent (show before/after file size)
  • viewBox attribute present on all SVGs (no fixed width/height only)
  • Decorative SVGs have aria-hidden="true"
  • Interactive SVGs have role="img" and aria-label
  • SVG file size smaller than PNG equivalent at target resolution
  • No editor metadata in committed SVG files (check for Illustrator/Sketch/Figma tags)

平台分布

Codex

38.47%
按下载量换算311

Claude

31.66%
按下载量换算256

Cursor

17%
按下载量换算137

Gemini CLI

9.9%
按下载量换算80

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills