Pillar Specification & Hub Directory.cursorignore Context Shield Generator
Mask credentials, filter build artifacts, and save 50,000+ context tokens per prompt in Cursor IDE.
./ (Repository Root).cursorignoreHow .cursorignore Shield Operates in Production
.cursorignore functions like a .gitignore exclusively for Cursor's AI indexing engine. By excluding build outputs (.next, dist, target), lockfiles (package-lock.json), test fixtures, and secret files (.env, *.pem), you prevent sensitive credentials from leaking into prompts while dramatically reducing context window bloat and improving model reasoning speed.
Keep private keys and API tokens out of LLM prompts.
# Secrets & Credentials
.env*
!.env.example
*.pem
*.key
service-account*.jsonLockfiles alone can consume 40,000+ context tokens, degrading reasoning.
# Dependency Bloat
node_modules/
package-lock.json
pnpm-lock.yaml
yarn.lock./.cursorignoreRepository RootExcludes paths from codebase indexing, codebase chat search, and background agent context scanning.
Available Tech Stack Presets (27)
Click any tech stack below to open the client-side editor preloaded with this verified configuration.
Next.js 15 App Router
Generate an optimized .cursorignore for Next.js 15 App Router to mask secrets and stop token bloat.
"Enforce React Server Components (RSC) by default; restrict 'use client' strictly to interactive leaf components."
React 19 & Vite
Generate an optimized .cursorignore for React 19 & Vite to mask secrets and stop token bloat.
"Use React 19 action hooks (useActionState, useOptimistic, useFormStatus) for async mutations."
Python FastAPI & Pydantic v2
Generate an optimized .cursorignore for Python FastAPI & Pydantic v2 to mask secrets and stop token bloat.
"Use strict Pydantic v2 BaseModels with Field validation for all input and output schemas."
Supabase & PostgreSQL
Generate an optimized .cursorignore for Supabase & PostgreSQL to mask secrets and stop token bloat.
"Always include `ENABLE ROW LEVEL SECURITY;` on every created table."
Prisma ORM
Generate an optimized .cursorignore for Prisma ORM to mask secrets and stop token bloat.
"Always use `select` to specify required fields; avoid raw `findMany()` fetching unused relations."
Drizzle ORM
Generate an optimized .cursorignore for Drizzle ORM to mask secrets and stop token bloat.
"Define schemas using pgTable/sqliteTable with explicit foreign keys and constraints."
Go (Golang) & Fiber
Generate an optimized .cursorignore for Go (Golang) & Fiber to mask secrets and stop token bloat.
"Check every `if err != nil` explicitly; never swallow errors or ignore returned values."
Rust & Axum
Generate an optimized .cursorignore for Rust & Axum to mask secrets and stop token bloat.
"Never call `.unwrap()` or `.expect()` in production route handlers; propagate errors via `Result<T, AppError>`."
Tailwind CSS v4
Generate an optimized .cursorignore for Tailwind CSS v4 to mask secrets and stop token bloat.
"Configure themes directly in globals.css using `@theme` and `@import 'tailwindcss';`."
Vue 3 & Nuxt 3
Generate an optimized .cursorignore for Vue 3 & Nuxt 3 to mask secrets and stop token bloat.
"Always use `<script setup lang='ts'>` and the Composition API; ban legacy Options API."
SvelteKit 5 & Svelte 5
Generate an optimized .cursorignore for SvelteKit 5 & Svelte 5 to mask secrets and stop token bloat.
"Use Svelte 5 runes: `$state()`, `$derived()`, and `$props()`."
Universal Cursor Pro
Generate an optimized .cursorignore for Universal Cursor Pro to mask secrets and stop token bloat.
"Deliver surgical, targeted diffs; never replace entire files unnecessarily."
Pragmatic Rapid Prototyping
Generate an optimized .cursorignore for Pragmatic Rapid Prototyping to mask secrets and stop token bloat.
"Prioritize working software over complex design patterns or deep inheritance hierarchies."
Zero-Trust Security
Generate an optimized .cursorignore for Zero-Trust Security to mask secrets and stop token bloat.
"Flag and prevent any dynamic SQL query string interpolation."
Docker & CI/CD
Generate an optimized .cursorignore for Docker & CI/CD to mask secrets and stop token bloat.
"Always use multi-stage Docker builds to separate builder tools from the lean production image."
Vitest & Playwright TDD
Generate an optimized .cursorignore for Vitest & Playwright TDD to mask secrets and stop token bloat.
"Write unit tests covering happy paths and at least two edge/error cases for every new function."
Automated Code Reviewer
Generate an optimized .cursorignore for Automated Code Reviewer to mask secrets and stop token bloat.
"Scan repository manifests to map stack idioms before evaluating logic."
Multi-Agent System Orchestration
Generate an optimized .cursorignore for Multi-Agent System Orchestration to mask secrets and stop token bloat.
"Define subagent roles: Lead Architect, Frontend Engineer, Backend Specialist, Security Reviewer."
Django 5 & Ninja / DRF
Generate an optimized .cursorignore for Django 5 & Ninja / DRF to mask secrets and stop token bloat.
"Use asynchronous ORM operations (aget(), acreate(), afirst()) inside async def view handlers."
Bun & Elysia / Hono
Generate an optimized .cursorignore for Bun & Elysia / Hono to mask secrets and stop token bloat.
"Use Elysia's native t schema builder (powered by TypeBox) for request body, query, and parameter validation."
React Native & Expo Router
Generate an optimized .cursorignore for React Native & Expo Router to mask secrets and stop token bloat.
"Use Expo Router file-based filesystem routing (app/_layout.tsx, app/(tabs)/index.tsx); ban legacy React Navigation container boilerplate."
Flutter 3 & Riverpod / Dart
Generate an optimized .cursorignore for Flutter 3 & Riverpod / Dart to mask secrets and stop token bloat.
"Always add const constructors wherever possible to maximize Flutter element rebuild caching."
Kubernetes & Helm Charts
Generate an optimized .cursorignore for Kubernetes & Helm Charts to mask secrets and stop token bloat.
"Always specify explicit resources.requests and resources.limits (both CPU and memory) on every container."
Terraform & OpenTofu IaC
Generate an optimized .cursorignore for Terraform & OpenTofu IaC to mask secrets and stop token bloat.
"Pin explicit version constraints for all providers and required Terraform/OpenTofu core versions (required_providers)."
Playwright End-to-End Testing
Generate an optimized .cursorignore for Playwright End-to-End Testing to mask secrets and stop token bloat.
"Strictly ban hardcoded delays (page.waitForTimeout()); rely exclusively on Playwright web-first auto-waiting assertions (expect(locator).toBeVisible())."
Spring Boot 3 & Java 21
Generate an optimized .cursorignore for Spring Boot 3 & Java 21 to mask secrets and stop token bloat.
"Use jakarta.* packages for persistence, validation, and servlets; ban legacy javax.* imports."
.NET 8 & C# 12 Minimal APIs
Generate an optimized .cursorignore for .NET 8 & C# 12 Minimal APIs to mask secrets and stop token bloat.
"Use modern C# 12 features: primary constructors, collection expressions, file-scoped namespaces, and nullable reference types (#nullable enable)."
Does .cursorignore replace .gitignore?
No. .gitignore controls what git tracks in version control, while .cursorignore specifically controls what Cursor's AI indexes and reads for context.
Why should I ignore lockfiles in .cursorignore?
Lockfiles often contain tens of thousands of lines of package hashes. If indexed by the AI, they exhaust context window limits and cause the model to hallucinate or miss relevant application code.