All Formats
StarPillar Specification & Hub Directory

.cursorignore Context Shield Generator

Mask credentials, filter build artifacts, and save 50,000+ context tokens per prompt in Cursor IDE.

Open Blank Studio Editor
Target: ./ (Repository Root).cursorignore
01 / SPECIFICATION & RUNTIME BEHAVIOR

How .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.

Credential & Secret MaskingSpec Syntax

Keep private keys and API tokens out of LLM prompts.

# Secrets & Credentials
.env*
!.env.example
*.pem
*.key
service-account*.json
Lockfile & Build Cache SuppressionSpec Syntax

Lockfiles alone can consume 40,000+ context tokens, degrading reasoning.

# Dependency Bloat
node_modules/
package-lock.json
pnpm-lock.yaml
yarn.lock
02 / REPOSITORY PLACEMENT
./.cursorignoreRepository Root

Excludes paths from codebase indexing, codebase chat search, and background agent context scanning.

03 / PRESET SPOKE MATRIX

Available Tech Stack Presets (27)

Click any tech stack below to open the client-side editor preloaded with this verified configuration.

FrontendLaunch

Next.js 15 App Router

Generate an optimized .cursorignore for Next.js 15 App Router to mask secrets and stop token bloat.

Enforced Invariant:

"Enforce React Server Components (RSC) by default; restrict 'use client' strictly to interactive leaf components."

FrontendLaunch

React 19 & Vite

Generate an optimized .cursorignore for React 19 & Vite to mask secrets and stop token bloat.

Enforced Invariant:

"Use React 19 action hooks (useActionState, useOptimistic, useFormStatus) for async mutations."

BackendLaunch

Python FastAPI & Pydantic v2

Generate an optimized .cursorignore for Python FastAPI & Pydantic v2 to mask secrets and stop token bloat.

Enforced Invariant:

"Use strict Pydantic v2 BaseModels with Field validation for all input and output schemas."

Fullstack & DBLaunch

Supabase & PostgreSQL

Generate an optimized .cursorignore for Supabase & PostgreSQL to mask secrets and stop token bloat.

Enforced Invariant:

"Always include `ENABLE ROW LEVEL SECURITY;` on every created table."

Fullstack & DBLaunch

Prisma ORM

Generate an optimized .cursorignore for Prisma ORM to mask secrets and stop token bloat.

Enforced Invariant:

"Always use `select` to specify required fields; avoid raw `findMany()` fetching unused relations."

Fullstack & DBLaunch

Drizzle ORM

Generate an optimized .cursorignore for Drizzle ORM to mask secrets and stop token bloat.

Enforced Invariant:

"Define schemas using pgTable/sqliteTable with explicit foreign keys and constraints."

BackendLaunch

Go (Golang) & Fiber

Generate an optimized .cursorignore for Go (Golang) & Fiber to mask secrets and stop token bloat.

Enforced Invariant:

"Check every `if err != nil` explicitly; never swallow errors or ignore returned values."

BackendLaunch

Rust & Axum

Generate an optimized .cursorignore for Rust & Axum to mask secrets and stop token bloat.

Enforced Invariant:

"Never call `.unwrap()` or `.expect()` in production route handlers; propagate errors via `Result<T, AppError>`."

FrontendLaunch

Tailwind CSS v4

Generate an optimized .cursorignore for Tailwind CSS v4 to mask secrets and stop token bloat.

Enforced Invariant:

"Configure themes directly in globals.css using `@theme` and `@import 'tailwindcss';`."

FrontendLaunch

Vue 3 & Nuxt 3

Generate an optimized .cursorignore for Vue 3 & Nuxt 3 to mask secrets and stop token bloat.

Enforced Invariant:

"Always use `<script setup lang='ts'>` and the Composition API; ban legacy Options API."

FrontendLaunch

SvelteKit 5 & Svelte 5

Generate an optimized .cursorignore for SvelteKit 5 & Svelte 5 to mask secrets and stop token bloat.

Enforced Invariant:

"Use Svelte 5 runes: `$state()`, `$derived()`, and `$props()`."

Specialist PersonaLaunch

Universal Cursor Pro

Generate an optimized .cursorignore for Universal Cursor Pro to mask secrets and stop token bloat.

Enforced Invariant:

"Deliver surgical, targeted diffs; never replace entire files unnecessarily."

Specialist PersonaLaunch

Pragmatic Rapid Prototyping

Generate an optimized .cursorignore for Pragmatic Rapid Prototyping to mask secrets and stop token bloat.

Enforced Invariant:

"Prioritize working software over complex design patterns or deep inheritance hierarchies."

Specialist PersonaLaunch

Zero-Trust Security

Generate an optimized .cursorignore for Zero-Trust Security to mask secrets and stop token bloat.

Enforced Invariant:

"Flag and prevent any dynamic SQL query string interpolation."

DevOps & ToolingLaunch

Docker & CI/CD

Generate an optimized .cursorignore for Docker & CI/CD to mask secrets and stop token bloat.

Enforced Invariant:

"Always use multi-stage Docker builds to separate builder tools from the lean production image."

Specialist PersonaLaunch

Vitest & Playwright TDD

Generate an optimized .cursorignore for Vitest & Playwright TDD to mask secrets and stop token bloat.

Enforced Invariant:

"Write unit tests covering happy paths and at least two edge/error cases for every new function."

Specialist PersonaLaunch

Automated Code Reviewer

Generate an optimized .cursorignore for Automated Code Reviewer to mask secrets and stop token bloat.

Enforced Invariant:

"Scan repository manifests to map stack idioms before evaluating logic."

Specialist PersonaLaunch

Multi-Agent System Orchestration

Generate an optimized .cursorignore for Multi-Agent System Orchestration to mask secrets and stop token bloat.

Enforced Invariant:

"Define subagent roles: Lead Architect, Frontend Engineer, Backend Specialist, Security Reviewer."

BackendLaunch

Django 5 & Ninja / DRF

Generate an optimized .cursorignore for Django 5 & Ninja / DRF to mask secrets and stop token bloat.

Enforced Invariant:

"Use asynchronous ORM operations (aget(), acreate(), afirst()) inside async def view handlers."

BackendLaunch

Bun & Elysia / Hono

Generate an optimized .cursorignore for Bun & Elysia / Hono to mask secrets and stop token bloat.

Enforced Invariant:

"Use Elysia's native t schema builder (powered by TypeBox) for request body, query, and parameter validation."

FrontendLaunch

React Native & Expo Router

Generate an optimized .cursorignore for React Native & Expo Router to mask secrets and stop token bloat.

Enforced Invariant:

"Use Expo Router file-based filesystem routing (app/_layout.tsx, app/(tabs)/index.tsx); ban legacy React Navigation container boilerplate."

FrontendLaunch

Flutter 3 & Riverpod / Dart

Generate an optimized .cursorignore for Flutter 3 & Riverpod / Dart to mask secrets and stop token bloat.

Enforced Invariant:

"Always add const constructors wherever possible to maximize Flutter element rebuild caching."

DevOps & ToolingLaunch

Kubernetes & Helm Charts

Generate an optimized .cursorignore for Kubernetes & Helm Charts to mask secrets and stop token bloat.

Enforced Invariant:

"Always specify explicit resources.requests and resources.limits (both CPU and memory) on every container."

DevOps & ToolingLaunch

Terraform & OpenTofu IaC

Generate an optimized .cursorignore for Terraform & OpenTofu IaC to mask secrets and stop token bloat.

Enforced Invariant:

"Pin explicit version constraints for all providers and required Terraform/OpenTofu core versions (required_providers)."

DevOps & ToolingLaunch

Playwright End-to-End Testing

Generate an optimized .cursorignore for Playwright End-to-End Testing to mask secrets and stop token bloat.

Enforced Invariant:

"Strictly ban hardcoded delays (page.waitForTimeout()); rely exclusively on Playwright web-first auto-waiting assertions (expect(locator).toBeVisible())."

BackendLaunch

Spring Boot 3 & Java 21

Generate an optimized .cursorignore for Spring Boot 3 & Java 21 to mask secrets and stop token bloat.

Enforced Invariant:

"Use jakarta.* packages for persistence, validation, and servlets; ban legacy javax.* imports."

BackendLaunch

.NET 8 & C# 12 Minimal APIs

Generate an optimized .cursorignore for .NET 8 & C# 12 Minimal APIs to mask secrets and stop token bloat.

Enforced Invariant:

"Use modern C# 12 features: primary constructors, collection expressions, file-scoped namespaces, and nullable reference types (#nullable enable)."

04 / BEST PRACTICES
Always place .cursorignore in your repository root next to .gitignore.
Mask all .env files and service account JSON credentials to eliminate data leakage.
Exclude massive lockfiles (package-lock.json, Cargo.lock) to keep context tokens reserved for code.
Ignore coverage reports, build artifacts, and source maps.
Other Format DirectoriesHub Network
05 / FREQUENTLY ASKED QUESTIONS

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.