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/llamaindex-js)<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/llamaindex-js"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/llamaindex-js.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.04270 | $0.04270 |
| Opus 5 | $0.02135 | $0.02135 |
| Sonnet 5 | $0.00854 | $0.00854 |
| Haiku 4.5 | $0.00427 | $0.00427 |
Grade A, and why
llamaindex-js 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 4d 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 — 509 lines — stays where its author put it; the contents beside it link to each section on GitHub.
llamaindex-js Best Practices
This document outlines the definitive best practices for developing with llamaindex-js (LlamaIndex.TS). Adhering to these guidelines ensures your applications are type-safe, performant, scalable, and easy to maintain.
1. Embrace TypeScript End-to-End
llamaindex-js is built in TypeScript for a reason. Leverage its type system to prevent runtime errors, improve code clarity, and enable robust refactoring.
✅ GOOD: Explicitly type all llamaindex objects and function parameters.
import { Document, VectorStoreIndex, QueryEngine } from "llamaindex";
import { OpenAIEmbedding } from "llamaindex/embeddings/OpenAIEmbedding";
import { Settings } from "llamaindex/Settings";
// Centralize LLM and embedding model configuration
Settings.llm = new OpenAI({ model: "gpt-4o-mini" });
Settings.embedModel = new OpenAIEmbedding({ model: "text-embedding-3-small" });
async function buildAndQueryIndex(documents: Document[]): Promise<string> {
const index: VectorStoreIndex = await VectorStoreIndex.fromDocuments(documents);
const queryEngine: QueryEngine = index.asQueryEngine();
const response = await queryEngine.query({ query: "Summarize the key points." });
return response.response;
}
❌ BAD: Using any or omitting types where llamaindex types are available.
// Avoid 'any' - it defeats the purpose of TypeScript
async function processData(docs: any[]): Promise<any> {
const index = await VectorStoreIndex.fromDocuments(docs);
const engine = index.asQueryEngine();
const res = await engine.query({ query: "What's up?" });
return res.response;
}
2. Structure Code in Three Distinct Layers
Organize your llamaindex applications into logical layers: Data Ingestion, Index Construction, and Query/Agent Execution. This promotes modularity, testability, and separation of concerns.
2.1. Data Ingestion (Readers/Connectors)
Responsible for loading and transforming raw data into Document objects.
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.
- 4d ago First seen · 509 lines · 4,270 tokens per session scan A ff2096a5abeb
llamaindex-js is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,570 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 4,270 tokens to every session, about $0.0214 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
windsurfrules
Below is an example TypeScript/Node.js folder structure replicating the Python package's layout. Each subfolder matches the Python counterpart (agent, agents, knowledge, etc.). All "LLM" or "litellm" references are replaced by aisdk usage.
google-genai-typescript
Comprehensive guide for integrating the Google Gen AI SDK (@google/genai) into TypeScript applications, covering installation, initialization, and core capabilities like content generation, streaming, function calling, and structured output.
AGNO_VectorDB_Integration
AGNO, Python, vector databases, and AI-powered knowledge management systems.
python-llm-ml-workflow-cursorrules-prompt-file
Cursor rules for Python LLM & ML development with workflow integration.
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.
nextjs-typescript-app-cursorrules-prompt-file
Cursor rules for Next.js development with TypeScript integration.