astro-iconify-svgmap

astro-iconify-svgmap is a skill for Claude Code, Codex from stephansama/packages. It costs 96 tokens per session (1,501 once invoked), scanned A, original, MIT.

An Astro integration that builds optimized SVG sprite maps from Iconify icon packs. An SVG sprite map stores reusable icons in one build-generated file, and Astro components reference the needed icon from it.

In plain words
What is it for?
Use it in Astro projects to install Iconify icon packs, generate per-pack SVG sprites, and render selected icons through `getIcon()` and SVG `<use>` elements.
Why use it?
It lets a site register only the icons it uses while preparing sprite files during the build. This provides a defined way to reuse Iconify icons in Astro pages.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is iconifyRootDirectory: new URL("../../", import.meta.url),.

Good fit Use it in Astro projects to install Iconify icon packs, generate per-pack SVG sprites, and render selected icons through getIcon() and SVG elements.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/stephansama/packages
agentmods
npx agentmods add skills/stephansama/packages/astro-iconify-svgmap

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for astro-iconify-svgmap

README.md
[![agentmods](https://agentmods.dev/badge/skills/stephansama/packages/astro-iconify-svgmap/github.svg)](https://agentmods.dev/skills/stephansama/packages/astro-iconify-svgmap)
Your own site
<a href="https://agentmods.dev/skills/stephansama/packages/astro-iconify-svgmap"><img src="https://agentmods.dev/badge/skills/stephansama/packages/astro-iconify-svgmap/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for astro-iconify-svgmap

Your own site · 80×15
<a href="https://agentmods.dev/skills/stephansama/packages/astro-iconify-svgmap"><img src="https://agentmods.dev/badge/skills/stephansama/packages/astro-iconify-svgmap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,501 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00096 $0.01501
Opus 5 $0.00048 $0.00750
Sonnet 5 $0.00019 $0.00300
Haiku 4.5 $0.00010 $0.00150

Measured 8d ago against content hash edcfe1aaae20, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

astro-iconify-svgmap scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

core/astro-iconify-svgmap/skills/astro-iconify-svgmap/SKILL.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

astro-iconify-svgmap

Generates SVG sprite maps from Iconify icon packs at build time and serves them during dev. Icons are registered lazily via getIcon() and assembled into per-pack sprite files.

Setup

  1. Install the integration and at least one @iconify-json/* pack:
pnpm add @stephansama/astro-iconify-svgmap @iconify-json/mdi
  1. Add to astro.config.mjs:
import { createIntegration } from "@stephansama/astro-iconify-svgmap";
import { defineConfig } from "astro/config";

export default defineConfig({
  integrations: [createIntegration()],
});
  1. Import the virtual module in your base layout (this activates the Vite plugin):
---
// src/layouts/BaseLayout.astro
import "virtual:iconify-svgmap";
---
  1. Use icons in any .astro component:
---
import { getIcon } from "@stephansama/astro-iconify-svgmap/get";

const iconHref = await getIcon("mdi", "home");
---

<svg width="24" height="24">
  <use href={iconHref}></use>
</svg>

Core Patterns

Basic icon rendering

---
import { getIcon } from "@stephansama/astro-iconify-svgmap/get";

const href = await getIcon("mdi", "account");
---

<svg width="24" height="24" aria-hidden="true">
  <use href={href}></use>
</svg>

getIcon(pack, name) returns /<pack>.svg#<name> — a fragment reference into the generated sprite. On the server it also registers the icon in the usage tracking file so the build step knows to include it in the sprite.

Monorepo setup with iconifyRootDirectory

// astro.config.mjs — inside a pnpm monorepo where icons are in the workspace root
import { createIntegration } from "@stephansama/astro-iconify-svgmap";
import { defineConfig } from "astro/config";

export default defineConfig({
  integrations: [
    createIntegration({
      iconifyRootDirectory: new URL("../../", import.meta.url),
    }),
  ],
});

iconifyRootDirectory is a URL pointing to the directory whose node_modules contains the @iconify-json/* packages. Defaults to the Astro project root.

Read the full file on GitHub · 217 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 217 lines · 96 tokens per session scan A edcfe1aaae20

Subscribe to this mod's changes

astro-iconify-svgmap is a skill published in the GitHub repository stephansama/packages (5 stars, last pushed 1mo ago), licensed MIT. It adds 96 tokens to every session and 1,501 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

javascript-expert

Expert-level JavaScript development with modern ES2024+ features, Node.js, npm ecosystem, and best practices. Use when the user mentions ECMAScript, ES2024, Node.js, npm, or web, or when the task involves Modern JavaScript, Node.js Development, Modern Tooling, or Functional Programming.

personamanagmentlayer/pcl · 69 tokens

compiler-orchestrator

Orchestrate the Rust compiler port end-to-end. Discovers the current frontier, fixes failing passes, ports new passes, reviews, and commits in a loop.

react/react · 38 tokens

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, services, or HTTP communication, or for best practices on reactivity (signals, linkedSignal, resource, httpResource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component…

angular/angular · 77 tokens

angular-new-app

Creates a new Angular app using the Angular CLI. This skill should be used whenever a user wants to create a new Angular application and contains important guidelines for how to effectively create a modern Angular application.

angular/angular · 43 tokens

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits with the [compiler] or [rust-compiler] prefix.

react/react · 42 tokens

compiler-port

Port a compiler pass from TypeScript to Rust. Gathers context, plans the port, implements in a subagent with test-fix loop, then reviews.

react/react · 35 tokens