t3-env / rules
Cursor rule4k starsChanged 17 months agoMITView on GitHub
You are an expert in TypeScript library development with excellent taste in API design. You're working in a monorepo using:
We split this general.mdc into the rules it gives an agent
20 rules. About 0 are common, 16 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Follow the user's requirements carefully & to the letter.
- Distinctive: line 24
Write straightforward, readable, and maintainable code.
- Distinctive: line 25
Use strong typing, avoid 'any'.
- Distinctive: line 27
Do not use any third party library.
- Very specific: line 29
Create clearly documented changesets for your introduced changes using bun changeset.
- Distinctive: line 41
Use descriptive names: verbs & nouns (e.g., getUserData)
- Very specific: line 42
Prefer the function keyword over arrow functions where their differences doesn't matter.
- Distinctive: line 43
Document with JSDoc annotations
- Distinctive: line 47
Prefer custom interfaces over inline types
- Distinctive: line 48
Use 'readonly' for immutable properties
- Distinctive: line 49
If an import is only used as a type in the file, use 'import type' instead of 'import'
- Very specific: line 53
Always validate your changes confirm to the project lint configuration by running bun run lint.
- Very specific: line 54
Write tests for changes and validate they pass using bun run test.
- Distinctive: line 59
Check for code duplication
- Distinctive: line 67
Use the active voice
- Distinctive: line 68
Use the present tense
- Distinctive: line 69
Write in a clear and concise manner
- Distinctive: line 71
Use lists and tables when appropriate
- Distinctive: line 72
When writing JSDocs, only use TypeDoc compatible tags.
- Distinctive: line 73
Always write JSDocs for all code: classes, functions, methods, fields, types, interfaces.
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: globs: alwaysApply: true --- # Overview You are an expert in TypeScript library development with excellent taste in API design. - Follow the user's requirements carefully & to the letter. - First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail. ## Tech Stack You're working in a monorepo using: - TypeScript - Bun - Vitest ## Core Principles - Write straightforward, readable, and maintainable code. Use explicit types on exported functions. - Use strong typing, avoid 'any'. - Restate what the objective is of what you are being asked to change clearly in a short summary. - Do not use any third party library. The library must confirm to [Standard Schema](mdc:https:/standardschema.dev) and not be tied to any one schema validation library. - Reason about the API design before implementing changes. Is it possible to achieve strong and generic typing for your chosen API? If not, reconsider. - Create clearly documented changesets for your introduced changes using `bun changeset`. ## Coding Standards ### Naming Conventions - Variables, functions, methods: camelCase - Files, directories: kebab-case - Constants, env variables: UPPERCASE ### Functions - Use descriptive names: verbs & nouns (e.g., getUserData) - Prefer the `function` keyword over arrow functions where their differences doesn't matter. - Document with JSDoc annotations ### Types and Interfaces - Prefer custom interfaces over inline types - Use 'readonly' for immutable properties - If an import is only used as a type in the file, use 'import type' instead of 'import' ### Validating changes - Always validate your changes confirm to the project lint configuration by running `bun run lint`. - Write tests for changes and validate they pass using `bun run test`. ## Code Review Checklist - Ensure proper typing - Check for code duplication - Verify error handling - Confirm test coverage - Review naming conventions - Assess overall code structure and readability ## Documentation - Use the active voice - Use the present tense - Write in a clear and concise manner - Present information in a logical order - Use lists and tables when appropriate - When writing JSDocs, only use TypeDoc compatible tags. - Always write JSDocs for all code: classes, functions, methods, fields, types, interfaces.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about t3-oss/t3-env
- nuxt/nuxt“Built-in environment variables validation”GitHub · Mar 14, 2024 · 14 reactions
- Marcus-Mok-GH/Ona-com-open-source“chore: bump the npm-deps group across 1 directory with 48 updates”GitHub · Apr 10, 2026 · 2 reactions
- Marcus-Mok-GH/Ona-com-open-source“chore: bump the npm-deps group across 1 directory with 53 updates”GitHub · Apr 10, 2026 · 2 reactions
- Marcus-Mok-GH/Ona-com-open-source“chore: bump the npm-deps group with 55 updates”GitHub · Apr 7, 2026 · 2 reactions
- Marcus-Mok-GH/Stock-predictor-WIP-“chore: bump the npm-deps group across 1 directory with 55 updates”GitHub · Apr 1, 2026 · 2 reactions
The biggest 5 of 51 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 51
Talked about on GitHub and Stack Overflow (51 times).
On GitHub · 50
- Mar 14, 2024Built-in environment variables validation — nuxt/nuxt14 reactions · 7 comments
- Apr 10, 2026chore: bump the npm-deps group across 1 directory with 48 updates — Marcus-Mok-GH/Ona-com-open-source2 reactions · 2 comments
- Apr 10, 2026chore: bump the npm-deps group across 1 directory with 53 updates — Marcus-Mok-GH/Ona-com-open-source2 reactions · 1 comment
- Apr 7, 2026chore: bump the npm-deps group with 55 updates — Marcus-Mok-GH/Ona-com-open-source2 reactions · 1 comment
- Apr 1, 2026chore: bump the npm-deps group across 1 directory with 55 updates — Marcus-Mok-GH/Stock-predictor-WIP-2 reactions · 1 comment
45 more on GitHub
- Mar 27, 2026chore(deps): bump the frontend-core group across 1 directory with 5 updates — mento-protocol/frontend-monorepo1 reaction · 8 comments
- Feb 16, 2026[Concept Discovery] Type-safe environment variables patterns — seanmcquaid/scaffolding-templates1 reaction
- Feb 10, 2026build(deps): bump the minor-and-patch group across 1 directory with 8 updates — chris23lngr/vS31 reaction · 4 comments
- Feb 8, 2026chore(deps): bump the minor-and-patch group across 1 directory with 7 updates — chris23lngr/vS31 reaction · 4 comments
- Oct 29, 2025Improve env handling — jsbrain/booker-journal1 reaction
- Jun 10, 2025build(deps): bump @t3-oss/env-nextjs from 0.13.6 to 0.13.8 — flags-gg/dashboard1 reaction
- May 30, 2025chore(deps): bump the workspace-dependencies group across 1 directory with 24 updates — simstudioai/sim1 reaction · 3 comments
- May 28, 2025chore(deps): bump the workspace-dependencies group across 1 directory with 23 updates — simstudioai/sim1 reaction · 3 comments
- May 28, 2025build(deps): bump @t3-oss/env-nextjs from 0.13.4 to 0.13.6 — flags-gg/dashboard1 reaction · 1 comment
- May 1, 2025build(deps): bump @t3-oss/env-nextjs from 0.13.0 to 0.13.4 — flags-gg/dashboard1 reaction · 1 comment
- Mar 21, 2025feat: changesets config and github workflow setup — hugs7/tiptap-extension-pagination1 reaction · 5 comments
- Jan 30, 2025build(deps): bump @t3-oss/env-nextjs from 0.10.1 to 0.12.0 — retro-board/retro-board1 reaction
- Jan 27, 2025build(deps): bump @t3-oss/env-nextjs from 0.11.1 to 0.12.0 — flags-gg/dashboard1 reaction
- Sep 5, 2024build(deps): bump @t3-oss/env-nextjs from 0.10.1 to 0.11.1 — flags-gg/dashboard1 reaction
- Apr 26, 2024bug: bun workspace dependencies not resolved — jsr-io/jsr1 reaction · 11 comments
- Apr 30, 2023Introduce T3 env — miurla/babyagi-ui1 reaction
- Oct 29, 2026Bump zod and @t3-oss/env-nextjs — EndBug/fs-judge-training0 reactions · 1 comment
- Oct 29, 2026build(deps): bump zod and @t3-oss/env-nextjs — acwilsondev/analog-sm0 reactions
- Oct 28, 2026Bump zod, @t3-oss/env-core and @t3-oss/env-nextjs — mano8/next-events-manager0 reactions
- Oct 28, 2026Build(deps): Bump zod and @t3-oss/env-nextjs — tp00012x/clinica-estetica0 reactions
- Oct 21, 2026Bump @t3-oss/env-nextjs from 0.12.0 to 0.13.11 in /apps/web — s-m-sharafat-hossain/Nextjs-Expo-SaaS-Boilerplate0 reactions
- Oct 21, 2026fix(core): add legacy main and types entry points — gabrielvfonseca/t3-env0 reactions · 1 comment
- Oct 21, 2026fix(nextjs,nuxt): guard process.env in browsers — gabrielvfonseca/t3-env0 reactions · 1 comment
- Oct 21, 2026feat(core): add warnAbsentOptional option — gabrielvfonseca/t3-env0 reactions · 1 comment
- Oct 21, 2026fix(core): allow shared variables on the client — gabrielvfonseca/t3-env0 reactions · 1 comment
- Oct 21, 2026fix(presets): guard against ReferenceError when process is not defined — gabrielvfonseca/t3-env0 reactions · 1 comment
- Oct 11, 2026build(deps): bump the minor-and-patch group across 1 directory with 2 updates — Spoof14/ziggybang0 reactions · 1 comment
- Oct 5, 2026build(deps): bump @t3-oss/env-nextjs from 0.12.0 to 0.13.11 — TuanChill/Ping-Target0 reactions · 1 comment
- Oct 4, 2026chore(deps)(deps): bump @t3-oss/env-nextjs from 0.11.1 to 0.13.11 — Quirk-Systems/project-scaffold0 reactions
- Sep 19, 2026Bump @t3-oss/env-nextjs from 0.12.0 to 0.13.11 — admclamb/stack-duel0 reactions · 1 comment
- Sep 8, 2026chore(deps): bump @t3-oss/env-nextjs from 0.12.0 to 0.13.11 in /ressource — tymacz/ressource0 reactions · 2 comments
- Sep 7, 2026deps(deps): bump @t3-oss/env-core from 0.13.10 to 0.13.11 — zexahq/dbdesk-studio0 reactions · 1 comment
- Aug 26, 2026chore(deps): bump @t3-oss/env-nextjs from 0.13.10 to 0.13.11 — xiaomizhoubaobei/LLM-Playground0 reactions · 8 comments
- Aug 19, 2026chore(deps): bump @t3-oss/env-nextjs from 0.11.1 to 0.13.11 — zoro-hue/aletheia0 reactions
- Aug 12, 2026chore(deps)(deps): bump @t3-oss/env-nextjs from 0.11.1 to 0.13.11 — Quirk-Systems/project-scaffold0 reactions · 2 comments
- Aug 3, 2026chore(deps): bump @t3-oss/env-nextjs from 0.12.0 to 0.13.11 — christianf7/Portfolio0 reactions · 1 comment
- Aug 1, 2026chore(deps): bump @t3-oss/env-core from 0.12.0 to 0.13.11 — SamIrving94/Bellwood-Lane-Ventures0 reactions · 1 comment
- Jul 23, 2026build(deps): bump @t3-oss/env-core from 0.13.10 to 0.13.11 — muhrafi-fsdev/RYKA-CORE0 reactions · 1 comment
- Jun 25, 2026Bump @t3-oss/env-nextjs from 0.10.1 to 0.13.11 in /incentive/frontend — Prometheus-X-association/data-value-chain-tracker0 reactions
- Jun 19, 2026dead-export: false positive on useMDXComponents in mdx-components.tsx (Next.js @next/mdx convention) — rbaumier/comply0 reactions
- Jun 14, 2026chore(deps-client): bump @t3-oss/env-nextjs from 0.11.1 to 0.13.11 in /apps/client — tiween/tiween0 reactions · 1 comment
- Jun 13, 2026chore(deps): bump @t3-oss/env-nextjs from 0.11.1 to 0.13.11 — CSOAI-ORG/langfuse0 reactions
- Jun 8, 2026chore(deps): bump @t3-oss/env-nextjs from 0.11.1 to 0.13.11 — qodo-annoted-pr/langfuse__langfuse-clone__qodo__PR33__202606030 reactions
- May 29, 2026chore(deps): bump @t3-oss/env-nextjs from 0.12.0 to 0.13.11 — l-filice89/rpg-life0 reactions
- May 8, 2026chore(deps): bump @t3-oss/env-nextjs from 0.11.1 to 0.13.11 — rafaumeu/ecommerce-next0 reactions · 2 comments
On Stack Overflow · 1
- Nov 6, 2024T3 App `❌ Invalid environment variables:`0 votes
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

