Skip to content
Skillpedia
Websites & UI (frontend)75k · #2946

naming-conventions

What it does

This skill reviews CSS class names and suggests a consistent naming pattern such as BEM. It is for front-end developers and teams who want styles that are easy to find and change.

When to use it

  • ✓When you ask the agent to clean up or standardize CSS class names.
  • ✓When it is hard to tell what a class does and styles keep clashing across components.
  • ✓When you start a new project and want a clear naming convention from the beginning.

Skill link

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/naming-conventions/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/naming-conventions/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“My CSS class names are a mess. Can you rename them using a consistent pattern like BEM?”

5 new skills a week. 1 minute to read.

How it works

The agent reviews the class names in your stylesheets and rewrites them into block, element, and modifier forms. It keeps names in kebab-case and separates utility classes from component styles.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Use consistent CSS naming conventions

Without a naming convention, class names become a guessing game — does .active mean the nav item is active, the button is pressed, or a form field has focus? With BEM or a similar methodology, .button--active is unambiguous. This reduces the time spent searching for existing styles and prevents accidental style conflicts.

Quick Reference

  • BEM (Block__Element--Modifier) is the most widely adopted naming convention
  • Consistent naming lets you understand a class's purpose without reading its styles
  • Namespace utility classes and JS hooks separately from component styles
  • Use kebab-case for class names (not camelCase or snake_case)

Check

Audit the class names in this CSS file. Are they consistently named? Do they follow a clear convention? Are there any ambiguous names that could conflict?

Fix

Rename classes to follow BEM methodology: Block, Block__Element, Block--Modifier pattern.

Explain

Explain BEM naming convention, why naming conventions matter, and how to apply BEM to a real component.

Code Review

Review stylesheets, component styles, and responsive states related to Use consistent CSS naming conventions. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/css/naming-conventions

FAQ

What is BEM?

BEM stands for Block, Element, and Modifier, and it gives class names a clear structure such as button--active.

Why use kebab-case?

The skill recommends it over camelCase or snake_case to keep class names consistent.

Should JavaScript hooks have their own names?

Yes. The skill suggests keeping JavaScript hooks in their own namespace, separate from component styles.

Details

Original description by the author

Use when reviewing stylesheets, component styles, and responsive behavior related to Use consistent CSS naming conventions. Check the rendered layout across breakpoints and interaction states before proposing a fix.

repo: thedaviddias/Front-End-Checklist

Popularity

GitHub stars
75k
Ranking position
#2946
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills