useclassy-setup.cursor-rule

Editor and build configuration instructions for UseClassy, a Vite plugin that helps Tailwind CSS recognize generated class names. Vite is a tool for running and building front-end projects.

In plain words
What is it for?
Use them when connecting UseClassy to Vite, Tailwind CSS, VS Code Tailwind IntelliSense, React, Vue, Blade, or Svelte projects.
Why use it?
They prevent missing styles and editor suggestions caused by incorrect plugin order, Tailwind source paths, or VS Code class-name settings.

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.

agentmods
npx agentmods add rules/jrmybtlr/useclassy/useclassy-setup.cursor-rule
Clone the repo
git clone --depth 1 https://github.com/jrmybtlr/useclassy
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 469 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.00469
Opus 5 $0.00000 $0.00234
Sonnet 5 $0.00000 $0.00094
Haiku 4.5 $0.00000 $0.00047

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

Security

Grade A, and why

useclassy-setup.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 2d 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-setup.cursor-rule.mdc · 16 lines

What it actually says

When adding or fixing UseClassy in this project:

  1. Install vite-plugin-useclassy as a dev dependency (use this repo’s package manager).
  2. In vite.config.*, import useClassy from vite-plugin-useclassy and add useClassy({ language: 'vue' | 'react' | 'blade' | 'svelte' }) to plugins before @tailwindcss/vite or other CSS plugins. For Svelte, also place it before @sveltejs/vite-plugin-svelte.
  3. Tailwind v4 (CSS uses @import "tailwindcss"): In that stylesheet, add an @source line pointing at the generated manifest. Default manifest path is .classy/output.classy.html from the project root; the @source path must be relative to the CSS file. In JavaScript configs you can compute the line with getUseClassyTailwindSourceDirective(cssAbsolutePath, projectRoot) from vite-plugin-useclassy.
  4. Tailwind v3: Add ./.classy/output.classy.html to content in tailwind.config.* (or use getUseClassyTailwindV3ContentEntry() from the package for the default path).
  5. VS Code (Tailwind only): Merge tailwindCSS.classAttributes to include class:[\\w:/@-]* and, for React, className:[\\w:/@-]*. Skip this for UnoCSS — use the UnoCSS extension.
  6. Run dev once so .classy/output.classy.html is generated.

Prefer npx vite-plugin-useclassy init (after installing the package) instead of hand-editing when possible. Use --with-skills to install the UseClassy authoring skill (.agents/skills) plus these Cursor rules. Add --with-claude if you also use Claude Code.

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. 2d ago First seen · 16 lines · 0 tokens per session scan A 26d34c800f01

Subscribe to this mod's changes

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