Skip to content
Agentmart
Submit a tool

css-quality

CSS quality — specificity, magic numbers, responsive.

Skill by Dev-Toolbelt

IndexedMIT★ 7
Write a review

Chalk Labs

Need help deploying css-quality?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/dev-toolbelt-css-quality

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

CSS quality — specificity, magic numbers, responsive. Agnostic.

Use cases: frontend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/css-quality

What's inside

Skill name
css-quality
Description
CSS quality — specificity, magic numbers, responsive. Agnostic.
License
MIT
Instructions
107 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# CSS Quality

## Detect the Project's Styling Strategy First

Before writing any CSS, identify what the project already uses:

| Signal | Strategy |
|---|---|
| `tailwind.config.*`, `@apply`, utility classes in markup | Utility-first (Tailwind or equivalent) |
| `*.module.css` imports, `styles.module.*` | CSS Modules |
| `styled-components`, `@emotion/styled`, `css` template literals | CSS-in-JS |
| `.scss` / `.sass` files, `@mixin`, `@include` | Sass/SCSS |
| Global `styles.css` / `main.css`, BEM class names | Global CSS + BEM |

**Never mix strategies** in the same codebase unless the project explicitly documents it.

---

## Universal Rules (apply to every strategy)

### No magic numbers
Every numeric value that carries design meaning must be a token or variable.

```css
/* bad */
margin-top: 13px;
color: #3b82f6;

/* good */
margin-top: var(--spacing-3);
color: var(--color-primary);
```

Define tokens in a single source of truth (`:root` variables, a theme file, or Tailwind config). Duplication of raw values across files is a DRY violation.

### No `!important`
`!important` signals a specificity conflict that should be solved at the source. The only accepted exceptions: third-party override utilities and print stylesheets.

### No deeply nested selectors
Cap nesting at 3 levels. Deeper nesting creates high specificity that is hard to override and signals the component should be split.

```css
/* bad — depth 4 */
.card .header .title span { }

/* good */
.card-title { }
```

### Responsive: mobile-first by default
Use `min-width` breakpoints unless the project documents a desktop-first baseline. Mobile-first produces less CSS and is easier to override progressively.

```css
/* good */
.container { width: 100%; }
@media (min-width: 768px) { .container { width: 720px; } }
```

### Motion: respect user preferences
Any animation or transition must be wrapped in a `prefers-reduced-motion` guard.

```css
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform 200ms ease; }
}
```

### `will-change` sparingly
Declare `will-change` only immediately before an animation triggers, not as a permanent style. Overuse forces GPU layers and increases memory consumption.

---

## Strategy-Specific Rules

### Utility-first (Tailwind)
- Extract repeated utility combinations into a component or a `@layer components` class — not inline repetition across 10 files
- Never write custom CSS to replicate what a Tailwind utility already does
- Purge config must cover all template paths — unused utilities in production are a build quality issue

### CSS Modules
- One module per component file — no shared `styles.module.css` across components
- Use camelCase class names in the module so they work naturally as JS properties
- Avoid composing across module files (`composes: foo from '../other.module.css'`) — creates implicit coupling

### CSS-in-JS
- Never inline complex style objects directly in JSX — extract to a named `const` or a separate styles file
- Avoid dynamic styles that change on every render (new object reference each time) — memoize with `useMemo` or extract static styles outside the component

### Global CSS + BEM
- Block, Element, Modifier: `block__element--modifier`
- One block per file
- No element targeting a block from another file: `.card .button` is coupling, not composition

---

## Anti-Patterns

| Anti-Pattern | Problem |
|---|---|
| `color: red` / `margin: 5px` hardcoded | Breaks design token consistency |
| Overriding with `!important` | Masks a specificity bug |
| Mixing responsive strategies (some mobile-first, some desktop-first) | Unpredictable cascade |
| Animating `width`, `height`, `top`, `left` | Triggers layout — animate `transform` and `opacity` instead |
| CSS reset inside a component | Bleeds into global scope; use scoped styles |
| Selector like `div > ul > li > a` | Fragile — breaks with any markup change |

From Dev-Toolbelt/dev-team-agents, MIT.

More from Dev-Toolbelt/dev-team-agents

Signals

Stars
7
Forks
0
Open issues
0
Last commit (this folder)
Oct 18, 2026 (13 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Dev-Toolbelt

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get css-quality running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying css-quality?

CallGet help
Cite this page

css-quality skill. Agent Mart. https://agentmart.dev/skills/dev-toolbelt-css-quality (last updated 2026-10-24)