Home / Blog / Claude Code 万字终极教程|全网最,看完这篇不 (English)

Claude Code 万字终极教程|全网最,看完这篇不 (English)

By CaelLee | | 6 min read

Claude Code 万字终极教程|全网最,看完这篇不 (English)

Generated: 2026-06-23 15:31:12

---

Half a Month Ago, I Almost Deleted Claude Code from My Terminal

First impression? Terrible. I installed it, threw a few small tasks at it: write a scraper, fix a bug, generate a config file. It did them all—looked the part, but that was about it. After a week, it felt no different from using ChatGPT: ask a question, get an answer, rinse and repeat, nothing special.

Then one day I was bored out of my mind and decided to dig through Claude Code's official documentation and its open-source toolchain from start to finish. My back went cold.

I hadn't even used 30% of its capabilities. The problem wasn't the tool—it was me.

That was a slap in the face. I've been writing tech columns for ten years, always thought I could pick up any new tool in no time, and here I was, tripped up by a command-line tool. So today, I want to dump everything I've learned over the past many months—every pitfall I've fallen into, every lesson I've learned, and the most valuable insights I've picked up. This isn't some "install with one command" tutorial—those are everywhere. What I want to talk about is: after you've installed it, how do you actually get it to work for you? How do you go from "you say one thing, it does one thing" to "you say one sentence, and it handles the entire task on its own"?

---

First, Let's Get Straight What This Thing Actually Is

Claude Code isn't the web version of Claude, and it's not some IDE plugin. It's an official command-line tool from Anthropic that runs inside your terminal, can read your files, run your commands, and call on models to help you get things done.

I usually describe it like this: It's like a brand new super-intern—crazy capable, execution speed maxed out, but it needs three things: an identity (API Key or subscription), a workspace (a project folder), and its first set of instructions (the prompt you give it).

This intern has one fatal trait: the clearer your instructions, the better the output. If you're vague, it'll still get the job done, but you'll probably have to redo it. So this whole article comes down to one thing: learning how to be crystal clear.

Here's how I usually launch it: claude --dangerously-skip-permissions. Brutally skips all permission prompts. Some people say that's unsafe—I'll talk about how to handle safety later. For now, just remember that command.

---

Part 1: Install It and Don't Waste Your Youth on This Step

One line of command—for real.

Mac/Linux users, open the terminal:


npm install -g @anthropic-ai/claude-code

Windows users, open PowerShell as administrator and paste the same line.

Type claude --version, see a version number, and you're done.

No IDE configuration, no plugin conflicts, no environment variables to fiddle with for hours. Compared to those "next-generation development tools" that take an hour just to set up, Claude Code's installation experience alone already beats half of them.

---

Wait, I'm Not Saying You Shouldn't Read That 100,000-Character Tutorial

I went through the 100,000-character Chinese tutorial by Lao Jin carefully. High quality. Ten tutorials, over 70 code examples, 120 FAQs—all free and open-source. He spent many months on it, stepped in countless traps, and then systematically organized everything he learned.

But I don't like chewing through long tutorials from the beginning. I'm a firm believer in "use it first, look it up when you hit a problem." This article follows the same approach—it won't dump a hundred thousand characters on you. Instead, I'll walk you through the five key points that actually make the difference after installation, one by one. First, get Claude Code installed, open your project folder, and follow me.

---

Part 2: The Very First Thing You Must Do—Write Your CLAUDE.md

A lot of people's first prompt after installation: "Write me a scraper." Okay, it works. But then when you give it a second task, it acts like it has amnesia—remembers nothing.

That's why you must write CLAUDE.md. It's Claude Code's brain.

Think of it as an employee handbook. Every new session, Claude Code reads this file first. It learns who you are, what your project is about, what tech stack you prefer, your coding standards, and your no-go areas.

How to write it? Create a CLAUDE.md file in your project root. Let me use my own quantitative trading project as an example:


# Project Overview
This is a Ptrade quantitative strategy project for the A-share market

# Tech Stack
- Data analysis: pandas + numpy
- Technical analysis: ta-lib + talib
- Machine learning: scikit-learn + xgboost
- Backtesting framework: backtrader + vectorbt
- Visualization: matplotlib + plotly

# Code Standards
- Python code follows PEP 8
- All functions must have type hints and docstrings
- Naming conventions: snake_case for functions, PascalCase for classes
- Test coverage no less than 80%

# Common Commands
- Run tests: pytest tests/ -v
- Code formatting: black .
- Lint check: ruff check .

# Rules
- Do not install dependencies not listed in requirements.txt
- Ask me before making changes
- Do not hardcode API keys or other sensitive information

Try it after writing this. The difference is night and day. Before, if you asked it to "write a factor model," it would generate a bunch of generic code that didn't match your framework, or even your libraries. With CLAUDE.md, it knows you'll be using scikit-learn and xgboost, knows you'll be backtesting with backtrader, and the code it generates can be dropped right into your project without any changes.

The gap between a 30-point Claude Code and a 90-point Claude Code is this one file. That's not an exaggeration.

---

Part 3: Sandbox—Let It Roam Free, But Don't Let It Break the Wall

Earlier I used --dangerously-skip-permissions, and some people worry about security. That worry is valid, but what you should really care about isn't skipping permissions itself—it's setting boundaries.

In simple terms, a sandbox is an isolated environment. Claude Code needs to run tests, run linters, run builds, read files, write files inside your project—if it asks for confirmation at every step, you'll go crazy. If you don't give it permissions at all, it'll keep nagging you. If you give it full access, you're afraid it might mess with critical stuff.

The sandbox is the perfect middle ground: let it act freely within the project's boundaries, but stop it from going outside.

What scenarios are especially good for a sandbox?

The configuration is dead simple. Create .claude/sandbox.json in your project root:


{
 "allowedCommands": ["npm", "npx", "node", "python", "pytest", "git"],
 "allowedPaths": ["."],
 "forbiddenPaths": ["~/.ssh", "~/.aws", "~/.kube"]
}

The meaning is clear: it can only run these commands inside the current directory, and sensitive assets like SSH keys, AWS settings, and Kubernetes configs are locked down.

The biggest benefit of a sandbox isn't "more security"—it's that you can safely open up permissions while giving Claude Code a clear operating range. After this, it can finally enter a state of continuous, uninterrupted work.

---

Part 4: Skills + Hooks + MCP—From Obedient to Proactive

Once you've set up CLAUDE.md and the sandbox, Claude Code has already evolved from a "sometimes useful tool" to a "daily necessity." But if you want to take it up another level, you need to play with three things. What follows is my own

C

Cael Lee

Full-stack developer with 8+ years of experience. Currently building AI-powered developer tools. I've tested 20+ AI API providers and coding assistants.

Ready to get started?

Get your API key and start building with 180+ AI models.

Get API Key Free