useclassy-authoring.cursor-rule

useclassy-authoring.cursor-rule is a cursor rule for Cursor from jrmybtlr/useclassy. It costs 0 tokens per session (517 once invoked), scanned A, original, MIT.

A coding rule for writing UseClassy modifier attributes, which move Tailwind CSS variants such as hover or responsive styles from class names into separate attributes.

In plain words
What is it for?
Use it when adding or migrating static Tailwind variants in HTML, Vue, Svelte, Blade, React, or similar files.
Why use it?
It keeps styling syntax consistent and helps refactor existing variant classes without changing their behavior.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when adding or migrating static Tailwind variants in HTML, Vue, Svelte, Blade, React, or similar files.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/jrmybtlr/useclassy/useclassy-authoring.cursor-rule
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.

Clone the repo
git clone --depth 1 https://github.com/jrmybtlr/useclassy

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 useclassy-authoring.cursor-rule

README.md
[![agentmods](https://agentmods.dev/badge/rules/jrmybtlr/useclassy/useclassy-authoring.cursor-rule/github.svg)](https://agentmods.dev/rules/jrmybtlr/useclassy/useclassy-authoring.cursor-rule)
Your own site
<a href="https://agentmods.dev/rules/jrmybtlr/useclassy/useclassy-authoring.cursor-rule"><img src="https://agentmods.dev/badge/rules/jrmybtlr/useclassy/useclassy-authoring.cursor-rule/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for useclassy-authoring.cursor-rule

Your own site · 80×15
<a href="https://agentmods.dev/rules/jrmybtlr/useclassy/useclassy-authoring.cursor-rule"><img src="https://agentmods.dev/badge/rules/jrmybtlr/useclassy/useclassy-authoring.cursor-rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 517 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00517
Opus 5.5 $0.00000 $0.00207
Sonnet 5.5 $0.00000 $0.00103
Haiku 4.5 $0.00000 $0.00052

Measured 1mo ago against content hash e883be355046, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

useclassy-authoring.cursor-rule 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 1mo 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.

templates/useclassy-authoring.cursor-rule.mdc · 40 lines

What it actually says

UseClassy authoring and refactoring

When this project uses vite-plugin-useclassy, write new static Tailwind variants as modifier attributes and migrate existing static variant tokens when behavior is preserved.

Conversion

<!-- Before -->
<button class="rounded px-4 hover:bg-blue-500 hover:text-white sm:px-6">

<!-- After -->
<button class="rounded px-4" class:hover="bg-blue-500 text-white" class:sm="px-6">
<button className="rounded px-4" className:hover="bg-blue-500" className:focus="ring-2">
// React: JSX expressions with string literals are supported
<button className:hover={on ? 'bg-blue-500' : 'bg-gray-200'} />

Rules

  • Base utilities on class / className; variants on class:mod="…" / className:mod="…".
  • Group static utilities by identical modifier prefix (including chains such as sm:hover) and remove that prefix from each modifier value.
  • Vue / Blade / Svelte / HTML: values must be double-quoted static strings.
  • React: prefer double-quoted static strings; className:mod={cond ? 'a' : 'b'} is also valid when literals should be prefixed.
  • Leave Vue :class, Svelte native class:name={cond}, and unrelated dynamic base expressions unchanged.
  • Svelte: only transform quoted UseClassy modifiers (class:hover="…"). Do not rewrite native class:name={cond} or class:name.
  • Keep named groups (group-hover/item), @md container queries, and arbitrary variants ([&>*], data-[state=open]) as modifier attributes in Vue/HTML and React. UseClassy rewrites them before parse (bracket-aware so = inside […] is fine).
  • Chained attributes match Tailwind/Uno composition: class:sm:hover="underline" generates sm:hover:underline only. Converting sm:hover:underline to class:sm:hover="underline" is behavior-preserving.
  • After refactoring, run formatting and relevant tests/build; verify dynamic classes and rendered states are unchanged.
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. 1mo ago Changed e883be355046
  2. 1mo ago First seen · 40 lines · 0 tokens per session scan A 13af16c986d3

Subscribe to this mod's changes

useclassy-authoring.cursor-rule is a cursor rule published in the GitHub repository jrmybtlr/useclassy (28 stars, last pushed 15d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 517 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-30.