# How to Set Up a Complete Claude Code Dev Environment From Zero
**作者**: Guri Singh
**日期**: 2026-04-17T18:35:27.000Z
**来源**: [https://x.com/heygurisingh/status/2045209540313178527](https://x.com/heygurisingh/status/2045209540313178527)
---

(The 15-Minute Stack That Replaced My Entire Toolchain)
Most developers install Claude Code, type one prompt, get impressed, and never configure it properly.
They're using a Ferrari in first gear.
Claude Code with a proper setup, a CLAUDE.md that knows your project, five skills that fire automatically, hooks that enforce your standards, and MCP servers that connect your tools, is a fundamentally different experience from Claude Code out of the box.
I know because I ran both versions for 30 days. The unconfigured version was good. The configured version replaced my entire development toolchain. Cursor, Copilot, Grammarly, my linter dashboard, my PR review process. All of it.
This guide takes you from zero to a fully configured Claude Code environment in 15 minutes. Every step has the exact command. Every skill has the exact .md file. Nothing is theoretical.
By the end, you'll have a setup that 95% of Claude Code users don't know exists.
Let's build it.
Step 1: Install Claude Code (2 minutes)
The native installer is now the recommended method. No Node.js required. It auto-updates in the background.
macOS:
Open Terminal and paste:
curl -fsSL https://cli.claude.com/install.sh | sh
Linux (Ubuntu/Debian):
curl -fsSL https://cli.claude.com/install.sh | sh
Windows (PowerShell):
irm https://cli.claude.com/install.ps1 | iex
Windows (CMD):
curl -fsSL https://cli.claude.com/install.bat | cmd
Verify it worked:
claude --version
You should see a version number. That's it. Installation is done.
Important: You need a Claude Pro subscription ($20/month) or higher. The free tier does not include Claude Code.
If you're already paying $20/month for Claude chat, you already have Claude Code access. You just haven't used it yet.
Authenticate:
Navigate to any project folder and type:
claude
Follow the browser prompts to log in. Takes 30 seconds.
Step 2: Create Your CLAUDE.md (3 minutes)
This is the single most important file most people never create.
CLAUDE.md is your project's institutional memory. Claude reads it at the start of every session. It tells Claude your project's conventions, architecture, tech stack, and preferences. Without it, Claude starts from zero every time. With it, Claude already knows your project before you type a single prompt.
Think of it this way: CLAUDE.md is the difference between hiring a contractor who's never seen your codebase and onboarding a teammate who's read all the docs.
Navigate to your project root and create the file:
touch CLAUDE.md
Or even better, let Claude write it for you:
claude
"Analyze this codebase and generate a CLAUDE.md file that
describes the project structure, tech stack, conventions,
and any patterns you find in the code."
Claude will scan your files and generate a CLAUDE.md tailored to your project. Review it, edit it, commit it to your repo.
Here's what a good CLAUDE.md includes:
- Project overview: what this is, what it does, who it's for.
- Tech stack: language, framework, database, deployment target.
- Directory structure: where things live and why.
- Conventions: naming patterns, file organization, test strategy.
- Do's and don'ts: "Always use TypeScript strict mode." "Never use any type." "Tests go in __tests__/ next to the file they test."
- Common commands: how to run the dev server, run tests, deploy.
Example CLAUDE.md for a Next.js project:
# Project: InvoiceFlow
## Overview
SaaS invoicing app built with Next.js 14, TypeScript,
Supabase, and Stripe. Deployed on Vercel.
## Stack
- Next.js 14 (App Router)
- TypeScript (strict mode, no `any`)
- Supabase (auth, database, storage)
- Stripe (payments, subscriptions)
- Tailwind CSS (no custom CSS files)
- Vitest for testing
## Conventions
- Components: PascalCase, one component per file
- API routes: /app/api/[resource]/route.ts
- Server actions: /app/actions/[name].ts
- Tests: colocated in __tests__/ folders
- Commits: conventional commits (feat:, fix:, etc.)
## Commands
- Dev: pnpm dev
- Test: pnpm test
- Build: pnpm build
- Lint: pnpm lint
Commit this file. Every developer on your team who uses Claude Code will inherit the same conventions automatically.
Step 3: Install Your First Five Skills (5 minutes)
Skills are persistent .md files that teach Claude how to do specific types of work. They fire automatically when the task matches. No prompting. No re-explaining. Claude just knows.
Here are the five skills every developer should install on day one, in order of impact.
Skill 1: Skill Creator
The skill that builds skills. Install this first because you'll use it to build every custom skill after.
npx skills@latest add anthropics/skills/skill-creator
Once installed, just tell Claude: "Use the skill-creator to help me build a skill for [your task]." It interviews you, writes the SKILL.md, and saves it.
Skill 2: TDD (Test-Driven Development)
Forces a strict red-green-refactor loop. Writes failing tests first, then minimal code to pass them, then refactors. Prevents the "it works but nobody knows why" problem.
npx skills@latest add mattpocock/skills/tdd
Skill 3: Systematic Debugging
A 4-phase debugging methodology that stops random "just try changing stuff" edits. Reproduce, narrow the root cause, apply a single fix, verify with tests.
Install from the Superpowers repo:
git clone https://github.com/obra/superpowers
cp -r superpowers/skills/systematic-debugging .claude/skills/
Skill 4: Code Review
Runs systematic security, performance, error handling, and architecture checks. Ask for a "security-first review" or "performance-first review" or a full checklist pass.
Available in the Anthropic skills repo. Add it manually or install via:
npx skills@latest add anthropics/skills/code-review
Skill 5: Auto-Commit Messages
Reads your staged diff and generates a conventional commit message with type, scope, and body. No more writing "fix stuff" at 2am.
npx skills@latest add anthropics/skills/auto-commit
Where skills live:
Skills install to your .claude/skills/ folder. They persist across sessions. They work in every project where Claude Code runs. You install once and they compound forever.
The 3-conversation rule:
If you've typed the same instructions more than three times, that's a skill begging to be built. Stop retyping. Use the skill-creator to build it once.
Step 4: Set Up Git Guardrails (1 minute)
This is not optional if you're using Claude Code on production repos.
Claude is fast and helpful until it isn't. Git guardrails block dangerous commands like push --force, reset --hard, and clean before they execute.
npx skills@latest add mattpocock/skills/git-guardrails-claude-code
This sets up Claude Code hooks that intercept git commands and ask for confirmation before anything destructive runs. It takes one minute and it will save your codebase eventually.
Step 5: Connect MCP Servers (2 minutes)
MCP (Model Context Protocol) turns Claude Code from "coding assistant" into "coding assistant with direct access to your databases, APIs, and team tools."
Without MCP, Claude can only see your files. With MCP, Claude can query your database, read your GitHub issues, check your Slack messages, and interact with your APIs.
Create a .claude/.mcp.json in your project root:
{
"mcpServers": {
"github": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
}
Popular MCP servers to start with:
- GitHub: Read issues, create PRs, review code. The most useful server for most developers.
- Filesystem: Give Claude access to directories outside your project root. Essential for monorepos.
- PostgreSQL / Supabase: Let Claude query your database directly instead of guessing at schema.
- Slack: Claude can search messages, read channels, and post updates.
Commit your .claude/.mcp.json to the repo. Every team member who pulls the project inherits the same tool setup automatically.
Step 6: Add Your First Hook (2 minutes)
Hooks let you inject custom scripts at lifecycle events. Think of them as git hooks but for Claude Code.
The most immediately useful hook: auto-format on every file save.
Create .claude/hooks/pre-tool-use.sh:
#!/bin/bash
# Run prettier on any file Claude edits
if [ "$TOOL_NAME" = "file_edit" ]; then
npx prettier --write "$FILE_PATH" 2>/dev/null
fi
Make it executable:
chmod +x .claude/hooks/pre-tool-use.sh
Other hooks teams use:
- post-tool-use: Run linter after every code edit.
- on-session-start: Load project-specific environment variables.
- pre-commit: Validate code quality before Claude commits.
Hooks are the enforcement layer. Skills teach Claude how to work. Hooks ensure it follows your rules even when you're not watching.
What You Just Built
In 15 minutes you now have:
- Claude Code installed with auto-updates.
- CLAUDE.md giving Claude persistent memory of your project's stack, conventions, and commands.
- Five skills: skill-creator, TDD, systematic debugging, code review, and auto-commit. All firing automatically when relevant.
- Git guardrails protecting your production branches from destructive commands.
- MCP servers connecting Claude to GitHub (and optionally your database, Slack, and APIs).
- A formatting hook that auto-runs Prettier on every file Claude edits.
This is not the same tool as vanilla Claude Code. This is a configured development environment that compounds. Every skill you add, every hook you write, every convention you document in CLAUDE.md makes every future session better.
Most developers are running Claude Code like a chatbot. You're now running it like an engineering platform.
What to Do Next: The First 7 Days
Day 1-2: Use the default stack.
Don't add anything else yet. Run real tasks. Notice where Claude already knows your conventions (because of CLAUDE.md) and where it doesn't.
Day 3-4: Build your first custom skill.
Identify the task you've prompted for three times already. Use the skill-creator: "Help me build a skill for [that task]." Claude interviews you, drafts the SKILL.md, and you install it. Ten minutes, permanent result.
Day 5-6: Add planning skills.
Install Grill Me (forces relentless clarifying questions before you build the wrong thing) and Write a PRD (creates product requirement docs through interactive interview):
npx skills@latest add mattpocock/skills/grill-me
npx skills@latest add mattpocock/skills/write-a-prd
Day 7: Audit and expand.
By now you'll have a clear picture of what your stack is missing. Browse SkillsMP (skillsmp.com) for community skills. Check the Anthropic skills repo for official ones. Add what solves a real problem. Ignore everything else.
The Honest Part Nobody Tells You
Day 3 is where most people quit.
The initial excitement fades. A skill fires when you don't want it to. The CLAUDE.md has a convention that's slightly wrong and Claude keeps following it. You'll think "this is more work than just prompting."
It is more work. On day 3. By day 10, it's dramatically less work. By day 30, you've forgotten what it felt like to re-explain your project every session.
That's the compounding. The setup cost is real. The payoff is permanent.
Rate limits are also real.
On Claude Pro ($20/month), you'll hit rate limits during heavy coding sessions. The community consensus is: Pro handles 80% of workflows. If you're coding 6+ hours a day, the Max plan at $100/month removes most limits. Start with Pro. Upgrade only when you actually hit the ceiling.
The 15-Minute Challenge
You just read 2,500 words about setting up Claude Code. Here's what I want you to do in the next 15 minutes:
- Install Claude Code (2 minutes).
- Let Claude generate your CLAUDE.md (3 minutes).
- Install the five starter skills (5 minutes).
- Add git guardrails (1 minute).
- Connect one MCP server (2 minutes).
- Add the Prettier hook (2 minutes).
Then open a real project and give Claude a real task. Not "write hello world." Something you'd actually work on today.
The difference between that first session and the Claude Code experience you had before won't be subtle.
It will be obvious. And it will be permanent.
Send this to the developer on your team who installed Claude Code once, tried one prompt, and went back to Cursor. They didn't see the real tool. Now they will.
## 相关链接
- [Guri Singh](https://x.com/heygurisingh)
- [@heygurisingh](https://x.com/heygurisingh)
- [4.6K](https://x.com/heygurisingh/status/2045209540313178527/analytics)
- [https://cli.claude.com/install.sh](https://cli.claude.com/install.sh)
- [https://cli.claude.com/install.sh](https://cli.claude.com/install.sh)
- [https://cli.claude.com/install.ps1](https://cli.claude.com/install.ps1)
- [https://cli.claude.com/install.bat](https://cli.claude.com/install.bat)
- [https://github.com/obra/superpowers](https://github.com/obra/superpowers)
- [@modelcontextprotocol/server-github](https://x.com/@modelcontextprotocol/server-github)
- [skillsmp.com](https://skillsmp.com/)
- [Upgrade to Premium](https://x.com/i/premium_sign_up)
- [2:35 AM · Apr 18, 2026](https://x.com/heygurisingh/status/2045209540313178527)
- [4,637 Views](https://x.com/heygurisingh/status/2045209540313178527/analytics)
---
*导出时间: 2026/4/18 11:06:18*