Open Spec v1.0

.llmignore

The .gitignore for AI

Generate ignore files for every AI coding tool. .cursorignore, .aiignore, .aiexclude, .claudeignore, and more. One builder. Every format.

.llmignore
# AI agents will skip these files.env.env.***/*.pem**/*.key**/node_modules/****/credentials.*

Why you need this

AI agents operate with your full filesystem as context. That is a feature and a liability.

Security

Your AI assistant reads .env files, PEM keys, and credentials by default. One leaked secret can compromise your entire infrastructure.

23.8M secrets leaked on public GitHub in 2024

Cost & Performance

Stop wasting context window tokens on node_modules, build artifacts, and binary blobs. Smaller context means faster, cheaper inference.

30–40% of retrieved context is semantically redundant

IP Protection

Keep proprietary algorithms, trade-secret logic, and sensitive business rules out of third-party AI APIs.

$4.81M avg cost of credential-related breaches

Spec

01

gitignore syntax

Uses identical fnmatch / glob patterns. If you know .gitignore, you already know .llmignore.

02

Cascading scope

Place a .llmignore in any directory. Patterns apply to that directory and its children, just like .gitignore.

03

Header comment

The first line should reference the spec URL so tools can auto-discover and validate the file.

04

Semantic sections

Organize patterns with comment headers: # Secrets, # Binaries, # Generated. Improves readability and auditing.

05

No vendor lock-in

Plain text, no proprietary format. Any AI coding tool, agent framework, or IDE can parse it.

Example
# .llmignore — Spec: https://rival.tips/llmignore# Syntax: identical to .gitignore (fnmatch patterns)# ---- Secrets & credentials ----.env.env.***/*.pem**/*.key**/credentials.***/secrets.***/.secret*# ---- Infrastructure ----**/terraform.tfstate***/pulumi.*.yaml**/.kube/config# ---- Dependencies ----**/node_modules/****/vendor/****/__pycache__/**# ---- Build artifacts ----**/dist/****/build/****/.next/****/target/**# ---- Large data (save context window) ----**/*.sqlite**/*.db**/*.wasm**/*.bin**/*.csv**/*.parquet# ---- Sensitive data ----**/migrations/*.sql**/fixtures/****/seed-data/**

Template Builder

Pick your tool, select your stack. We generate the file.

Output format
Universal|docsnegationcascading

Vendor-neutral standard for all AI coding tools

14 patterns
# .llmignore — Generated at rival.tips/llmignore# Files and patterns AI agents should never read or send to LLMs.# Syntax: identical to .gitignore (fnmatch patterns)# Secrets & Credentials.env.env.***/*.pem**/*.key**/credentials.***/secrets.***/.secret*# Sensitive Data**/migrations/*.sql**/fixtures/****/seed-data/**# Large Binaries**/*.wasm**/*.bin**/*.sqlite**/*.db
Quick Install
$curl -fsSL "https://rival.tips/api/llmignore?stack=node,react" > .llmignore

Pattern Tester

Test a file path against your active ignore patterns.

Try:

How to Integrate

Most tools have native ignore support. For tools without it, add these instructions to their config file.

Cursor

.cursorignore

Cursor natively supports .cursorignore. Drop .llmignore in your project root and Cursor will exclude matching files from all AI features.

JetBrains

.aiignore

JetBrains AI Assistant natively reads .aiignore, .cursorignore, .codeiumignore, and .aiexclude. Drop .llmignore in your project root.

Claude Code

CLAUDE.md

Before reading any file, check .llmignore in the project root. Never read, output, or send contents of files matching those patterns. Syntax identical to .gitignore.

Windsurf

.codeiumignore

Windsurf natively supports .codeiumignore. Drop .llmignore in your project root to exclude files from Cascade and indexing.

Any agent

AGENTS.md

This project uses .llmignore (generated at rival.tips/llmignore). Before accessing files, check .llmignore and skip any path matching its patterns. Syntax identical to .gitignore.

Ecosystem

Official parsers, a GitHub Action, and the spec itself. All open source.

Spec

llmignore-spec

The official .llmignore specification and reference implementation

npm

@llmignore/parser

Parse and match .llmignore patterns in Node.js and the browser

$npm install @llmignore/parser
PyPI

llmignore

Python parser for .llmignore files with glob pattern matching

$pip install llmignore
crates.io

llmignore

High-performance Rust crate for .llmignore pattern matching

$cargo add llmignore
GitHub Action

llmignore-spec/check

Validate AI ignore files in CI. Check syntax, enforce security patterns

CI/CD Integration

Enforce .llmignore in every pull request. Missing security patterns? The check fails.

.github/workflows/llmignore.yml
name: llmignore checkon: [push, pull_request]jobs:  check:    runs-on: ubuntu-latest    steps:      - uses: actions/checkout@v4      - uses: llmignore-spec/check@v1        with:          severity: error          require-file: true          check-secrets: true

Add .llmignore to your repo today

One file in your project root. Every AI agent that respects the spec will skip your secrets, credentials, and proprietary code automatically.

rival.tips/llmignoreAPI: /api/llmignore?stack=node,react