Personal template repository for consistent Claude Code configuration across projects. Includes security controls, permission management, and development guidelines.
Option 1: Automated Setup (Recommended)
Run the setup script from your new project directory:
# From the template repository
./setup.sh /path/to/project "Project Name" "TechStack"
# Or with PowerShell (Windows)
.\setup.ps1 -ProjectPath "C:\path\to\project" -ProjectName "My API Project" -TechStack "Node.js, Express, TypeScript"Option 2: Manual Setup (5 minutes)
-
Copy template files to your project:
cp CLAUDE.md /path/to/project/ cp -r .claude /path/to/project/ cp .gitignore.template /path/to/project/.gitignore
-
Customize
CLAUDE.mdwith your project's:- Purpose and tech stack
- Development commands (build, test, lint)
- Architecture (if complex)
-
Test it: Ask Claude Code to do a simple task
Detailed instructions: See docs/SETUP.md | Checklist: See docs/CHECKLIST.md
- Protected files:
.env*, secrets, keys cannot be read/written - Approval prompts: Asks before destructive operations (edit, delete, git push)
- File access restrictions: Automatic protection for sensitive patterns
- Semantic Versioning: MAJOR.MINOR.PATCH versioning
- Git Flow: Branching strategy (main, develop, feature/*)
- Conventional Commits: Standardized commit message format
- Single-author commits: No CoAuthored commits
Based on Andrej Karpathy's LLM coding principles:
- Think Before Coding - State assumptions, surface tradeoffs
- Simplicity First - Minimum code, no speculative features
- Surgical Changes - Touch only what you must
- Goal-Driven Execution - Define success criteria, verify results
| Mode | Behavior | Best For |
|---|---|---|
default |
Prompts for writes/shell, no prompts for reads | Most projects (recommended) |
acceptEdits |
Auto-approves file edits, prompts for shell | High-volume editing, trusted projects |
auto |
Auto-approves most operations | Trusted projects, rapid prototyping |
bypassPermissions |
No prompts | Use with extreme caution |
my-cc-setup/
βββ CLAUDE.md # Main configuration + development guidelines
βββ .claude/
β βββ settings.json # Permission controls and modes
βββ .gitignore.template # Template .gitignore with security rules
βββ setup.sh # Unix/Linux/macOS setup script
βββ setup.ps1 # Windows PowerShell setup script
βββ docs/ # Documentation
β βββ SETUP.md # Detailed setup instructions
β βββ CHECKLIST.md # New project checklist
β βββ GLOBAL_SETUP.md # Global configuration guide
β βββ PROJECT_OVERRIDE.md # Project-specific override guide
β βββ GITHUB_ABOUT.md # GitHub repository setup
βββ examples/ # Tech stack examples
β βββ CLAUDE.nodejs.md # Node.js/Express/TypeScript example
β βββ CLAUDE.python.md # Django/Python example
β βββ CLAUDE.golang.md # Go/Clean Architecture example
βββ README.md # This file
- State assumptions explicitly
- Present multiple interpretations
- Push back when simpler approaches exist
- Stop when confused and ask questions
- No features beyond what was asked
- No abstractions for single-use code
- If 200 lines could be 50, rewrite it
- Touch only what you must
- Don't improve unrelated code
- Clean up only your own mess
- Define success criteria
- Loop until verified
- Write tests that reproduce bugs
- Reading source code
- Searching with Grep/Glob
- Git status/log
- Read-only file operations
- Editing files (Edit/Write tools)
- Running shell commands
- Git commits/pushes/merges
- Installing dependencies
- File deletion operations
- Reading
.envfiles - Writing to
secrets/directories - Accessing private keys (
*.pem,*.key) - Modifying
.ssh/directories - Reading
.aws/configurations
| File | Purpose |
|---|---|
| docs/SETUP.md | Detailed setup instructions with troubleshooting |
| docs/CHECKLIST.md | Step-by-step checklist for new projects |
| docs/GLOBAL_SETUP.md | Global configuration guide |
| docs/PROJECT_OVERRIDE.md | Project-specific override guide |
| docs/GITHUB_ABOUT.md | GitHub repository setup |
| CLAUDE.md | Full development guidelines and conventions |
| examples/ | Tech stack-specific templates |
# Basic setup
.\setup.ps1 -ProjectPath "C:\Dev\my-new-project"
# With project details
.\setup.ps1 -ProjectPath "C:\Dev\my-api" -ProjectName "My REST API" -TechStack "Node.js, Express, TypeScript"
# Force overwrite existing files
.\setup.ps1 -ProjectPath "C:\Dev\my-api" -Force# Basic setup
./setup.sh /path/to/project
# With project details
./setup.sh /path/to/project "My REST API" "Node.js, Express, TypeScript"
# Force overwrite existing files
./setup.sh /path/to/project "My REST API" "Node.js, Express, TypeScript" --forceProjectPath: Target project directory (default: current directory)ProjectName: Your project name (replaces placeholders in CLAUDE.md)TechStack: Technologies used (replaces placeholders in CLAUDE.md)-SkipGit: Skip git initialization-Force/--force: Overwrite existing files without prompting
For more control, copy files manually:
# Copy core configuration
cp CLAUDE.md /path/to/project/
cp -r .claude /path/to/project/
cp .gitignore.template /path/to/project/.gitignoreThen edit CLAUDE.md to customize for your project.
Edit CLAUDE.md to include your project's commands:
## Development Commands
### Building
```bash
npm run build # Node.js
cargo build # Rust
go build # Gonpm test # Node.js
cargo test # Rust
go test ./... # Gonpm run lint # Node.js
cargo clippy # Rust
golangci-lint run # Go
### Add Architecture Documentation
For complex projects, add to CLAUDE.md:
```markdown
## Architecture
### Directory Structure
src/ βββ core/ # Core business logic βββ api/ # API handlers and routing βββ models/ # Data models and schemas βββ utils/ # Shared utilities
### Key Patterns
- **Fat Models, Thin Views**: Business logic in models
- **Dependency Injection**: Used throughout
- **Repository Pattern**: Data access abstraction
- Change permission mode to
acceptEditsin.claude/settings.json - Auto-approves file edits, still prompts for shell commands
- Check if file is in protected list (CLAUDE.md Security section)
- Move non-sensitive config to unprotected location
- Update CLAUDE.md security rules if needed
- Set permission mode to
default - Remove
alwaysAllowShell: trueif present
Apache License 2.0 - Feel free to use and modify for your needs.
This is a personal template. Feel free to fork and customize for your own workflow.
Version: 1.0.0 | Last Updated: 2026-05-05 | Maintained: 0xPuncker