Git ignore configuration patterns for MetaSaver monorepos. Includes 10 required pattern categories (dependencies, build outputs, environment files with security-critical .env and .npmrc exclusions, logs, testing, IDE, OS, database, cache, temporary files). Use when creating or auditing .gitignore files to prevent secret leakage and repository pollution.
Provides canonical .gitignore patterns for MetaSaver monorepos covering dependencies, build outputs, and security-critical environment files. Use when creating or auditing .gitignore files to prevent secret leakage and repository pollution.
/plugin marketplace add metasaver/claude-marketplace/plugin install core-claude-plugin@metasaver-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill provides the canonical .gitignore patterns for MetaSaver monorepos.
# Dependencies
node_modules
.pnpm-store
.yarn
.npm
# Build outputs
dist
build
out
.turbo
.next
*.tsbuildinfo
# Environment files - CRITICAL: prevent secret leakage
.env
.env.*
!.env.example
!.env.template
# NPM configuration - may contain auth tokens
.npmrc
!.npmrc.template
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# Testing
coverage
.nyc_output
test-results
playwright-report
# IDE/Editor (note: .vscode often committed, exclude only if needed)
.idea
*.swp
*.swo
*~
*.sublime-workspace
# OS files
.DS_Store
Thumbs.db
desktop.ini
# Database
*.db
*.db-journal
# Cache
.cache
.eslintcache
.stylelintcache
*.cache
# Temporary
tmp
temp
*.tmp
*.temp
# ========================================
# Dependencies
# ========================================
node_modules
.pnpm-store
.yarn
.npm
jspm_packages
# ========================================
# Build outputs
# ========================================
dist
build
out
.turbo
.next
.nuxt
.cache
.parcel-cache
*.tsbuildinfo
# ========================================
# Environment files - SECURITY CRITICAL
# ========================================
.env
.env.*
!.env.example
!.env.template
.npmrc
!.npmrc.template
# ========================================
# Logs
# ========================================
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# ========================================
# Testing and coverage
# ========================================
coverage
.nyc_output
test-results
playwright-report
*.lcov
# ========================================
# IDE and editor files
# ========================================
.idea
*.swp
*.swo
*~
*.sublime-workspace
.project
.classpath
.settings
# ========================================
# Operating system files
# ========================================
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
desktop.ini
# ========================================
# Database files
# ========================================
*.db
*.db-journal
*.sqlite
*.sqlite3
# ========================================
# Cache files
# ========================================
.cache
.eslintcache
.stylelintcache
.prettiercache
*.cache
# ========================================
# Temporary files
# ========================================
tmp
temp
*.tmp
*.temp
*.bak
*.backup
*.orig
const REQUIRED_PATTERNS = {
critical: [".env", ".env.*", "!.env.example", ".npmrc", "!.npmrc.template"],
high: ["node_modules", "dist", "build", ".turbo", "*.log", "coverage"],
medium: [".next", "out", ".cache", ".eslintcache", "*.tsbuildinfo"],
low: [".DS_Store", "Thumbs.db", "desktop.ini", "*.db", "tmp"],
};
function validateGitignore(content: string): ValidationResult {
const lines = content.split("\n").map((l) => l.trim());
const violations = [];
for (const [priority, patterns] of Object.entries(REQUIRED_PATTERNS)) {
for (const pattern of patterns) {
if (!lines.includes(pattern)) {
violations.push({
pattern,
priority,
message: `Missing ${priority} pattern: ${pattern}`,
});
}
}
}
return {
valid: violations.filter((v) => v.priority === "critical").length === 0,
violations,
};
}
! pattern to allow template filesBoth use the same patterns. The .gitignore is repository-agnostic - all monorepos need the same exclusions.