Step-by-step instructions to configure your Claude + GitHub + VS Code environment.
✅ GitHub account
✅ Access to Claude.ai (free or paid)
✅ Basic understanding of Git
Option A: Use This Template
- Go to https://github.com/JeffreyLovett/claude-github-codespace-template
- Click "Use this template" → "Create a new repository"
- Name it (e.g.,
my-project) - Choose Public or Private
- Click "Create repository"
Option B: Clone Existing Template
git clone https://github.com/JeffreyLovett/claude-github-codespace-template.git
cd claude-github-codespace-template
# Make your changes
git remote set-url origin https://github.com/YourUsername/your-new-repo.git
git push -u origin main- Navigate to your new repository on GitHub
- Click the Code button (green)
- Select the Codespaces tab
- Click "Create codespace on main"
- Wait 2-3 minutes while environment builds
What's Happening:
- Docker container spinning up
- Node.js, Python, Git installing
- VS Code extensions loading
- Ports being forwarded
When Codespace opens, run:
# Set your Git identity
git config --global user.name "Your Full Name"
git config --global user.email "your.email@example.com"
# Authenticate with GitHub
gh auth login
# Follow prompts:
# - Choose "GitHub.com"
# - Choose "HTTPS"
# - Authenticate via browserVerify:
git config --global --list
gh auth status# Generate new ED25519 key (most secure)
ssh-keygen -t ed25519 -C "your.email@example.com"
# When prompted:
# - Save to: /home/codespace/.ssh/id_ed25519 (default)
# - Passphrase: HIGHLY RECOMMENDED (use password manager)Start SSH agent:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519Copy your public key:
cat ~/.ssh/id_ed25519.pubAdd to remote server:
# Option A: Manual (if you have password access)
ssh-copy-id user@your-server.com
# Option B: Copy-paste to server
# 1. SSH into server with password
# 2. Edit ~/.ssh/authorized_keys
# 3. Paste the public key contentTest connection:
ssh user@your-server.com
# Should connect without password (but may ask for key passphrase)The Process:
-
In Claude.ai Tab:
- Describe your coding task
- Ask for implementation suggestions
- Request code snippets
-
In VS Code Codespace:
- Create files based on Claude's suggestions
- Use Copilot for inline completions
- Run/test code
-
Iteration:
- Copy error messages back to Claude
- Get debugging help
- Refine implementation
Pro Tip: Use Claude for architecture/design, Copilot for implementation.
Bad Practice:
"Write me a function"
Good Practice:
I'm working in a Node.js project using Express.
Here's my current route structure:
[paste code]
I need to add JWT authentication middleware.
Tech stack: Node 20, Express 4.18, jsonwebtoken 9.0
Copy from Codespace → Paste to Claude → Implement suggestions
For Codespace Secrets:
- Go to GitHub → Settings → Codespaces
- Click "New secret"
- Add secrets like:
DATABASE_URLAPI_KEYJWT_SECRET
In your code:
// Auto-available in Codespace
const apiKey = process.env.API_KEY;For local .env files:
# Create .env (already in .gitignore)
echo "DATABASE_URL=postgresql://..." > .env
echo "API_KEY=your-key-here" >> .env
# Install dotenv
npm install dotenv
// In code
require('dotenv').config();CRITICAL: Never commit:
# Check what would be committed
git status
# If you see .env, keys, or secrets:
git rm --cached .env
git commit -m "Remove sensitive file"Verify .gitignore includes:
*.key
*.pem
id_rsa
secrets/Run these commands:
# ✅ Node.js
node -e "console.log('Node works:', process.version)"
# ✅ Python
python -c "print('Python works')"
# ✅ Git
git --version
# ✅ GitHub CLI
gh --version
# ✅ SSH
ssh -T git@github.com
# Should see: "Hi YourUsername! You've successfully authenticated"
# ✅ Ports
curl http://localhost:3000
# Should show connection attempt (even if nothing running)Create a test file:
# Create sample Node.js file
cat > test.js << 'EOF'
// Start typing a function - Copilot should suggest
function calculateSum(a, b) {
return a + b;
}
console.log(calculateSum(5, 3));
EOF
# Run it
node test.js
# Output: 8Verify Copilot:
- Open
test.js - Type
// Function to reverse a string - Press Enter
- Copilot should suggest implementation
Every new project:
# 1. Go to template repo
# 2. Click "Use this template"
# 3. Name new project
# 4. Launch Codespace
# 5. Install project dependencies
npm init -y # or
pip install -r requirements.txtFor Organization Repos:
- Fork template to your org
- Customize
.devcontainer/devcontainer.json - Team members use org template
| Problem | Solution |
|---|---|
| Copilot not suggesting | Check Extensions panel → Enable GitHub Copilot |
| Git push rejected | Run gh auth login again |
| Port not accessible | Check PORTS tab in bottom panel → Make port public |
| SSH key not working | Verify ssh-add -l shows key, re-run ssh-add |
| Python packages missing | Run pip install --upgrade pip |
| Node modules error | Delete node_modules/ and run npm install |
Edit .devcontainer/devcontainer.json:
{
"features": {
"ghcr.io/devcontainers/features/postgres:1": {"version": "15"},
"ghcr.io/devcontainers/features/redis:1": {"version": "latest"}
}
}{
"customizations": {
"vscode": {
"extensions": [
"GitHub.copilot",
"bradlc.vscode-tailwindcss", // Add Tailwind
"prisma.prisma" // Add Prisma
]
}
}
}Your workspace now has:
- ✅ Full development environment
- ✅ Git configured
- ✅ SSH keys set up
- ✅ Copilot working
- ✅ Claude integration workflow
- ✅ Security best practices
- Read docs/CLAUDE_INTEGRATION.md for advanced Claude workflows
- Read docs/SSH_VPS_GUIDE.md for remote server management
- Start coding! 🚀
Questions? Open an issue or check GitHub Discussions.
WIZARD CHECK: [✔] Complete setup [✔] Security verified [✔] Ready for production