css-modules

css-modules is a skill for Claude Code from MadAppGang/claude-code. It costs 52 tokens per session (3,333 once invoked), scanned A, original, MIT.

A guide to CSS Modules, where each component's CSS gets locally scoped names so styles do not accidentally affect other components. It also covers Vite, Lightning CSS, PostCSS, TypeScript, and CSS composition.

In plain words
What is it for?
Use it to build scoped component styles, complex animations, third-party customizations, or to migrate a legacy stylesheet.
Why use it?
It reduces style conflicts and makes complex component styling easier to maintain, especially when working with third-party components or older CSS.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dev plugin — 47 skills, 12 commands, 14 agents shipped together

Good fit Use it to build scoped component styles, complex animations, third-party customizations, or to migrate a legacy stylesheet.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/madappgang/claude-code/css-modules
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.

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

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 47 skills, 12 commands, 14 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/claude-code/css-modules/github.svg)](https://agentmods.dev/skills/madappgang/claude-code/css-modules)
Your own site
<a href="https://agentmods.dev/skills/madappgang/claude-code/css-modules"><img src="https://agentmods.dev/badge/skills/madappgang/claude-code/css-modules/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 css-modules

Your own site · 80×15
<a href="https://agentmods.dev/skills/madappgang/claude-code/css-modules"><img src="https://agentmods.dev/badge/skills/madappgang/claude-code/css-modules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,333 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.00052 $0.03333
Opus 5.5 $0.00021 $0.01333
Sonnet 5.5 $0.00010 $0.00667
Haiku 4.5 $0.00005 $0.00333

Measured 1mo ago against content hash 0a5178b82cd8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

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

How it starts

The opening of the file, as written. The whole thing — 600 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 · 600 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. 1mo ago First seen · 600 lines · 52 tokens per session scan A 0a5178b82cd8

Subscribe to this mod's changes

css-modules is a skill published in the GitHub repository MadAppGang/claude-code (286 stars, last pushed 7mo ago), licensed MIT. It adds 52 tokens to every session and 3,333 once invoked, about $0.0002 per session on Opus 5.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-09-03.

Related

Other skills, from other repositories

anti-slop-design

Autonomous Principal Design Technologist. Cures vibe-coded software from AI frontend slop using curated token archetypes and 7-axis quality gating.

sickn33/agentic-awesome-skills · 34 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

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ultragoal with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 52 tokens

frontend-ui-dark-ts

Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces with a refined dark aesthetic.

microsoft/skills · 48 tokens

frontend-visual-qa

Audits rendered UI and specific task/object-link handoffs; excludes ordinary source citations alone. Audits already-rendered UI and Markdown/Obsidian image layout — web app, deck/slide, dashboard, design-system, or Electron/native app — via real-browser/native-app journeys and a Playwright sweep. Use after UI…

daymade/claude-code-skills · 125 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens