Skip to content
Back to skills

Svg

ASecurity

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

  • 17 stars
  • 0 votes
  • 3 copies
  • 24 views
  • Added September 6, 2026
documentationgo

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add clawic/skills --skill svg --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Svg?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Svg
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/clawic-svg/badge)](https://www.skillsdirectory.com/skills/clawic-svg)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: SVG
slug: svg
version: 1.1.0
description: Create and optimize SVG graphics with proper viewBox, accessibility, and CSS styling.
homepage: https://clawic.com/skills/svg
changelog: Restructured with auxiliary files for focused reference
metadata:
  clawdbot:
    emoji: 📐
    requires: {}
    os:
    - linux
    - darwin
    - win32
    displayName: SVG
---

## Quick Reference

| Topic | File | Key Trap |
|-------|------|----------|
| viewBox & Scaling | `viewbox.md` | Missing viewBox = no scaling |
| Screen Readers | `accessibility.md` | role="img" + title as first child |
| SVGO Config | `optimization.md` | Default removes viewBox/title |
| Inline vs img | `embedding.md` | `<img>` cannot be styled with CSS |
| currentColor | `styling.md` | Hardcoded fills block theming |

## Critical Defaults

```svg
<!-- 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 `~/Clawic/data/svg/memory.md`. Create on first use.

```markdown
## 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.*

Files in this skill

  • SKILL.md1.9 KB
  • _meta.json234 B
  • accessibility.md1.6 KB
  • embedding.md1.6 KB
  • optimization.md1.4 KB
  • styling.md1.5 KB
  • viewbox.md1.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.