awesome-cursor-rules-mdc is a generator that creates Cursor MDC rule files from structured library information, using semantic search and language models to gather and organize guidance. Developers use it to produce reusable rules for libraries in Cursor, and the catalogue includes 200 of those rules.
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/sanjeed5/awesome-cursor-rules-mdcWrote 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/sanjeed5/awesome-cursor-rules-mdc/nestjs)<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/nestjs"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/nestjs.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.02058 | $0.02058 |
| Opus 5 | $0.01029 | $0.01029 |
| Sonnet 5 | $0.00412 | $0.00412 |
| Haiku 4.5 | $0.00206 | $0.00206 |
Grade A, and why
nestjs 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 3d 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 — 298 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NestJS Best Practices
NestJS is a powerful framework for building scalable Node.js applications. Adhering to these guidelines ensures your projects are maintainable, performant, and secure.
1. Code Organization and Structure
Adopt a feature-based, semi-hexagonal architecture. Each business domain gets its own module.
✅ GOOD: Feature-based Modules
Organize code by feature, not by type.
// src/modules/users/users.module.ts
@Module({
controllers: [UsersController],
providers: [UsersService, UsersRepository],
exports: [UsersService],
})
export class UsersModule {}
// src/modules/users/controllers/users.controller.ts
// src/modules/users/services/users.service.ts
// src/modules/users/repositories/users.repository.ts
// src/modules/users/dtos/create-user.dto.ts
❌ BAD: Type-based Flat Structure
Avoid scattering related logic across different top-level folders.
// src/controllers/users.controller.ts
// src/services/users.service.ts
Naming Conventions
Follow standard TypeScript conventions for clarity:
- Files/Folders:
kebab-case(e.g.,user-profile.module.ts) - Classes:
PascalCase(e.g.,UsersService,CreateUserDto) - Interfaces:
IPascalCase(e.g.,IUserRepository) - Functions/Methods:
camelCase(e.g.,createUser,findAllUsers) - Constants:
UPPER_SNAKE_CASE(e.g.,JWT_SECRET)
2. Type Safety and Strictness
Always use explicit types. Avoid any. Enable strict TypeScript in tsconfig.json.
✅ GOOD: Explicit Types
Every variable, parameter, and return value must have an explicit type.
interface IUser { id: string; name: string; email: string; }
async function fetchUserById(id: string): Promise<IUser | null> {
const user: IUser | undefined = await this.userRepository.findOne(id);
return user ?? null;
}
❌ BAD: Implicit any
Leads to runtime errors and defeats TypeScript's purpose.
function fetchUserById(id) { // id is implicitly 'any'
const user = this.userRepository.findOne(id);
return user;
}
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.
- 3d ago First seen · 298 lines · 2,058 tokens per session scan A fea695c87a0c
nestjs is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,571 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 2,058 tokens to every session, about $0.0103 per session on Opus 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-09-03.
Other cursor rules, from other repositories
python--typescript-guide-cursorrules-prompt-file
Cursor rules for Python development with TypeScript guide integration.
django-python
Rules for writing Python services at PostHog (Python servers powered by the Django framework).
standard-nestjs-module-hierarchy
Establish a consistent NestJS module structure in the API application where each resource is encapsulated in its own module with proper hierarchical organization to enhance maintainability, scalabilit... .
nestjs-best-practices
../../.claude/rules/nestjs-best-practices.md.
handle-rate-limiting-responses
Cursor rule "handle-rate-limiting-responses" from PaulJPhilp/EffectPatterns, covering handle rate limiting responses and example.
make-an-outgoing-http-client-request
Cursor rule "make-an-outgoing-http-client-request" from PaulJPhilp/EffectPatterns, covering make an outgoing http client request and example.