Private And Public Claude MD
Slash command to seed private and public CLAUDE.md files
About This Project
Private-And-Public-Claude-MD is a Shell project that helps developers manage two layers of configuration for Claude Code: a public CLAUDE.md file containing project-specific instructions that can be committed to version control, and a CLAUDE_PRIVATE.md file for sensitive or personal instructions such as API keys, personal preferences, and private system details. The project includes a setup script that adds CLAUDE_PRIVATE.md to the user's global gitignore file, creating one at ~/.gitignore_global if necessary, and configures git to use it. A slash command definition, commands/global-claude-private.md, allows Claude Code to perform this setup automatically. Manual setup steps using git config are also documented for users who prefer not to run the script.
The approach relies on git's core.excludesfile setting rather than per-repository ignore rules, so a single one-time configuration applies to every repository on the system. This reduces the chance of accidentally committing sensitive instructions while allowing the same private configuration to be reused across projects. The project requires git, a Bash shell, and the Claude Code CLI for the automated script.
The project is useful for developers who use Claude Code across multiple repositories and want to keep personal or confidential instructions out of shared codebases. It may also suit teams that commit project-level CLAUDE.md files and need a consistent, low-effort way to prevent private notes from being tracked.