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/janhesters/react-router-saas-templateWrote 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/janhesters/react-router-saas-template/js-and-ts)<a href="https://agentmods.dev/rules/janhesters/react-router-saas-template/js-and-ts"><img src="https://agentmods.dev/badge/rules/janhesters/react-router-saas-template/js-and-ts.svg" alt="Measured on agentmods" 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.00945 |
| Opus 5 | $0.00000 | $0.00473 |
| Sonnet 5 | $0.00000 | $0.00189 |
| Haiku 4.5 | $0.00000 | $0.00094 |
Grade A, and why
js-and-ts 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 7d 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 — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
JavaScript/TypeScript guide
Act as a top-tier software engineer with serious JavaScript/TypeScript discipline to carefully implement high quality software.
Before Writing Code
- Read the lint and formatting rules.
- 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
- DOT
- YAGNI
- KISS
- DRY
- SDA - Self Describing APIs
- Simplicity - "Simplicity is removing the obvious, and adding the meaningful."
- Obvious stuff gets hidden in the abstraction.
- Meaningful stuff is what needs to be customized and passed in as parameters.
- Functions should have default parameters whenever it makes sense so that callers can supply only what is different from the default.
Constraints {
Be concise.
Favor functional programming; keep functions short, pure, and composable.
Favor map, filter, reduce over manual loops.
Prefer immutability; use const, spread, and rest operators instead of mutation.
One job per function; separate mapping from IO.
Obey the projects lint and formatting rules.
Omit needless code and variables; prefer composition with partial application and point-free style.
Chain operations rather than introducing intermediate variables, e.g. [x].filter(p).map(f)
Avoid loose procedural sequences; compose clear pipelines instead.
Avoid class and extends as much as possible. Prefer composition of functions and data structures over inheritance.
Keep related code together; group by feature, not by technical type.
Put statements and expressions in positive form.
Use parallel code for parallel concepts.
Avoid null/undefined arguments; use options objects instead.
Use concise syntax: arrow functions, object destructuring, array destructuring, template literals.
Avoid verbose property assignments. bad: const a = obj.a; good: const { a } = obj;
Assign reasonable defaults directly in function signatures.
const createExpectedUser = ({ id = createId(), name = '', description = '' } = {}) => ({ id, name, description });
Principle: SDA. This means:
Parameter values should be explicitly named and expressed in function signatures:
Bad: const createUser = (payload = {}) => ({
Good: const createUser = ({ id = createId(), name = '', description = ''} = {}) =>
Notice how default values also provide hints for type inference.
Avoid IIFEs. Use block scopes, modules, or normal arrow functions instead. Principle: KISS
Avoid using || for defaults. Use parameter defaults instead. See above.
Prefer async/await or asyncPipe over raw promise chains.
Use strict equality (===).
Modularize by feature; one concern per file or function; prefer named exports.
}
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.
- 7d ago First seen · 78 lines · 945 tokens per session scan A 7cca354b761e
js-and-ts is a cursor rule published in the GitHub repository janhesters/react-router-saas-template (48 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 945 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.
Other cursor rules, from other repositories
page_layer_rules
Page layer rules for Next.js App Router pages and layouts.
vue-typescript-patterns
A set of coding rules for Vue 3 projects using TypeScript, a language that adds type checking to JavaScript. It covers component structure, file locations, TypeScript usage, and Pinia, a library for shared application state.
astro-typescript-cursorrules-prompt-file
Cursor rules for Astro development with TypeScript integration.
angular-typescript-cursorrules-prompt-file
Cursor rules for Angular development with TypeScript integration.
nextjs-tailwind-typescript-apps-cursorrules-prompt
Cursor rules for Next.js development with Tailwind CSS and TypeScript integration.
qwik-tailwind-cursorrules-prompt-file
Cursor rules for Qwik development with Tailwind CSS integration.