Skip to content

0xPuncker/my-cc-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Claude Code Setup Template

Claude Code Template License Last Updated Maintained

Personal template repository for consistent Claude Code configuration across projects. Includes security controls, permission management, and development guidelines.

πŸš€ Quick Start

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)

  1. 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
  2. Customize CLAUDE.md with your project's:

    • Purpose and tech stack
    • Development commands (build, test, lint)
    • Architecture (if complex)
  3. Test it: Ask Claude Code to do a simple task

Detailed instructions: See docs/SETUP.md | Checklist: See docs/CHECKLIST.md

πŸ“‹ What This Provides

πŸ”’ Security by Default

  • 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

πŸ“ Consistent Conventions

  • 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

🎯 Quality Guidelines

Based on Andrej Karpathy's LLM coding principles:

  1. Think Before Coding - State assumptions, surface tradeoffs
  2. Simplicity First - Minimum code, no speculative features
  3. Surgical Changes - Touch only what you must
  4. Goal-Driven Execution - Define success criteria, verify results

βš™οΈ Permission Modes

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

πŸ“ Repository Structure

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

🎯 Core Guidelines

Think Before Coding

  • State assumptions explicitly
  • Present multiple interpretations
  • Push back when simpler approaches exist
  • Stop when confused and ask questions

Simplicity First

  • No features beyond what was asked
  • No abstractions for single-use code
  • If 200 lines could be 50, rewrite it

Surgical Changes

  • Touch only what you must
  • Don't improve unrelated code
  • Clean up only your own mess

Goal-Driven Execution

  • Define success criteria
  • Loop until verified
  • Write tests that reproduce bugs

πŸ” Permission Examples

βœ… No Prompt Needed

  • Reading source code
  • Searching with Grep/Glob
  • Git status/log
  • Read-only file operations

⚠️ Approval Required

  • Editing files (Edit/Write tools)
  • Running shell commands
  • Git commits/pushes/merges
  • Installing dependencies
  • File deletion operations

πŸ›‘οΈ Never Allowed

  • Reading .env files
  • Writing to secrets/ directories
  • Accessing private keys (*.pem, *.key)
  • Modifying .ssh/ directories
  • Reading .aws/ configurations

πŸ“– Documentation

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

πŸ›  How to Use This Template

Automated Setup (Recommended)

Windows (PowerShell)

# 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

Unix/Linux/macOS (Bash)

# 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" --force

Script Parameters

  • ProjectPath: 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

Manual Setup

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/.gitignore

Then edit CLAUDE.md to customize for your project.

🎨 Customization Examples

Add Development Commands

Edit CLAUDE.md to include your project's commands:

## Development Commands

### Building
```bash
npm run build        # Node.js
cargo build          # Rust
go build             # Go

Testing

npm test             # Node.js
cargo test           # Rust
go test ./...        # Go

Linting

npm 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

πŸŽ“ Learn More

Key Concepts

Claude Code Resources

πŸ” Troubleshooting

"Too many prompts"

  • Change permission mode to acceptEdits in .claude/settings.json
  • Auto-approves file edits, still prompts for shell commands

"Claude can't read my config"

  • 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

"Not enough prompts"

  • Set permission mode to default
  • Remove alwaysAllowShell: true if present

πŸ“¦ License

Apache License 2.0 - Feel free to use and modify for your needs.

🀝 Contributing

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

About

πŸš€ Personal Claude Code template with security controls, permission management, and development guidelines. Consistent AI assistant configuration across all projects.

Topics

Resources

License

Stars

Watchers

Forks

Contributors