跳至主要内容
小龙虾小龙虾AI
🤖

SVG

Create and optimize SVG graphics with proper viewBox, accessibility, and CSS styling.

下载765
星标2
版本1.1.0
设计媒体
安全通过
💬Prompt

技能说明


name: SVG version: 1.1.0 changelog: "Restructured with auxiliary files for focused reference" description: Create and optimize SVG graphics with proper viewBox, accessibility, and CSS styling. metadata: {"clawdbot":{"emoji":"📐","requires":{},"os":["linux","darwin","win32"]}}

Quick Reference

TopicFileKey Trap
viewBox & Scalingviewbox.mdMissing viewBox = no scaling
Screen Readersaccessibility.mdrole="img" + title as first child
SVGO Configoptimization.mdDefault removes viewBox/title
Inline vs imgembedding.md<img> cannot be styled with CSS
currentColorstyling.mdHardcoded fills block theming

Critical Defaults

<!-- Minimum viable SVG -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
  <path d="..."/>
</svg>

Common Mistakes Checklist

  • viewBox present (not just width/height)
  • Coordinates within viewBox bounds
  • No hardcoded fill="#000" if theming needed
  • role="img" + <title> for informative SVGs
  • aria-hidden="true" for decorative SVGs
  • Unique IDs across all inline SVGs on page
  • xmlns included for external .svg files

Memory Storage

User preferences persist in ~/svg/memory.md. Create on first use.

## User Preferences
<!-- SVG workflow defaults. Format: "setting: value" -->
<!-- Examples: default_viewbox: 0 0 24 24, prefer_inline: true -->

## Accessibility Mode
<!-- informative | decorative -->

## Optimization
<!-- Tool and settings. Format: "tool: setting" -->
<!-- Examples: svgo: preset-default, remove_metadata: true -->

## Icon Defaults
<!-- Fill and sizing preferences -->
<!-- Examples: fill: currentColor, default_size: 24x24 -->

Empty sections = use skill defaults. Learns user preferences over time.

如何使用「SVG」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「SVG」技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能