A comprehensive .gitignore for AI coding agents and assistants.
Every developer on your team uses different AI tools. Claude Code, Cursor, Copilot, Aider, Windsurf — each one drops config files, rules, and caches into your repo. Without a shared .gitignore, these files end up in pull requests where they don't belong.
This project maintains a single, well-documented gitignore file that covers 45+ AI coding tools so you can add it once and forget about it.
Option A — Copy into your project:
# Download and append to your .gitignore
curl -sL https://raw.githubusercontent.com/Fellowship-dev/agents-gitignore/main/Agents.gitignore >> .gitignoreOption B — Copy manually:
Open Agents.gitignore, copy the sections you need, and paste them into your project's .gitignore.
Option C — Global gitignore (applies to all repos on your machine):
# Set up a global gitignore if you don't have one
git config --global core.excludesfile ~/.gitignore_global
# Download
curl -sL https://raw.githubusercontent.com/Fellowship-dev/agents-gitignore/main/Agents.gitignore >> ~/.gitignore_globalThe gitignore covers everything by default. If your project uses AI config files that should be committed (shared team rules, project instructions, etc.), add exceptions with ! negation patterns.
For example, if your team shares Cursor rules and Claude Code project instructions:
# Ignore all AI tool configs (paste from Agents.gitignore)
.claude/
CLAUDE.md
.cursor/
.cursorrules
# ... etc
# But keep the ones your team shares
!CLAUDE.md
!.cursor/
!.cursor/rules/
!.cursor/rules/my-team-rules.mdcOr if your team uses Spec-Kit and wants to share feature specs as documentation:
# Ignore speckit tooling and generated specs
.specify/
specs/
# But keep specs/ as shared team documentation
!specs/How negation works:
!filenameun-ignores a specific file- To un-ignore a file inside an ignored directory, you must first un-ignore the directory itself
- Order matters — put exceptions after the ignore rules
- See Git docs on negation for details
| Tool | Developer | Files |
|---|---|---|
| Claude Code | Anthropic | CLAUDE.md, .claude/ |
| Codex CLI | OpenAI | AGENTS.md, codex.md, .codex/ |
| Gemini CLI | GEMINI.md, .gemini/ |
|
| Cursor | Anysphere | .cursor/, .cursorrules, .cursorignore |
| Windsurf | Codeium | .windsurf/, .windsurfrules |
| GitHub Copilot | GitHub | .copilotignore |
| Aider | aider-chat | .aider*, .aiderignore |
| Continue | Continue.dev | .continue/, .continuerules |
| Cline | Cline | .cline/, .clinerules, cline_docs/ |
| Roo Code | RooCode | .roo/, .roorules, .roomodes |
| Amazon Q | AWS | .amazonq/ |
| Tabnine | Tabnine | .tabnine_root, .tabnine/ |
| Junie | JetBrains | .junie/ |
| Cody | Sourcegraph | .cody/ |
| Augment | Augment | .augment/, .augmentignore |
| Devin | Cognition | REVIEW.md, .cognition/ |
| Trae | ByteDance | .trae/ |
| Zed AI | Zed Industries | .zed/ |
| Bolt.new | StackBlitz | .bolt/ |
| CodeRabbit | CodeRabbit | .coderabbit.yaml |
| Qodo | Qodo | .codiumai.toml, .pr_agent.toml |
| Sweep | Sweep AI | sweep.yaml |
| Plandex | Plandex | .plandex/ |
| GPT Engineer | AntonOsika | .gpteng/ |
| Mentat | AbanteAI | .mentat-config.json |
| OpenHands | All Hands AI | .openhands/ |
| Goose | Block | .goose/ |
| Kilo Code | Kilo Code | .kilocode/ |
| Kiro CLI | AWS | .kiro/ |
| CodeBuddy | CodeBuddy | .codebuddy/ |
| Command Code | Command Code | .commandcode/ |
| Cortex Code | Snowflake | .cortex/ |
| Crush | Crush | .crush/ |
| Droid | Factory | .factory/ |
| iFlow CLI | iFlow | .iflow/ |
| Kode | Kode | .kode/ |
| MCPJam | MCPJam | .mcpjam/ |
| Mistral Vibe | Mistral | .vibe/ |
| Mux | Mux | .mux/ |
| Pi | Pi | .pi/ |
| Qoder | Qoder | .qoder/ |
| Qwen Code | Alibaba | .qwen/ |
| Zencoder | Zencoder | .zencoder/ |
| Neovate | Neovate | .neovate/ |
| Pochi | Pochi | .pochi/ |
| AdaL | AdaL | .adal/ |
| Spec-Kit | Fellowship-dev | .specify/, specs/ |
| Flowchad | Fellowship-dev | .flowchad/ |
| Vercel Skills CLI | Vercel | .agents/, skills-lock.json |
Not included (no local project files): Supermaven, Pieces, Blackbox AI, Lovable, v0, GitHub Copilot Chat.
-
GitHub Copilot — instructions live at
.github/copilot-instructions.mdinside the.github/directory, which most projects already track. The entry is commented out by default to avoid breaking your GitHub config. Uncomment it if you want to ignore Copilot instructions too. -
Replit —
.replitandreplit.nixare platform config, not just AI. They're commented out by default. Uncomment if you exported a project from Replit and want to clean it up. -
Zed —
.zed/contains general editor settings alongside AI config. If your team uses Zed for non-AI settings, you may want to be more selective. -
Spec-Kit —
.specify/is tooling (scripts, templates, constitution) and should always be ignored.specs/contains generated feature specifications — some teams treat these as throwaway build artifacts, others commit them as living documentation. If your team shares specs, add!specs/to your exceptions. -
AGENTS.md — this is becoming a cross-tool standard (Linux Foundation stewardship). Codex CLI, Devin, Augment, and Junie all read it. If your project uses
AGENTS.mdas shared documentation, add!AGENTS.mdto your exceptions. -
Vercel Skills CLI —
.agents/is the canonical centralized location for skills installed vianpx skills add. The CLI symlinks from each agent's skill directory (.claude/skills/,.cursor/skills/, etc.) into.agents/skills/. It also createsskills-lock.jsonto track installed versions. Many of the agent-specific directories listed above (.codebuddy/,.kilocode/,.kode/, etc.) are only created by the Skills CLI when installing to those agents — if you don't use those agents, you won't see those directories.
Do I need the whole file? No. Copy only the sections for tools your team actually uses. The file is organized by tool with clear headers so you can pick and choose.
Should I use this globally or per-project?
Both work. Per-project (in .gitignore) is better for teams — everyone gets the same rules. Global (~/.gitignore_global) is better for personal use across all repos.
A tool is missing! Open a PR or file an issue. Include the tool name, a link to its docs, and the file paths it creates.
Why not just use the GitHub gitignore templates?
There's an open PR for an Agents.gitignore in the official repo, but it's been waiting for review since August 2025. This project exists because developers need a solution now.
PRs welcome. When adding a new tool:
- Add entries to
Agents.gitignorein alphabetical order within the file - Include a comment header with the tool name, developer, and docs URL
- Update the table in this README
- Verify the file paths are accurate (check official docs, not just blog posts)
CC0 1.0 Universal — public domain. Use it however you want.