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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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.
Popularity
- GitHub stars
- 75k
- Ranking position
- #2946
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.