Customization

Ignore files

View as Markdown

Control which files Grok Build includes in AI context by using ignore files.

How do I exclude files from Grok Build?

Create a .cursorignore file in your project root. Add patterns for files and folders you want excluded:

Text

node_modules/
dist/
*.min.js
.env*

Grok Build already ignores .env files, .git/, and lock files by default. See the full default ignore list for details.

Ignored files are blocked from Agent. Terminal commands and MCP tools run outside of Grok Build's file access controls, so they may still be able to read ignored files.

Does Grok Build respect .gitignore?

Yes. Grok Build automatically respects your .gitignore patterns. Files ignored by git are also excluded from AI context.

.cursorignore is for additional exclusions beyond what .gitignore covers.

Why should I ignore files?

  • Large generated files are rarely useful as context
  • Secrets and credentials are safer excluded from AI context
  • Binary files and assets add noise without value
  • Third-party code (like node_modules) is rarely useful as context

Last updated: November 23, 2026