Add setting to prevent automatic .claude/ directory creation

Status Closed — not planned
Maintainer reply None cached
Activity 1 comment · opened Jul 2, 2026 · closed Aug 22, 2026

Currently, Claude Code automatically creates .claude/ directories in projects when certain features are initialized. I'd like the ability to opt out of this behavior globally, so that .claude/ directories are only created when explicitly requested.

Desired behavior

  • A configuration setting (e.g., createProjectDirsAutomatically: false) in ~/.claude/settings.json that prevents automatic .claude/ directory creation
  • Claude Code should only create project-level .claude/ configuration when the user explicitly requests it (e.g., via /init or similar commands)

Current behavior

.claude/ directories are created automatically in response to various Claude Code operations, with no way to globally prevent this.

Use cases

  1. Keep projects clean by only creating .claude/ directories when I have a specific need for project-level configuration (e.g., custom settings, hooks, or skills).
  1. Use vendor-neutral directories (like .ai/) for AI-related files (instructions, skills, configurations) that can be leveraged by multiple LLM vendors, rather than having vendor-specific .claude/ directories.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗