html-css

html-css is a cursor rule for Cursor from inboxpraveen/Minimize-Cursor-Cost. It costs 0 tokens per session (385 once invoked), scanned A, original, Apache-2.0.

A set of rules for editing HTML and CSS, the languages used to structure and style web pages. It covers focused output, existing styling methods, responsive utility classes, Sass, and accessibility details.

In plain words
What is it for?
Use it when changing page elements, CSS selectors, Tailwind classes, Sass styles, responsive layouts, or accessibility-related markup.
Why use it?
It prevents unrelated markup or styling from being reformatted and avoids introducing a different CSS approach halfway through a project. It also protects existing accessibility attributes and conventions.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/inboxpraveen/minimize-cursor-cost/html-css
Clone the repo
git clone --depth 1 https://github.com/inboxpraveen/Minimize-Cursor-Cost

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for html-css

README.md
[![agentmods](https://agentmods.dev/badge/rules/inboxpraveen/minimize-cursor-cost/html-css.svg)](https://agentmods.dev/rules/inboxpraveen/minimize-cursor-cost/html-css)
Your own site
<a href="https://agentmods.dev/rules/inboxpraveen/minimize-cursor-cost/html-css"><img src="https://agentmods.dev/badge/rules/inboxpraveen/minimize-cursor-cost/html-css.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 385 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00385
Opus 5 $0.00000 $0.00192
Sonnet 5 $0.00000 $0.00077
Haiku 4.5 $0.00000 $0.00038

Measured 3d ago against content hash 985700341676, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

html-css scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

lean-cursor/.cursor/rules/html-css.mdc · 41 lines

What it actually says

HTML / CSS Rules

Output

  • Show only the affected element / selector.
  • Don't reprint surrounding markup unless needed for selector context.
  • Don't reformat indentation in unrelated lines.

CSS

  • Match existing methodology: BEM / utility-first (Tailwind) / CSS Modules / plain.
  • Don't introduce a new methodology mid-file.
  • Don't add CSS custom properties (vars) if the file doesn't use them.
  • Don't add vendor prefixes — assume autoprefixer or modern browsers unless told otherwise.

Tailwind

  • Match existing class ordering style.
  • Don't introduce arbitrary values (w-[123px]) when a scale value works.
  • Don't add @apply rules unless the codebase uses them.
  • Don't add new custom theme entries to tailwind.config.* unless asked.

SCSS / Sass

  • Don't add nested selectors deeper than the existing file.
  • Don't introduce mixins for one-off use.
  • Match existing module/import style (@use vs @import).

Accessibility

  • Preserve existing ARIA attributes — don't strip them.
  • Don't add ARIA attributes that duplicate semantic HTML (e.g., role="button" on <button>).
  • Match existing alt-text style (don't suddenly add alt="" to all images).

Never

  • Don't change the design system colors / spacing scale.
  • Don't introduce CSS-in-JS to a CSS-file project (or vice versa).
  • Don't add !important to fix specificity — fix the selector.
  • Don't restructure HTML semantics (<div><section>) unless the task is a11y.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 41 lines · 0 tokens per session scan A 985700341676

Subscribe to this mod's changes

html-css is a cursor rule published in the GitHub repository inboxpraveen/Minimize-Cursor-Cost (7 stars, last pushed 18d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 385 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.