css

A set of guidelines for writing and understanding CSS, the language that controls how web pages look and arrange themselves. It covers layouts, responsive designs, SCSS, selectors, and the order in which styles apply.

In plain words
What is it for?
Writing, reviewing, refactoring, debugging, or explaining CSS, SCSS, page layouts, and mobile-friendly styles.
Why use it?
It helps prevent styles from unexpectedly overriding one another or becoming difficult to change. The guidance favors simple selectors and clear structure.

Skill for Claude CodeCodex

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/xobotyi/cc-foundry/css
Any agent
npx skills add xobotyi/cc-foundry --skill css
Clone the repo
git clone --depth 1 https://github.com/xobotyi/cc-foundry

Made for: Claude Code, Codex.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,741 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00055 $0.03741
Opus 5 $0.00028 $0.01870
Sonnet 5 $0.00011 $0.00748
Haiku 4.5 $0.00006 $0.00374

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

Security

Grade B, and why

css scanned grade B with 1 finding 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 2d 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

- Don't lecture or quote the rule — state what's wrong and how to fix it.
plugins/frontend/skills/css/SKILL.md · 314 lines

How it starts

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

CSS

Predictability is the highest CSS virtue. If your styles require !important to work, restructure the cascade.

CSS rewards explicit, low-specificity selectors and intentional cascade ordering. Prefer boring, readable patterns over clever one-liners.

References

  • Layout — [${CLAUDE_SKILL_DIR}/references/layout.md]: Flex shorthand values, grid details (subgrid, implicit rows, alignment), layout patterns
  • Modern CSS — [${CLAUDE_SKILL_DIR}/references/modern-css.md]: Extended modern CSS patterns and examples
  • SCSS — [${CLAUDE_SKILL_DIR}/references/scss.md]: @forward patterns, module configuration, built-in modules, file organization
  • Responsive — [${CLAUDE_SKILL_DIR}/references/responsive.md]: Extended responsive design patterns and examples
  • Methodologies — [${CLAUDE_SKILL_DIR}/references/methodologies.md]: Methodology patterns and architecture details

Selectors and Specificity

  • Single class selectors by default — keep specificity flat at 0-1-0
  • Never use ID selectors for styling — IDs are for anchors and JS hooks
  • Never qualify classes with elements — .error not div.error
  • Max nesting depth: 3 levels — deeper nesting couples CSS to DOM structure
  • Avoid !important — use cascade layers or restructure selectors instead; only valid use is in a low-priority reset layer for truly essential styles
  • Use :where() to zero-out specificity when needed — :where(.card) .title has 0-0-1 specificity
  • Use :is() with awareness — it takes the highest specificity of its arguments
  • Flatten nested selectors in SCSS — ability to nest does not mean you should

Layout Systems

Choosing Flexbox vs Grid

Use Case System
One-dimensional flow (row or column) Flexbox
Two-dimensional layout (rows AND columns) Grid
Content-driven sizing Flexbox
Layout-driven sizing Grid
Component internals (nav items, card content) Flexbox
Page-level structure, complex arrangements Grid
Items need to wrap naturally Flexbox
Precise placement on named lines/areas Grid

Read the full file on GitHub · 314 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 314 lines · 55 tokens per session scan B e3f8423898ed

Subscribe to this mod's changes

css is a skill published in the GitHub repository xobotyi/cc-foundry (20 stars, last pushed 2d ago), licensed MIT. It adds 55 tokens to every session and 3,741 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

design-guide

Paperclip UI design system guide for building consistent, reusable frontend components. Use when creating new UI components, modifying existing ones, adding pages or features to the frontend, styling UI elements, or when you need to understand the design language and conventions. Covers: component creation, design…

paperclipai/paperclip · 105 tokens

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

material-ui-tailwind

Integrates Material UI with Tailwind CSS v4 using cascade layers (enableCssLayer, @layer order) and documents Tailwind v3 interoperability (preflight, important, injectFirst, portals). Use when combining MUI with Tailwind utilities, slotProps className, or theme token bridges.

mui/material-ui · 67 tokens

frontend-design

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Use whenever the task produces or modifies anything a user will see rendered — websites, landing pages, web apps, dashboards, React/HTML/Vue components, artifacts with visual output, style overhauls, or "make this…

XiaomiMiMo/MiMo-Code · 111 tokens

author-component

Create or review Blazor components (.razor files) with correct architecture. USE FOR: writing new Blazor components that do NOT involve JavaScript interop, implementing parameters and EventCallback, RenderFragment slots, component lifecycle (OnInitializedAsync, OnParametersSet), async patterns, IAsyncDisposable…

dotnet/skills · 148 tokens