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.
git clone --depth 1 https://github.com/BetterTyped/hype-stackWrote 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.
[](https://agentmods.dev/rules/bettertyped/hype-stack/frontend-styling)<a href="https://agentmods.dev/rules/bettertyped/hype-stack/frontend-styling"><img src="https://agentmods.dev/badge/rules/bettertyped/hype-stack/frontend-styling/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.
<a href="https://agentmods.dev/rules/bettertyped/hype-stack/frontend-styling"><img src="https://agentmods.dev/badge/rules/bettertyped/hype-stack/frontend-styling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00616 |
| Opus 5.5 | $0.00000 | $0.00246 |
| Sonnet 5.5 | $0.00000 | $0.00123 |
| Haiku 4.5 | $0.00000 | $0.00062 |
Grade A, and why
frontend-styling 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.
How it starts
The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Frontend Styling
Applies to all client apps: apps/frontend, apps/admin, apps/mobile, and apps/extension.
Style all client UI with Tailwind CSS utility classes and shadcn/ui components. On mobile, Tailwind classes are applied through NativeWind on React Native primitives — the same utility-class conventions apply, but use React Native components instead of shadcn/ui, and skip the web-specific page layout section below.
- Use Tailwind utility classes for layout, spacing, typography, and colors. Do not write custom CSS unless Tailwind cannot express the style.
- Use existing shadcn/ui primitives from
components/ui/(Button, Input, Label, Card, Alert, Dialog, etc.) before creating custom components. - Compose variants with
class-variance-authority(cva) when a component needs multiple visual states. - Use
cn()from@/lib/utilsto merge conditional class names. - Use CSS variables defined in
assets/styles.cssfor theme tokens (colors, radius, etc.) rather than hard-coded hex values in application code. - Keep email templates (React Email in the backend) styled with the
<Tailwind>wrapper from@react-email/componentsso the same utility-class approach applies to emails.
Page Layout Consistency (web apps only)
All pages rendered inside the app layout (<Outlet />) must follow the same structural pattern:
- Full width. Pages use
w-full- never constrain withmax-w-*ormx-autoat the page level. The layout wrapper already handles padding (p-4). - Page header: icon +
h1title + description paragraph, matching the settings page pattern:<div className="w-full space-y-8"> <div className="space-y-1"> <div className="flex items-center gap-2.5"> <Icon className="h-5 w-5 text-muted-foreground" /> <h1 className="text-xl font-semibold tracking-tight">Page Title</h1> </div> <p className="text-sm text-muted-foreground">Description text.</p> </div> {/* page content */} </div> - No extra Card wrappers for top-level page content. Card is for distinct sections within a page (e.g., profile card, organization card inside settings). Don't wrap an entire feature's content in a Card just because it's a page - use the page header pattern above instead.
- Do NOT add page-level padding (
p-6,p-8, etc.) in route components - the layout already provides it.
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.
- 1mo ago First seen · 40 lines · 0 tokens per session scan A 5b4f902b08f1
frontend-styling is a cursor rule published in the GitHub repository BetterTyped/hype-stack (12 stars, last pushed 15d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 616 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.
Other cursor rules, from other repositories
nextjs-react-tailwind-cursorrules-prompt-file
Cursor rules for Next.js development with React and Tailwind CSS integration.
react-components-creation-cursorrules-prompt-file
Cursor rules for React component creation and development.
react-chakra-ui-cursorrules-prompt-file
Cursor rules for React development with Chakra UI integration.
react-styled-components-cursorrules-prompt-file
Cursor rules for React development with Styled Components integration.
chakra-ui-best-practices
A set of rules for building React interfaces with Chakra UI, a component library for styled and accessible user interfaces. It covers themes, responsive layouts, accessibility, performance, and reusable components.
chakra-ui---responsive-design
Guidance for making Chakra UI layouts adapt to different screen sizes. It uses responsive style values, breakpoints, layout components, and conditional display rules for phones, tablets, and desktops.