| name | ignore |
| description | Generate a .claudeignore file from curated project-type templates. Use when user wants to create or update a .claudeignore, optimize Claude Code context, reduce token usage, exclude node_modules or build artifacts, or mentions /ignore. |
| allowed-tools | Bash, Read, Write, Glob |
| argument-hint | [template-id | auto] |
Claudeignore Generator
Generate a .claudeignore file from built-in templates. No network required — all templates are inline.
Behavior
Quick mode (argument provided)
If invoked as /ignore node or /ignore python,go:
- Look up the specified template(s) from the inline templates below
- Merge if multiple templates given (comma-separated)
- Write
.claudeignore to project root
- Report what was added
Interactive mode (no argument)
If invoked as /ignore with no arguments:
- Present the templates to the user:
Available .claudeignore templates:
1. node — Node.js / Frontend (React, Vue, Next.js, Nuxt, Vite)
2. python — Python (Django, Flask, FastAPI, venv, pip, poetry)
3. java — Java / Kotlin (Spring Boot, Maven, Gradle)
4. rust — Rust (Cargo projects)
5. go — Go (Go modules, vendor)
6. mobile — Mobile (React Native, Flutter, iOS, Android)
7. monorepo — Monorepo / Full-stack (Turborepo, Nx, multi-language)
8. devops — DevOps / Infrastructure (Docker, Terraform, K8s)
Enter number(s) or id(s), comma-separated (e.g. "1,5" or "node,go"):
- Wait for user selection
- Merge selected templates (deduplicate, combine with section headers)
- Write
.claudeignore to project root
Auto-detect mode
If the argument is auto or detect, or user says "auto-detect", use Glob to scan the project root for signature files and auto-select templates:
package.json → node
requirements.txt / pyproject.toml / Pipfile → python
pom.xml / build.gradle / build.gradle.kts → java
Cargo.toml → rust
go.mod → go
pubspec.yaml / android/ + ios/ → mobile
turbo.json / nx.json / lerna.json → monorepo
Dockerfile / terraform/ / *.tf → devops
Present detected templates and ask user to confirm before writing.
Merge logic
When multiple templates are selected:
- Start with:
# .claudeignore - Generated by /ignore
- Add:
# Templates: node, python | Generated: YYYY-MM-DD
- For each template, add a section header:
# === Node.js / Frontend ===
- Concatenate template contents
- Deduplicate exact-match lines (keep first occurrence)
- Preserve blank lines between sections
Existing file handling
If .claudeignore already exists:
- Show the user what's currently in the file
- Ask: append, overwrite, or cancel?
- If append, add new content below existing with a separator comment
Post-generation
After writing the file:
- Show a summary (template names, line count)
- Remind user: "Start a new conversation for
.claudeignore changes to take effect."
Inline Templates
node
# Dependencies
node_modules/
.pnpm-store/
bower_components/
# Build outputs
dist/
build/
.next/
.nuxt/
.output/
out/
.turbo/
.vercel/
.netlify/
storybook-static/
# Cache
.cache/
.parcel-cache/
.eslintcache
.stylelintcache
*.tsbuildinfo
# Test coverage
coverage/
.nyc_output/
# Logs & temp
*.log
npm-debug.log*
yarn-debug.log*
pnpm-debug.log*
tmp/
temp/
# Lock files (Claude doesn't need to analyze these)
package-lock.json
yarn.lock
pnpm-lock.yaml
# OS files
.DS_Store
Thumbs.db
# Environment variables
.env
.env.local
.env.*.local
# Large binary assets
*.woff
*.woff2
*.ttf
*.eot
*.mp4
*.webm
*.mp3
python
# Virtual environments
venv/
.venv/
env/
.conda/
# Package build
__pycache__/
*.py[cod]
*$py.class
*.egg-info/
dist/
build/
eggs/
*.egg
.eggs/
sdist/
wheels/
# Test & coverage
.pytest_cache/
.coverage
.coverage.*
htmlcov/
.tox/
.nox/
# Jupyter
.ipynb_checkpoints/
# Type checking cache
.mypy_cache/
.dmypy.json
.pytype/
.pyre/
# Logs & temp
*.log
tmp/
temp/
# OS files
.DS_Store
Thumbs.db
# Environment variables
.env
.env.local
java
# Build outputs
target/
build/
out/
bin/
# Gradle
.gradle/
gradle/wrapper/gradle-wrapper.jar
# Maven
dependency/
.m2/
# IDE
.idea/
*.iml
*.ipr
*.iws
.settings/
.classpath
.project
.factorypath
.apt_generated/
.apt_generated_tests/
# Compiled
*.class
*.jar
*.war
*.ear
# Logs & temp
*.log
logs/
tmp/
temp/
# OS files
.DS_Store
Thumbs.db
rust
# Build outputs
target/
# OS files
.DS_Store
Thumbs.db
# Logs
*.log
go
# Binaries
*.exe
*.exe~
*.dll
*.so
*.dylib
*.test
*.out
bin/
# Vendor (if using vendoring)
vendor/
# Coverage
coverage.out
coverage.html
# Logs & temp
*.log
tmp/
temp/
# OS files
.DS_Store
Thumbs.db
mobile
# React Native / Expo
node_modules/
.expo/
.expo-shared/
# iOS
ios/Pods/
ios/build/
ios/DerivedData/
*.xcworkspace/xcuserdata/
*.xcodeproj/xcuserdata/
# Android
android/build/
android/.gradle/
android/app/build/
android/local.properties
*.apk
*.aab
# Flutter / Dart
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
build/
*.g.dart
# Build & cache
dist/
.cache/
.turbo/
# Logs & temp
*.log
tmp/
temp/
# Lock files
package-lock.json
yarn.lock
pnpm-lock.yaml
pubspec.lock
# OS files
.DS_Store
Thumbs.db
# Environment
.env
.env.local
monorepo
# All dependencies
**/node_modules/
**/venv/
**/.venv/
**/vendor/
**/__pycache__/
# All build outputs
**/dist/
**/build/
**/out/
**/.next/
**/.nuxt/
**/target/
**/.turbo/
# Docker
.docker/
docker-compose.override.yml
# Cache
**/.cache/
**/*.tsbuildinfo
**/.eslintcache
# Logs & temp
**/*.log
**/tmp/
**/temp/
# Lock files
**/package-lock.json
**/yarn.lock
**/pnpm-lock.yaml
# Test & coverage
**/coverage/
**/.nyc_output/
**/.pytest_cache/
# OS files
.DS_Store
Thumbs.db
# Environment variables
**/.env
**/.env.local
**/.env.*.local
devops
# Terraform
.terraform/
*.tfstate
*.tfstate.*
*.tfplan
*.tfvars
!example.tfvars
# Kubernetes
kubeconfig
*.kubeconfig
# Docker
docker-compose.override.yml
# Ansible
*.retry
# Secrets & credentials
*.pem
*.key
*.crt
*.p12
secrets/
credentials/
# Logs & temp
*.log
logs/
tmp/
temp/
# CI/CD artifacts
artifacts/
reports/
# OS files
.DS_Store
Thumbs.db
# Environment
.env
.env.local