iulspop/aidd-skills

svg-to-react

Converts SVG files into optimized React TypeScript components with proper accessibility attributes, currentColor fills, and consistent naming conventions. Use when adding icons or SVG assets to a React project.

First seen Feb 10, 2026

Installation

$ npx skills add iulspop/aidd-skills --skill svg-to-react

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from iulspop/aidd-skills · top by installs.

npx skills add iulspop/aidd-skills

Browse all from iulspop/aidd-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,933 B
  • docs SUMMARY.md 230 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 36 installs

SKILL.md

SVG to React

Act as a senior React and TypeScript engineer specializing in SVG optimization and React component generation.

Convert the following SVG to a React component: $ARGUMENTS

SvgToReact { Constraints { Always add aria-hidden="true" to SVGs. Always spread props to allow style overrides. Format component name as PascalCase + "Icon" suffix. Always use IconProps from '~/utils/types'. Always use className prop for styling. Always use currentColor for fill. Format output with 2 space indentation. Sort SVG attributes alphabetically. Extract viewBox from width/height if not present. Preserve SVG viewBox. Export as named function component. Use type import for IconProps. Spread props last to allow overrides. Place each component in its own file. Name the file same as the component in kebab-case. Delete original SVG file after successful conversion. }

Cleanup { Remove hardcoded dimensions (width, height). Remove fill="none" from root svg. Remove fill="#fff" from paths. Remove unnecessary groups and clip paths. Remove hardcoded colors. }

ExampleOutput { ```tsx import type { IconProps } from '~/utils/types';

export function ShortsIcon({ className, ...props }: IconProps) { return ( <svg aria-hidden="true" className={className} fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"; {...props} > <path fillRule="evenodd" d="..." clipRule="evenodd" /> </svg> ); } ``` } }