jsx-and-tsx

jsx-and-tsx is a cursor rule for Cursor from janhesters/react-router-saas-template. It costs 790 tokens per session, scanned A, original, MIT.

A set of instructions for writing React components in JSX or TSX, the formats commonly used for React interfaces.

In plain words
What is it for?
Planning component structure, naming and organizing files, and building React applications with React Router, ShadCN/ui, and Tailwind CSS.
Why use it?
It helps keep React code consistent with the project's existing patterns and specified tools.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Planning component structure, naming and organizing files, and building React applications with React Router, ShadCN/ui, and Tailwind CSS.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/janhesters/react-router-saas-template/jsx-and-tsx
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/janhesters/react-router-saas-template

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 jsx-and-tsx

README.md
[![agentmods](https://agentmods.dev/badge/rules/janhesters/react-router-saas-template/jsx-and-tsx/github.svg)](https://agentmods.dev/rules/janhesters/react-router-saas-template/jsx-and-tsx)
Your own site
<a href="https://agentmods.dev/rules/janhesters/react-router-saas-template/jsx-and-tsx"><img src="https://agentmods.dev/badge/rules/janhesters/react-router-saas-template/jsx-and-tsx/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 jsx-and-tsx

Your own site · 80×15
<a href="https://agentmods.dev/rules/janhesters/react-router-saas-template/jsx-and-tsx"><img src="https://agentmods.dev/badge/rules/janhesters/react-router-saas-template/jsx-and-tsx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 790 This file is loaded in full into every session.
When invoked 790 The same file — it is already loaded in full.
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.00790 $0.00790
Opus 5.5 $0.00316 $0.00316
Sonnet 5.5 $0.00158 $0.00158
Haiku 4.5 $0.00079 $0.00079

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

Security

Grade A, and why

jsx-and-tsx 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 2mo 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.

.cursor/rules/jsx-and-tsx.mdc · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React guide

Act as a top-tier software engineer with extensive React ecosystem knowledge to build high-quality fullstack web applications.

Before Writing Code

  • Observe the project's relevant existing code.
  • Conform to existing code style, patterns, and conventions unless directed otherwise. Note: these instructions count as "directed otherwise" unless the user explicitly overrides them.

Principles

  • Display/container component pattern
    • Split your component into display components, which are pure functions that map props to JSX, and container components, which are (optional) stateful components that wrap one display component.
    • Then compose them together in the parent or page/route component.

Constraints { Be concise. You're using React Router V7 (the successor to Remix). Use ShadCN/ui for components. If a component is missing, install it. Modularize by feature; one concern per file or component; prefer named exports. This project uses TailwindCSS V4, so you can use things like container queries and child selectors. }

NamingConstraints { Use clear, descriptive, consistent naming. Components should be postfixed with Component. Props should be the component's name, postifxed with ComponentProps. }

TypeConstraints { Use proper React TypeScript types: MouseEventHandler, ChangeEventHandler, ReactNode, React.Ref, ComponentProps<'element'>, etc. Never use generic () => void or (event: any) => void. When extending HTML elements or existing components, use ComponentProps to inherit their props: ComponentProps<'input'>, ComponentProps<'button'>, ComponentProps. This project uses Prisma. If a prop comes from a database entity, use the entities type for it, e.g.: - type UserMenuProps = Pick<UserAccount, 'id' | 'name' | 'email'> & { onLogout: MouseEventHandler; organizationName: Organization['name']; } When using server/database return types: Awaited<ReturnType>, wrap with NonNullable<> if guaranteed to exist. }

Read the full file on GitHub · 76 lines

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. 2mo ago First seen · 76 lines · 790 tokens per session scan A 1ab0f3297fa1

Subscribe to this mod's changes

jsx-and-tsx is a cursor rule published in the GitHub repository janhesters/react-router-saas-template (50 stars, last pushed 4d ago), licensed MIT. It adds 790 tokens to every session, about $0.0032 per session on Opus 5.5. 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.

Related

jsx-and-tsx compared with cursor rules from other repositories

jsx-and-tsx next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
jsx-and-tsxjanhesters/react-router-saas-templateCursor rule504d agoMITA790Cursor
frontend-developmentCopilotKit/CopilotKitCursor rule39kyesterdayMITA0Cursor
examples-and-demosCopilotKit/CopilotKitCursor rule39kyesterdayMITA0Cursor
suggestions-developmentCopilotKit/CopilotKitCursor rule39kyesterdayMITA13Cursor
agent-developmentCopilotKit/CopilotKitCursor rule39kyesterdayMITA0Cursor
quick-referenceCopilotKit/CopilotKitCursor rule39kyesterdayMITA0Cursor
cursorrulesCopilotKit/CopilotKitCursor rule39kyesterdayMITA594Cursor