Skip to main content
skill CX Codex

css-architecture — Claude Code skill: CSS that stays organized

A skill that gives your coding agent conventions for structuring CSS with BEM, SMACSS and CSS-in-JS. Handy when stylesheets outgrow the naming scheme you started with.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill css-architecture -a claude-code
Open on GitHub

What css-architecture does

The skill hands the agent a framework for styling work: BEM, SMACSS and CSS-in-JS patterns instead of class names invented on the spot. It ships a short starter example with a block, an element and a modifier, plus reference guides in references/ covering BEM, SMACSS, styled components, CSS custom properties and a utility-first Tailwind-style approach.

It fits large stylesheets, component-based markup and projects where several people touch the same CSS. Because the agent gets naming conventions up front, a new class lands inside the existing scheme rather than beside it.

One caveat: the skill describes methodologies, it does not lint your code. If your project already follows its own style guide, expect to reconcile the two yourself — worth checking the conventions before you ask the agent to rewrite anything.

What it helps with

  • split styles into blocks, elements and modifiers
  • pick between BEM, SMACSS and CSS-in-JS for a new project
  • settle on class naming across a team
  • move hardcoded colors and spacing onto CSS custom properties
  • turn a sprawling stylesheet into a component structure

Example prompts for the agent

  • Refactor this component's styles into BEM and show me the class names
  • Help me choose between SMACSS and CSS-in-JS for this project
  • Convert these hardcoded colors to CSS custom properties

How to install css-architecture

1Skills CLI (Vercel)

npx skills add aj-geddes/useful-ai-prompts --skill css-architecture -a claude-code

2Manually: put the files in place

~/.claude/skills/css-architecture/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/css-architecture/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about css-architecture

How do I install css-architecture in Claude?

Run npx skills add aj-geddes/useful-ai-prompts --skill css-architecture -a claude-code. The skill file then lives at ~/.claude/skills/css-architecture/SKILL.md.

What does css-architecture do?

It gives the agent conventions for organizing CSS: BEM, SMACSS, CSS-in-JS, custom properties and a utility-first approach. The agent follows them when writing or renaming styles.

Does the skill check my CSS on its own?

No. It is a set of methodologies and examples for the agent, not a linter. It reviews and edits only when you ask.

Source text

SKILL.md · MIT
---
name: css-architecture
description: >
  Organize CSS using BEM, SMACSS, and CSS-in-JS patterns. Use when building
  scalable, maintainable styling systems with proper naming conventions.
---

# CSS Architecture

## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)

## Overview

Build maintainable CSS systems using methodologies like BEM (Block Element Modifier), SMACSS, and CSS-in-JS patterns with proper organization and conventions.

## When to Use

- Large-scale stylesheets
- Component-based styling
- Design system development
- Multiple team collaboration
- CSS scalability and reusability

## Quick Start

Minimal working example:

```css
/* Block - standalone component */
.button {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

/* Element - component part */
.button__icon {
  margin-right: 8px;
  vertical-align: middle;
}

/* Modifier - variant */
.button--primary {
  background-color: #007bff;
  color: white;
}

.button--primary:hover {
  background-color: #0056b3;
// ... (see reference guides for full implementation)
```

## Reference Guides

Detailed implementations in the `references/` directory:

| Guide | Contents |
|---|---|
| [BEM (Block Element Modifier) Pattern](references/bem-block-element-modifier-pattern.md) | BEM (Block Element Modifier) Pattern |
| [SMACSS (Scalable and Modular Architecture for CSS)](references/smacss-scalable-and-modular-architecture-for-css.md) | SMACSS (Scalable and Modular Architecture for CSS) |
| [CSS-in-JS with Styled Components](references/css-in-js-with-styled-components.md) | CSS-in-JS with Styled Components |
| [CSS Variables (Custom Properties)](references/css-variables-custom-properties.md) | CSS Variables (Custom Properties) |
| [Utility-First CSS (Tailwind Pattern)](references/utility-first-css-tailwind-pattern.md) | Utility-First CSS (Tailwind Pattern) |

## Best Practices

### ✅ DO

- Follow established patterns and conventions
- Write clean, maintainable code
- Add appropriate documentation
- Test thoroughly before deploying

### ❌ DON'T

- Skip testing or validation
- Ignore error handling
- Hard-code configuration values

© aj-geddes · MIT · aj-geddes/useful-ai-prompts

Similar skills

Everything for Frontend and UI →

From the same set143

markdown-documentation A skill that gives the agent a fixed set of Markdown rules for READMEs, wikis and docs pages. Useful when the model writes the text and it has to look consistent. CX Codex +1 1,300installs terraform-infrastructure Guides the agent in configuring cloud infrastructure with Terraform modules and remote state. Useful when managing dev, staging, and prod environments. CX Codex +1 1,200installs penetration-testing Security testing skill that guides ethical hacking, simulated attacks, and vulnerability documentation across applications and infrastructure. CX Codex +1 1,100installs responsive-web-design A skill that steers your coding agent toward mobile-first CSS with Flexbox, Grid and media queries. Useful when one layout has to hold up on phones and desktops. CX Codex +1 1,100installs api-contract-testing Verifies API contracts between consumers and providers without full integration tests. Helps stop breaking schema changes before deploying microservices. CX Codex +1 913installs event-sourcing A skill that guides your coding agent through event sourcing and CQRS: an event store, aggregates, projections and snapshots. Useful when you need a full change history and queries against past state. CX Codex +1 886installs root-cause-analysis A skill that walks an incident down to the cause you can actually fix, instead of patching the symptom again. CX Codex +1 884installs api-security-hardening Skill adds authentication, rate limiting, CORS, input validation and security headers to REST API endpoints. CX Codex +1 862installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor