frontend-conventions
Skill17 starsChanged 6 months agoMITView on GitHub
Define and enforce consistent coding standards across HTML, CSS, and JavaScript. Always use this skill when naming a new class, variable, component, or file; setting up a new project's conventions; choosing a class prefix for a new CSS category; deciding on modifier API names (sizes, shades, hierarchy, breakpoints); or reviewing code for formatting and naming consistency. If you're about to invent a prefix, abbreviation, or modifier name without checking the conventions first, use this skill.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- jbouder/skillstheir own version, first seen Nov 1, 2026
- leroyguillaume/claudetheir own version, first seen Oct 30, 2026
- fpindej/netrocktheir own version, first seen Oct 8, 2026
- cloudflare/cloudflare-ostheir own version, first seen Sep 21, 2026
- aylinmarie/code-working-agentstheir own version, first seen Aug 19, 2026
- Benjaming61001/skillstheir own version, first seen Aug 10, 2026
Used with
Projects with it also use backend-conventions.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillbackend-conventions
Sentry backend conventions for logging, tracing/spans, span/tag attribute naming, metrics tags, and the options system. Use when adding or editing Python in src/ that logs (logger.info/exception), records metrics (metrics.incr/timing with tags), instruments spans/transactions, calls sentry_sdk.set_tag/set_attribute or set_span_tag/set_span_data, or reads registered options with options.get(). Trigger on "add logging", "log an error", "add a metric", "add a span", "instrument tracing", "set an attribute", "add a tag", "read an option", "LOG005", "LOG011", or metrics tag cardinality questions.
Also in 3 projects that use this
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- cloudflare/cloudflare-os★ 12ksame name
- fpindej/netrock★ 234same name
- leroyguillaume/claude★ 7same name
- Benjaming61001/skills★ 1same name
- jbouder/skills★ 1same name
- kimzeze/frontend-conventions★ 1same name
- aylinmarie/code-working-agents★ 0same name
- ryokkon624/scrum-agent-base★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- brightcove-playerSkill
- format-storybookSkill
- frontend-a11ySkill
- frontend-design-2010sSkill
- grill-my-designSkill
- ios-a11ySkill
- more-cssSkill
- socratic-provocateurSkill
- tiny-cssSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
All CSS classes are prefixed by category so their purpose is immediately visible in HTML.
- Distinctive: line 58
When working within a named project or library, prefix everything with a project namespace to prevent collisions:
- Distinctive: line 87
Only use abbreviations from this list — everything else is spelled out in full.
- Distinctive: line 104
Use these standardized modifier names so any developer can predict class names without checking documentation.
- Distinctive: line 154
Write CSS properties in this order within every rule.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Conventions
A shared system of rules for naming, formatting, and structuring code across HTML, CSS, and JavaScript. Consistency here is what makes a codebase feel like it was written by one person, regardless of team size.
Code Formatting
General
| Setting | Value |
| Indentation | spaces |
| Tab size | 2 |
| Translate tabs to spaces | Yes |
| Trim trailing whitespace | Yes |
| New line at end of file | Yes |
Quotes by File Type
| File type | Quote style |
.html | "double" |
.css | 'single' |
.js | 'single' |
.json | "double" |
.yml | none in general; 'single' when forcing a string or using special characters; "double" when parsing escape codes |
Naming Cases
| What you're naming | Case style |
| HTML attributes and values | dash-case |
| CSS custom property | --dash-case |
| JavaScript variable / function | camelCase |
| JavaScript class | PascalCase |
| File names | dash-case.extension |
Naming Prefixes
All CSS classes are prefixed by category so their purpose is immediately visible in HTML.
| Category | Prefix |
| Component | c- |
| Utility | u- |
| JavaScript hook | js- |
js- classes are never styled — they exist solely as selectors for JavaScript behavior.
Namespacing
When working within a named project or library, prefix everything with a project namespace to prevent collisions:
| Scope | Namespace |
| Global/custom property | --namespace-property-name |
| Scoped/component property | --prefix-namespace-block-property |
Examples:
/* Global token */
var(--mmn-color-bg-primary)
/* Scoped to a component */
var(--c-mmn-card-border-radius)Frontend Naming Patterns
| Type | Pattern | Example |
| HTML custom element | <namespace-element-name> | <mmn-card> |
| HTML data attribute | data-namespace-attribute | data-mmn-uuid="rng1928" |
| CSS selector | class="prefix-namespace-block__element--modifier" | class="c-mmn-card__media--video" |
| JS selector | class="js-namespace-target" | class="js-mmn-card-for-ab-test" |
Acceptable Abbreviations
Only use abbreviations from this list — everything else is spelled out in full.
| Full word | Abbreviation |
| Image | img |
| Background | bg |
| Minimum | min |
| Maximum | max |
| Call to action | cta |
| Column | col |
| Column span | colspan |
| Row span | rowspan |
Modifier API
Use these standardized modifier names so any developer can predict class names without checking documentation.
Size Scale
2xs · xs · sm · md · lg · xl · 2xl
<!-- The 2xl heading component -->
<h1 class="c-mmn-heading--2xl">...</h1>Tints and Shades
xxlight · xlight · light · medium · dark · xdark · xxdark
<!-- The xdark magenta utility color -->
<span class="u-mmn-color-magenta-xdark">...</span>Hierarchy
primary · secondary · tertiary
<!-- The primary button component -->
<button class="c-mmn-button--primary" type="button">...</button>Responsive Behavior
Apply a utility or modifier at a specific breakpoint using @from- and @until- suffixes:
| Syntax | Meaning |
behavior@from-[breakpoint] | Apply from this breakpoint and up |
behavior@until-[breakpoint] | Apply below this breakpoint |
<!-- Full width from the sm breakpoint and beyond -->
<div class="u-mmn-full-width@from-sm">...</div>
<!-- Full width below the sm breakpoint only -->
<div class="u-mmn-full-width@until-sm">...</div>CSS Property Order
Write CSS properties in this order within every rule. Grouping by concern (display → position → size → space → typography → border → background → advanced) makes rules easier to scan and diff.
.selector {
content;
/* Display */
display;
grid;
grid-*;
flex;
flex-*;
justify-*;
align-*;
place-*;
order;
box-sizing;
appearance;
visibility;
opacity;
/* Position */
position;
inset;
inset-block;
inset-block-start;
inset-block-end;
inset-inline;
inset-inline-start;
inset-inline-end;
float;
clear;
transform;
z-index;
/* Size */
inline-size;
min-inline-size;
max-inline-size;
block-size;
min-block-size;
max-block-size;
overflow;
overflow-block;
overflow-inline;
/* Space */
margin;
margin-block;
margin-block-start;
margin-block-end;
margin-inline;
margin-inline-start;
margin-inline-end;
padding;
padding-block;
padding-block-start;
padding-block-end;
padding-inline;
padding-inline-start;
padding-inline-end;
/* Typography */
font;
font-family;
font-style;
font-size;
font-weight;
font-feature-settings;
font-variant;
line-height;
list-style;
color;
text-align;
text-decoration;
text-transform;
text-wrap;
letter-spacing;
vertical-align;
cursor;
pointer-events;
user-select;
/* Border */
border;
border-radius;
border-width;
border-style;
border-color;
border-image;
box-shadow;
outline;
/* Background */
background;
background-color;
background-image;
background-position;
background-repeat;
background-size;
backdrop-filter;
/* Advanced */
filter;
will-change;
transition;
animation;
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

