svg-precision-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

SVG Precision Skill

SVG Precision Skill

Build SVGs from explicit scene specifications, then validate before handing them off.
根据明确的场景规范构建SVG,在交付前进行验证。

Workflow

工作流程

  1. Translate the request into a concrete spec with fixed dimensions and coordinates.
  2. Use
    references/spec.md
    for templates and
    references/recipes.md
    for stable layout patterns.
  3. Build the SVG with
    scripts/svg_cli.py build
    .
  4. Validate with
    scripts/svg_cli.py validate
    .
  5. Render a PNG preview when the user needs a quick visual check.
  1. 将需求转换为包含固定尺寸和坐标的具体规范。
  2. 使用
    references/spec.md
    作为模板,
    references/recipes.md
    获取稳定的布局模式。
  3. 使用
    scripts/svg_cli.py build
    构建SVG。
  4. 使用
    scripts/svg_cli.py validate
    进行验证。
  5. 当用户需要快速视觉检查时,渲染PNG预览图。

Rules

规则

  • Set
    viewBox
    , width, and height explicitly.
  • Prefer absolute coordinates and simple shapes.
  • Treat text as risky when exact rendering matters.
  • Avoid exotic filters unless they are necessary and testable.
  • 显式设置
    viewBox
    、width和height。
  • 优先使用绝对坐标和简单形状。
  • 当需要精确渲染时,文本内容存在风险。
  • 除非必要且可测试,否则避免使用特殊滤镜。