css-modules

css-modules is a skill for Claude Code, Codex from MadAppGang/magus. It costs 42 tokens per session (3,328 once invoked), scanned A, a copy of css-modules, MIT.

A guide for CSS Modules, which keep component styles local by generating unique class names during the build.

In plain words
What is it for?
Use it to scope component styles, create complex animations, style third-party components, or migrate older CSS in Vite projects.
Why use it?
It prevents unrelated components from accidentally sharing or overriding CSS rules.

Skill for Claude CodeCodex

Part of the dev plugin — 41 skills, 13 commands, 13 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/madappgang/magus/css-modules
Any agent
npx skills add MadAppGang/magus --skill css-modules
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/magus

Made for: Claude Code, Codex.

Or install dev, the plugin that ships this one along with the rest of its 41 skills, 13 commands, 13 agents.

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 css-modules

README.md
[![agentmods](https://agentmods.dev/badge/skills/madappgang/magus/css-modules.svg)](https://agentmods.dev/skills/madappgang/magus/css-modules)
Your own site
<a href="https://agentmods.dev/skills/madappgang/magus/css-modules"><img src="https://agentmods.dev/badge/skills/madappgang/magus/css-modules.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,328 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 94% copy Near-identical to another mod 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 $0.00042 $0.03328
Opus 5 $0.00021 $0.01664
Sonnet 5 $0.00008 $0.00666
Haiku 4.5 $0.00004 $0.00333

Measured yesterday against content hash aeea22dffff9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

css-modules 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 yesterday.

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.

Origin

This is a copy

94% identical to css-modules — 6 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/dev/skills/frontend/css-modules/SKILL.md · 598 lines

How it starts

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

CSS Modules

Overview

CSS Modules provide locally-scoped CSS by automatically generating unique class names at build time. This prevents style conflicts and enables true component encapsulation.

When to Use CSS Modules

Use Case CSS Modules Tailwind
Complex animations Best Good
Third-party component styling Best Harder
Legacy CSS migration Best Refactor needed
Rapid prototyping Slower Best
Design system utilities Not ideal Best
Component encapsulation Best N/A
Team with CSS expertise Best Either

Hybrid Approach: Use both together - Tailwind for utilities, CSS Modules for complex components.


Documentation Index

Vite Integration

Topic URL Description
CSS Modules in Vite https://vite.dev/guide/features#css-modules Vite's built-in support
Lightning CSS https://vite.dev/guide/features#lightning-css Fast CSS transforms
PostCSS https://vite.dev/guide/features#postcss PostCSS configuration

Lightning CSS

Topic URL Description
Documentation https://lightningcss.dev/docs.html Official docs
CSS Modules https://lightningcss.dev/css-modules.html Module support
Transpilation https://lightningcss.dev/transpilation.html Browser targeting
Bundling https://lightningcss.dev/bundling.html CSS bundling

CSS Modules Spec

Topic URL Description
CSS Modules https://github.com/css-modules/css-modules Specification
Composition https://github.com/css-modules/css-modules#composition Composing classes
Scoping https://github.com/css-modules/css-modules#naming Local vs global

TypeScript Integration

Topic URL Description
typed-css-modules https://github.com/Quramy/typed-css-modules Generate .d.ts files
vite-plugin-css-modules-dts https://github.com/mrcjkb/vite-plugin-css-modules-dts Vite plugin

Read the full file on GitHub · 598 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. yesterday First seen · 598 lines · 42 tokens per session scan A aeea22dffff9

Subscribe to this mod's changes

css-modules is a skill published in the GitHub repository MadAppGang/magus (9 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 3,328 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to css-modules, differing in 6 lines, and is treated as a copy.

Related

Other skills, from other repositories

Shade ShadCN install

Guardrails for running pnpm dlx shadcn@latest add in Shade — never overwrite existing components, fresh branch first, swap raw colours for semantic tokens after integrating. Trigger when the user proposes a shadcn add, or when a fresh ShadCN-shaped file lands in apps/shade/src/components/ui.

TryGhost/Ghost · 72 tokens

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

frontend-visual-qa

Audits already-rendered web, landing-page, HTML deck/slide, browser tool/game, dashboard/admin, design-system, and desktop UIs using real-browser or native-app journeys, inspected screenshots, DOM geometry, responsive or projection viewports, and a bundled Playwright sweep. Use after UI implementation to find…

daymade/claude-code-skills · 145 tokens

prototype-web

可点击的功能性 Web 原型, 含导航、英雄区、特性区、CTA.

nexu-io/html-anything · 24 tokens

waitlist-page

【模板: 等候名单页 / Waitlist】 【意图】为新产品 / 早鸟内测做一张极简等候页。 【布局】.

nexu-io/html-anything · 25 tokens

design-frontend-dev

Clean Impeccable frontend design skill. Use when the user wants to design, redesign, critique, audit, polish, harden, optimize, adapt, clarify, colorize, animate, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, onboarding, empty states…

The-Vibe-Company/companion · 127 tokens