svg-inline
Qué hace
Esta skill revisa los gráficos SVG escritos directamente en el HTML o en los componentes. Es para desarrolladores que quieren páginas más rápidas sin perder el diseño.
Cuándo usarla
- ✓Cuando una página contiene dibujos SVG grandes en línea que hacen pesado el HTML.
- ✓Cuando el mismo icono se copia en muchos lugares de un sitio.
- ✓Cuando revisas si un SVG necesita ir en línea o si podría ser un archivo de imagen separado.
Link de la skill
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/svg-inline/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Mi página de inicio va lenta y el HTML es enorme. Una parte es un logo SVG grande pegado directamente. ¿Puedes revisarlo?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente mide cada SVG en línea, comprueba si se repite y si realmente necesita estar en línea. Después recomienda opciones más pequeñas o externas.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Manage inline SVG size and complexity
A complex illustration exported from Figma can easily be 50-200KB of SVG markup. Inlined in HTML, it blocks the HTML parser until it is processed, cannot be cached independently, and balloons every page response. Extracting it to an external file allows browser caching and deferred loading. For icon systems, SVG sprites or component libraries avoid duplicating path data across every page.
Quick Reference
- Only inline SVG when you need CSS hover/animation on individual paths—static SVGs belong in
<img>tags - Keep inline SVGs under 1KB (ideally under 500 bytes) after SVGO optimisation
- Reused icons should be SVG sprites or framework components—not copied inline multiple times
- Run all SVGs through SVGO before inlining to strip editor artefacts
Check
Scan HTML files and React/Vue components for inline <svg> elements. For each inline SVG: 1) Measure its character count—flag any over 1KB (approximately 1000 characters). 2) Check if it is reused in multiple places (should be a component or sprite). 3) Check if SVGO has been run (look for redundant attributes, inline styles that could be CSS classes, or editor comments). 4) Check if the SVG needs to be inline for CSS styling/animation, or if <img src="file.svg"> would suffice. Report each large inline SVG with its size and location.
Fix
For each problematic inline SVG: 1) Large, non-interactive SVG (e.g., illustration): extract to .svg file and reference with <img src="illustration.svg" alt="...">. 2) Reused icon: create an SVG sprite or React component. 3) SVG needing CSS interactivity (hover, animation): keep inline but run through SVGO first—remove editor artefacts, merge paths, remove redundant attributes. 4) For React projects, use SVGR to import SVGs as components—they tree-shake unused SVGs. 5) Show before/after size comparison.
Explain
Explain the trade-offs of inline SVG. Inline SVG allows CSS styling (fill, stroke) and JavaScript animation on individual paths, which external SVG files or <img> elements cannot support. However, large inline SVGs bloat the HTML, delay HTML parser completion, cannot be cached separately from the page, and duplicate markup when used in multiple places. The guidance is: use inline SVG only when you need CSS/JS interactivity; use <img src="file.svg"> or CSS background for static SVGs; use SVG sprites or React components for reused icons.
Code Review
Review image assets, markup, and delivery configuration related to Manage inline SVG size and complexity. Flag exact files or components where format choice, sizing, or loading behavior violates the rule, and describe how to confirm the fix in DevTools.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/images/svg-inline
Preguntas frecuentes
¿Cuándo está bien mantener un SVG en línea?
La skill dice que el SVG en línea es útil cuando necesitas efectos CSS al pasar el ratón o animaciones en partes concretas. Los gráficos estáticos suelen ir en etiquetas de imagen.
¿Qué tamaño se considera demasiado?
La skill sugiere mantener los SVG en línea por debajo de 1 KB tras optimizarlos, e idealmente por debajo de 500 bytes.
¿Esta skill borra los gráficos?
No. Sugiere moverlos a archivos externos o a sprites, en lugar de eliminarlos.
Detalles
Descripción original del autor
Use when reviewing image assets, markup, and CDN or build transforms related to Manage inline SVG size and complexity. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.
Popularidad
- Estrellas en GitHub
- 75 mil
- Posición en el ranking
- #3042
- Licencia
- MIT
- Actualizada
- 31/10/2026
Comentarios
- …
Más skills de este repositorio
frontendchecklist
75 milRevisa código frontend y páginas en vivo con más de 380 reglas de accesibilidad, velocidad, SEO y seguridad, usando una herramienta de línea de comandos.
frontend-checklist-global
75 milAudita un proyecto frontend con las 386 reglas de Front-End Checklist y ofrece una corrección concreta para cada problema encontrado.
404-page
75 milComprueba que tu página de no encontrado ofrezca enlaces útiles y devuelva un estado 404 real, para ayudar a los visitantes perdidos a encontrar su camino.
about-page
75 milRevisa si tu sitio tiene una página Sobre nosotros clara que explique quién lo dirige, para generar confianza en los visitantes y en los buscadores.
Skills parecidas
angular-developer
280 milAyuda a tu agente con código de Angular y la estructura del proyecto. Útil para empezar proyectos, crear partes de código o mejorar el rendimiento y la accesibilidad.
frontend-a11y
280 milAyuda a tu agente a hacer que las interfaces web sean accesibles para todos. Asegura que sitios y apps funcionen bien con lectores de pantalla y navegación por teclado.
frontend-patterns
280 milHace que tu agente aplique patrones modernos en desarrollo frontend. Optimiza el rendimiento, gestiona el estado y sigue buenas prácticas en React y Next.js.