Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Css Pro

ASecurity

Professional CSS: cascade mastery, modern layout, custom properties, and maintainable architecture. Use when writing, reviewing, or debugging CSS.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsgotestingdebuggingapi

Works with

api

Security Analysis

A100/100

Scanned 9/29/2026

$npx -y skills add aicodedecode/awesome-muse-skills --skill css-pro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Css Pro?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Css Pro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodedecode-css-pro/badge)](https://www.skillsdirectory.com/skills/aicodedecode-css-pro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: css-pro
description: Professional CSS: cascade mastery, modern layout, custom properties, and maintainable architecture. Use when writing, reviewing, or debugging CSS.
category: development
---

# CSS Pro

## Overview

Modern CSS — **cascade layers, container queries, `:has()`, subgrid, custom properties, and
logical properties** — has retired most of the hacks and half the frameworks. Professional CSS
means understanding the cascade instead of fighting it with specificity wars, choosing layout tools
deliberately (grid vs flex vs flow), architecting with layers and tokens, and writing CSS that
survives the next developer.

The through-line: the cascade is a feature — architect for it, don't carpet-bomb it with `!important`.

## When to use

- Writing or reviewing CSS for idiom and maintainability.
- Debugging specificity, layout, or cascade issues.
- Architecting stylesheets (layers, tokens, naming).
- Choosing layout approaches (Grid, Flexbox, multicol).
- Building responsive, accessible, themeable interfaces.

## Core concepts

- **The cascade, controlled.** Specificity (inline > ID > class > element), source order, and now
  **cascade layers** (`@layer base, components, utilities`) — layers let you declare precedence
  explicitly instead of winning specificity arms races. Put resets in low layers, utilities high.
- **Custom properties as the design API.** `--color-primary`, `--space-4`, `--radius-lg` —
  theming (dark mode = redefining tokens), runtime changes via JS, and scoped overrides. Properties
  inherit and cascade; use that instead of preprocessor variables for anything dynamic.
- **Layout: the right tool.** Grid for two-dimensional layout (page structure, cards, dashboards);
  Flexbox for one-dimensional distribution (nav bars, button rows, centering); normal flow for
  documents. `subgrid` for aligning nested grids; container queries (`@container`) for components
  that respond to their *container*, not the viewport.
- **Modern selectors.** `:has()` (parent-aware styling), `:is()`/`:where()` (`:where()` has zero
  specificity — perfect for resets), logical properties (`margin-inline-start` for RTL correctness),
  `clamp()`/`min()`/`max()` for fluid type and spacing without breakpoints.
- **Architecture that scales.** Layers + a naming convention (BEM-ish or utility-hybrid) + tokens;
  colocate component styles or centralize deliberately — but one system per codebase. CSS Modules
  or scoped styles for component isolation where the stack supports it.
- **Accessibility is styling too.** `prefers-reduced-motion` (disable non-essential animation),
  `prefers-color-scheme`, focus-visible styles (never remove outlines without replacing them),
  sufficient contrast as a token-level concern, not a per-component hope.

## Practical workflow

1. **Set up the foundation.** Reset (modern: `*, *::before, *::after { box-sizing: border-box;
   margin: 0 }` + sensible defaults), `@layer` order declared, tokens defined on `:root`.
2. **Define tokens first.** Colors (semantic: `--surface`, `--text`, `--accent`), spacing scale,
   type scale, radii, shadows, motion durations. Components consume tokens, never raw values.
3. **Write layout top-down.** Page grid → section layout → component internals. Choose grid/flex
   per axis deliberately; verify at 320px and 200% zoom, not just your monitor.
4. **Style states accessibly.** `:hover`, `:focus-visible`, `:disabled`, `[aria-*]` — every
   interactive element has visible focus and disabled states; motion respects reduced-motion.
5. **Debug systematically.** DevTools: which rule won and why (the cascade panel shows it);
   reduce to a minimal case; check inheritance vs specificity vs layer order before adding weight.
6. **Review CSS for:** specificity creep, raw values instead of tokens, magic numbers, `!important`
   (each needs justification), untested responsive behavior, and missing reduced-motion handling.

Modern CSS sketch:

```css
@layer reset, tokens, base, components, utilities;

@layer tokens {
  :root {
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --space-4: 1rem;
    --radius-lg: 0.75rem;
  }
  @media (prefers-color-scheme: dark) {
    :root { --color-surface: #161616; --color-text: #f0f0f0; }
  }
}

@layer components {
  .card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    /* container-aware: adapts to its wrapper, not the viewport */
    container-type: inline-size;
  }
  @container (min-width: 40rem) {
    .card { display: grid; grid-template-columns: 1fr 2fr; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
```

## Common pitfalls

- **Specificity wars.** `#app .container div.item span` to override a library — then the library
  updates and everything breaks. Layers, `:where()`, and lower-specificity source order instead.
- **`!important` as a habit.** Occasionally justified (utility overrides, reduced-motion reset);
  systemically it's a sign the layering/architecture failed.
- **Pixel-perfect at one viewport.** Fixed widths and magic breakpoints that shatter on real
  devices. Fluid type/spacing (`clamp()`), container queries, and testing at extremes.
- **Removing focus outlines.** `outline: none` without a replacement — keyboard users are now
  lost. `:focus-visible` with a strong, on-brand indicator.
- **Animating layout properties.** `width`/`top`/`margin` animations jank (layout thrash).
  Animate `transform` and `opacity` (compositor-friendly); use the Web Animations API or CSS
  transitions deliberately.
- **Global namespace collisions.** Generic class names (`.title`, `.container`) colliding across
  features. Scoping (modules, layers, naming convention) per the project's system.
- **Ignoring logical properties.** `margin-left` in an RTL language breaks layout. Use
  `margin-inline-start`/`padding-block` for direction-aware styling from the start.

Attribution

aicodedecodeaicodedecode
View sourceSee grades on GitHubMore from aicodedecode →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →