Skip to main content
Use in AI Tools

Claude Code

Use Coding Plan with Claude Code

Install Claude Code

  • Manual installation
  • Install with Qwen Code
  • macOS/Linux
  • Windows
  1. Install Node.js v18.0+.
  2. Install Claude Code:
npm install -g @anthropic-ai/claude-code
  1. Verify installation:
claude --version

Connection settings

Configure these settings to connect Claude Code to Coding Plan:
  1. ANTHROPIC_BASE_URL: Set to https://coding-intl.dashscope.aliyuncs.com/apps/anthropic.
  2. ANTHROPIC_AUTH_TOKEN: Set to your Coding Plan API key.
  3. ANTHROPIC_MODEL: Set to a supported model.
  • macOS/Linux
  • Windows
  1. Create and open the config file ~/.claude/settings.json.
~ refers to your home directory. If .claude doesn't exist, run mkdir -p ~/.claude first.
nano ~/.claude/settings.json
  1. Replace YOUR_API_KEY with your Coding Plan API key:
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_BASE_URL": "https://coding-intl.dashscope.aliyuncs.com/apps/anthropic",
    "ANTHROPIC_MODEL": "qwen3.5-plus"
  }
}
Save the config file and open a new terminal window to apply settings.
  1. Edit or create ~/.claude.json and set hasCompletedOnboarding to true:
{
  "hasCompletedOnboarding": true
}
hasCompletedOnboarding must be a top-level field (not nested).
This prevents the Unable to connect to Anthropic services error at startup.

Getting started

  1. Navigate to your project directory and start Claude Code:
cd path/to/your_project
claude
  1. Grant Claude Code permission to execute files.
  2. Run /status to verify model, Base URL, and API key configuration.
  3. Start chatting.

Switch models

  1. At startup: claude --model <model_name> (such as claude --model qwen3-coder-next)
  2. During a session: /model <model_name> (such as /model qwen3-coder-next)

Common commands

CommandDescriptionExample
/initGenerate CLAUDE.md in project root for project-level instructions and context./init
/statusView current configuration (model, API key, Base URL)./status
/model <model_name>Switch models./model qwen3-coder-next
/clearClear conversation history./clear
/planEnter planning mode to analyze solutions without modifying code./plan
/compactCompress conversation history to free context space./compact
/configOpen configuration menu for language, theme, and other settings./config
For more commands, see the official Claude Code docs.

Extend capabilities

Claude Code supports MCP and skills (such as web search, image understanding). See Best practices.

Install and use IDE extension

Claude Code IDE extension supports VS Code, VS Code-based IDEs (Cursor, Trae), and JetBrains IDEs (IntelliJ IDEA, PyCharm).
  • VS Code
  • JetBrains
  1. Configure Coding Plan connection settings (Windows: install WSL or Git for Windows).
  2. In VS Code marketplace, search for Claude Code for VS Code and install it.
  3. Restart VS Code and click the upper-right icon to open Claude Code.
If the Anthropic login interface appears, complete connection settings first.
  1. Switch models: Type / → General config → set supported model in Selected Model → start new conversation.

Best practices

1. Manage context

  • Clear regularly: Use /clear to reset conversations and save tokens.
  • Compress proactively: Use /compact to summarize key decisions and modified files, retaining core memory.
  • Specify files explicitly: Use @ to reference files (such as write a test for @auth.py). This prevents inefficient full-project scans.
  • Use sub-agents: For large tasks, let Claude start sub-agents. Sub-agents return concise conclusions, preserving main conversation context.

2. Plan first, then execute

  • Enable Plan mode: Analyze solutions before modifying files for complex tasks.
    • Quick action: Press Shift + Tab twice to enter Plan Mode.
    • Prompt constraint: Explicitly require: "First output a detailed plan. Modify files only after I confirm."
  • Reduce trial-and-error: Ensure closed-loop logic before code changes.

3. Consolidate core project knowledge: Write CLAUDE.md

  • Include key information: CLAUDE.md loads automatically at session start. Add general rules (build commands, code specs, workflows).
  • Maintain dynamically: Keep content short and readable. Record only global conventions and add rules as needed.

4. Extend capabilities: MCP and skills

  • MCP: Install mature MCP Servers to connect external services (such as web search).
  • Skills: Write detailed skill descriptions. Claude decides whether to invoke based on purpose definitions (such as visual understanding).
  • Skills vs MCP: Skills teach workflow knowledge; MCP provides external interfaces. They're complementary and can integrate.

5. Automated guardrails: Hooks

  • Use hooks: Hooks automatically run local scripts at Claude workflow lifecycle nodes (such as PreToolUse for pre-execution validation), ensuring key validations run consistently.
  • Configuration methods:
    1. Run /hooks for interactive configuration.
    2. Edit .claude/settings.json directly.
    3. Ask Claude to write it (such as "Write a hook that runs eslint after every file edit").

6. Establish a self-check loop

  • Enforce validation: Run relevant tests (pytest, npm test) after code modifications.
  • Define success criteria: After modifications, ensure compilation passes and API returns 200 (verify with curl).
  • Visual feedback: For frontend changes, take browser screenshots to verify UI.