Skip to content

Ignore Patterns

The .agentsmesh/ignore file uses gitignore-style syntax to tell AI tools which files and directories to exclude from indexing, reading, and context loading.

File format

# Dependencies
node_modules
.pnp
.pnp.js
# Build output
dist
build
out
.next
.nuxt
# Environment and secrets
.env
.env.*
*.pem
*.key
*.cert
# Logs
*.log
npm-debug.log*
# OS artifacts
.DS_Store
Thumbs.db
# Coverage and caches
coverage
.nyc_output
.cache
.turbo
# Large generated files
*.min.js
*.min.css

Syntax

The syntax is identical to .gitignore:

PatternMatches
node_modulesDirectory named node_modules anywhere in the tree
*.logAny file ending in .log
dist/Directory named dist at any level
/buildDirectory named build at the root only
!important.logUn-ignore important.log (negate a previous pattern)
src/**/*.test.tsAll .test.ts files under src/

Why this matters

AI tools use the ignore list to decide what to index into their context and what to suggest in completions. A well-tuned ignore file:

  • Prevents secrets and environment files from leaking into AI context
  • Reduces noise from build artifacts and large generated files
  • Improves response quality by focusing context on source files

Tool-specific behavior

ToolSupportTarget location
Claude CodeNative.claude/ignore
CursorNative.cursorignore
CopilotNot supported via AgentsMesh.
Gemini CLINative.gemini/ignore
ClineNative.cline/ignore
Codex CLINot supported.
WindsurfNative.windsurfignore
ContinueNot supported.
JunieNative.junie/ignore

Relationship to .gitignore

The AgentsMesh ignore file is separate from .gitignore. This lets you have different exclusion rules for AI tools vs. git tracking. For example, you might want git to track dist/ for a published library, but you don’t want dist/ loaded into AI context.

Common practice is to start with your .gitignore patterns and extend them with AI-specific exclusions like minified files, large data files, and auto-generated documentation.