Content
<div align="center">
# Tool List
**⭐️ Feel free to star the repo for continuous updates!**
[English](#english) |
</div>
---
> 🎯 **What problems does this repo solve?**
>
> Claude Code is powerful, but Chinese developers face three major pain points: **unstable network**, **expensive tokens**, and **no Chinese configuration references**.
>
> This repo provides a one-stop solution to help you set up Claude Code in 10 minutes, avoid detours, and save money.
---
## 📖 Table of Contents
- [⚡ Quick Start](#-quick-start)
- [🌐 Network Configuration (Must Read)](#-network-configuration-must-read)
- [💰 Cost Optimization (Save 40-80%)](#-cost-optimization-save-40-80)
- [📋 CLAUDE.md Template](#-claudemd-template)
- [🔌 MCP Configuration for China](#-mcp-configuration-for-china)
- [⚙️ Curated Skills Recommendations](#️-curated-skills-recommendations)
- [🛠️ Development Workflow](#️-development-workflow)
- [❓ Frequently Asked Questions](#-frequently-asked-questions)
- [📚 Further Reading](#-further-reading)
---
## ⚡ Quick Start
### 1. Install Claude Code
```bash
# Ensure Node.js >= 18
node -v
# Global installation
npm install -g @anthropic-ai/claude-code
# Start
claude
```
### 2. Initial Authentication
```bash
# Log in to Anthropic account (requires internet access)
claude auth login
# Or use API Key
export ANTHROPIC_API_KEY="sk-ant-xxx"
claude
```
### 3. Apply this Repo's Configuration
```bash
# Clone this repo
git clone https://github.com/EA-Studio-SHARK/claude-code-china.git
# Copy the recommended CLAUDE.md to your project
cp claude-code-china/templates/CLAUDE.md your-project/CLAUDE.md
# Copy Settings
cp claude-code-china/templates/settings.json your-project/.claude/settings.json
```
---
## 🌐 Network Configuration (Must Read)
> In mainland China, connecting to the Anthropic API directly is unstable. Here are tested solutions:
### Solution 1: Proxy Configuration (Recommended)
```bash
# Add to ~/.zshrc or ~/.bashrc
export https_proxy=http://127.0.0.1:7890
export http_proxy=http://127.0.0.1:7890
# Verify connection
curl -I https://api.anthropic.com
```
### Solution 2: API Relay
```bash
# Use a reliable API relay service
export ANTHROPIC_BASE_URL="https://your-proxy.com/v1"
export ANTHROPIC_API_KEY="your-key"
```
### Solution 3: Router-Level Proxy
Suitable for teams, configure transparent proxy at the router level, and all devices will automatically use the proxy.
### Common Network Issues
| Issue | Solution |
|------|----------|
| `ECONNREFUSED` | Check if proxy is enabled |
| `ETIMEOUT` | Switch proxy nodes |
| `403 Forbidden` | API Key might be blocked, change to a new Key |
| WebSocket disconnection | Set `--keep-alive` parameter |
---
## 💰 Cost Optimization (Save 40-80%)
> Claude Code uses the Opus model by default, which may cost $200-$400 per month. Here are tested cost-saving methods:
### Cost Comparison
| Strategy | Estimated Monthly Cost | Savings |
|------|-----------|----------|
| Default (no optimization) | $200-400 | 0% |
| Using lean-code Skills | $80-160 | **40-60%** |
| lean-code + Caveman | $50-120 | **60-80%** |
| Switching to Sonnet model | $40-80 | **70-80%** |
### Method 1: Install lean-code (Recommended)
```bash
# Install 4 cost-saving Skills
git clone https://github.com/EA-Studio-SHARK/lean-code.git
cp lean-code/skills/*.md ~/.claude/skills/
# Or install directly in Claude Code
claude skill install EA-Studio-SHARK/lean-code
```
**lean-code includes 4 Skills:**
- 🎯 `precision-context.md` — Precise context, reducing unnecessary file reads
- 📏 `minimal-output.md` — Minimal output, reducing redundant replies
- 🔄 `incremental-edit.md` — Incremental editing, avoiding full file rewrites
- 📊 `cost-monitor.md` — Cost monitoring, displaying token consumption in real-time
### Method 2: Use Caveman
```bash
# Caveman compresses prompts using "caveman language"
git clone https://github.com/JuliusBrussee/caveman.git
cp caveman/CLAUDE.md your-project/CLAUDE_CAVEMAN.md
```
> 💡 **Best combination**: lean-code (reduces output tokens) + Caveman (reduces input tokens) = Save 60-80%
### Method 3: Model Switching
```bash
# Switch to Sonnet model in Claude Code (5x cheaper)
claude config set model claude-sonnet-4-20250514
# Use Opus for complex tasks and Sonnet for simple tasks
claude config set model claude-sonnet-4-20250514 --default
```
### Method 4: Token Usage Monitoring
Add to CLAUDE.md:
```markdown
## Token Management Rules
- Evaluate token consumption before each reply
- Prefer edit over rewriting files
- Read only necessary lines when reading files
- Limit search results to necessary scope
```
---
## 📋 CLAUDE.md Template
> CLAUDE.md is the core configuration file for Claude Code, placed in the project root directory.
### General Chinese Template
```markdown
# Project Description
## Technology Stack
- Frontend: React + TypeScript + TailwindCSS
- Backend: Node.js + Express
- Database: PostgreSQL
## Development Specifications
- Reply in Chinese (code comments in English)
- Commit message format: type(scope): description
- Variable/function names in English camelCase
- Run tests after each modification: npm test
## Code Style
- Use ESLint + Prettier
- Indentation: 2 spaces
- Strings: single quotes
- Component file names: PascalCase
## Token Saving Rules
- Avoid repeating known information
- Use edit instead of rewriting files
- Only modify necessary parts
- No need to explain each step
```
### Templates for Different Scenarios
| Template | Applicable Scenario | File |
|------|----------|------|
| [General Template](templates/CLAUDE.md) | Most projects | `templates/CLAUDE.md` |
| [Frontend Template](templates/CLAUDE-frontend.md) | React/Vue/Next.js | `templates/CLAUDE-frontend.md` |
| [Backend Template](templates/CLAUDE-backend.md) | Node.js/Python API | `templates/CLAUDE-backend.md` |
| [Fullstack Template](templates/CLAUDE-fullstack.md) | Full-stack projects | `templates/CLAUDE-fullstack.md` |
---
## 🔌 MCP Configuration for China
> MCP (Model Context Protocol) lets Claude Code connect to external tools. Here are usable configurations for China:
### Essential MCP
```json
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
},
"github": {
"command": "npx",
"args": ["@github/mcp-server"],
"env": {
"GITHUB_TOKEN": "ghp_xxx"
}
},
"sqlite": {
"command": "npx",
"args": ["@modelcontextprotocol/server-sqlite", "~/data/mydb.sqlite"]
}
}
}
```
### Domestic Platform MCP
```json
{
"mcpServers": {
"china-hot": {
"command": "npx",
"args": ["-y", "china-hot-mcp"],
"comment": "Weibo/Zhihu/Bilibili/Baidu/Douyin real-time hot search"
},
"amap": {
"command": "npx",
"args": ["-y", "@amap/mcp-server"],
"env": {
"AMAP_KEY": "your-key"
},
"comment": "Amap route planning/POI search"
},
"feishu": {
"command": "npx",
"args": ["-y", "@feishu/mcp-server"],
"env": {
"FEISHU_APP_ID": "your-id",
"FEISHU_APP_SECRET": "your-secret"
},
"comment": "Feishu messages/documents/calendar"
}
}
}
```
> 📖 See [awesome-mcp-zh](https://github.com/EA-Studio-SHARK/awesome-mcp-zh) for the complete MCP list.
---
## ⚙️ Curated Skills Recommendations
> Skills are extensions of Claude Code's capabilities, placed in the `.claude/skills/` directory.
### Essential Skills
| Skill | Function | Stars | Installation |
|-------|------|-------|------|
| [lean-code](https://github.com/EA-Studio-SHARK/lean-code) | Save 40-80% tokens |  | `claude skill install EA-Studio-SHARK/lean-code` |
| [Caveman](https://github.com/JuliusBrussee/caveman) | Save 65% tokens with caveman language |  | `claude skill install JuliusBrussee/caveman` |
| [ECC](https://github.com/affaan-m/ECC) | Comprehensive performance optimization |  | `claude skill install affaan-m/ECC` |
| [gstack](https://github.com/garrytan/gstack) | 23 professional role skills |  | `claude skill install garrytan/gstack` |
### Chinese Skills
| Skill | Function | Installation |
|-------|------|------|
| [ai-morning-brief](https://github.com/EA-Studio-SHARK/ai-morning-brief) | Daily AI news in Chinese and English | `claude skill install EA-Studio-SHARK/ai-morning-brief` |
| [claude-code-skills-zh](https://github.com/EA-Studio-SHARK/claude-code-skills-zh) | Curated Chinese Skills for Claude Code | `claude skill install EA-Studio-SHARK/claude-code-skills-zh` |
---
## 🛠️ Development Workflow
### Daily Development Process
```
1. Start project → claude (loads CLAUDE.md automatically)
2. Analyze requirements → "Help me analyze this requirement and list implementation steps"
3. Implement code → "Implement according to step 1"
4. Code review → "Review the changes, are there any issues?"
5. Test and verify → "Run tests and fix failed cases"
6. Submit code → "Submit code and generate commit message"
```
### Efficient Prompting Techniques
```bash
# ❌ Inefficient (wastes tokens)
"Help me write a user login feature, including registration, login, forgot password, email verification, mobile verification..."
# ✅ Efficient (saves tokens)
"Implement user login API: POST /api/login, receive email+password, return JWT"
```
### Claude Code Shortcuts
| Shortcut | Function |
|--------|------|
| `Ctrl+C` | Interrupt current task |
| `Ctrl+D` | Exit Claude Code |
| `/clear` | Clear context (save tokens) |
| `/model` | Switch model |
| `/cost` | View current cost |
| `@file` | Reference specific file |
---
## ❓ Frequently Asked Questions
<details>
<summary><b>Q: What is the difference between Claude Code and Cursor?</b></summary>
| Comparison | Claude Code | Cursor |
|------|------------|--------|
| Usage | Command-line interface | IDE graphical interface |
| Flexibility | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |
| Learning curve | Medium | Easy |
| Automation | Strong (can execute commands) | General |
| Monthly fee | $20 Pro / pay-as-you-go | $20/month |
| Suitable audience | Terminal users/full-stack | IDE users/frontend |
**Conclusion**: They are not conflicting, can be used together. Use Claude Code for complex tasks and Cursor for daily editing.
</details>
<details>
<summary><b>Q: Is Max subscription worth it?</b></summary>
- **$100/month Max 5x**: Suitable for medium usage, 2-3 hours daily
- **$200/month Max 20x**: Suitable for heavy usage, 6+ hours daily
- **Pay-as-you-go**: Suitable for occasional usage, can be combined with lean-code for cost savings
- **Recommendation**: Try $20 Pro for a week, see usage and decide
</details>
<details>
<summary><b>Q: What to do with frequent mainland China network disconnections?</b></summary>
1. Ensure stable proxy (use dedicated line recommended)
2. Set auto-reconnection: `claude config set auto-reconnect true`
3. Use API relay service
4. Consider router-level proxy
</details>
<details>
<summary><b>Q: Where to place CLAUDE.md?</b></summary>
- **Project-level**: `your-project/CLAUDE.md` (recommended)
- **User-level**: `~/.claude/CLAUDE.md` (effective for all projects)
- **Priority**: Project-level > User-level
</details>
---
## 📚 Further Reading
### Companion Projects
| Project | Description |
|------|------|
| [awesome-mcp-zh](https://github.com/EA-Studio-SHARK/awesome-mcp-zh) | MCP toolkit for Chinese developers |
| [lean-code](https://github.com/EA-Studio-SHARK/lean-code) | Token-saving tool for AI coding |
| [china-hot-mcp](https://github.com/EA-Studio-SHARK/china-hot-mcp) | China hot search MCP server |
| [ai-morning-brief](https://github.com/EA-Studio-SHARK/ai-morning-brief) | AI morning brief Skill |
### Official Resources
| Resource | Link |
|------|------|
| Claude Code Official Documentation | [docs.anthropic.com](https://docs.anthropic.com/en/docs/claude-code) |
| Claude Code GitHub | [github.com/anthropics/claude-code](https://github.com/anthropics/claude-code) |
| MCP Official Specification | [modelcontextprotocol.io](https://modelcontextprotocol.io) |
| Anthropic API Pricing | [anthropic.com/pricing](https://www.anthropic.com/pricing) |
### Community
| Platform | Link |
|------|------|
| Telegram | [@ExploreAllStudio](https://t.me/ExploreAllStudio) |
| Bilibili | [ExploreAll](https://space.bilibili.com/3493124970122041) |
| Zhihu | [ExploreAll](https://www.zhihu.com/people/exploreall) |
---
<a name="english"></a>
## 🌍 English
**Claude Code China Developer Guide** — A one-stop guide for Chinese developers using Claude Code, solving network issues, reducing costs by 40-80%, and configuring MCP for Chinese platforms.
Key features:
- 🌐 Network solutions for China mainland
- 💰 Cost optimization (lean-code + Caveman = save 60-80%)
- 🔌 MCP configs for Chinese platforms (WeChat, Feishu, DingTalk, Amap)
- 📋 Chinese CLAUDE.md templates
- ⚙️ Curated Skills recommendations
---
<div align="center">
**If you find this useful, please star the repo! Your support is the motivation for continuous updates.**
[](https://star-history.com/#EA-Studio-SHARK/claude-code-china&Date)
</div>
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.