Add AI agent folders to your .gitignore with a single command.
npx agent-ignoreOr install globally:
npm install -g agent-ignore
agent-ignoreScans your repository for AI coding agent folders and adds them to your .gitignore. The script is idempotent - running it multiple times will update the section if needed.
Works with monorepos - patterns match at any directory depth.
- Fetches the latest agent list from vercel-labs/skills
- Falls back to a bundled static list if offline
- Checks which agent folders actually exist in your repository
- Adds only the existing folders to
.gitignore
The script recognizes folders from 30+ AI coding agents including:
- Claude Code (
.claude/) - Cursor (
.cursor/) - GitHub Copilot (
.github/skills/) - Windsurf (
.windsurf/) - Cline (
.cline/) - And many more...
MIT