Use Coding Plan with Claude Code
Install Claude Code
- Manual installation
- Install with Qwen Code
- macOS/Linux
- Windows
Connection settings
Configure these settings to connect Claude Code to Coding Plan:
-
ANTHROPIC_BASE_URL: Set tohttps://coding-intl.dashscope.aliyuncs.com/apps/anthropic. -
ANTHROPIC_AUTH_TOKEN: Set to your Coding Plan API key. -
ANTHROPIC_MODEL: Set to a supported model.
- macOS/Linux
- Windows
- Create and open the config file
~/.claude/settings.json.
~ refers to your home directory. If .claude doesn't exist, run mkdir -p ~/.claude first.- Replace YOUR_API_KEY with your Coding Plan API key:
- Edit or create
~/.claude.jsonand sethasCompletedOnboardingtotrue:
hasCompletedOnboarding must be a top-level field (not nested).Unable to connect to Anthropic services error at startup.Getting started
- Navigate to your project directory and start Claude Code:
- Grant Claude Code permission to execute files.
-
Run
/statusto verify model, Base URL, and API key configuration. - Start chatting.
Switch models
-
At startup:
claude --model <model_name>(such asclaude --model qwen3-coder-next) -
During a session:
/model <model_name>(such as/model qwen3-coder-next)
Common commands
| Command | Description | Example |
|---|---|---|
| /init | Generate CLAUDE.md in project root for project-level instructions and context. | /init |
| /status | View current configuration (model, API key, Base URL). | /status |
| /model <model_name> | Switch models. | /model qwen3-coder-next |
| /clear | Clear conversation history. | /clear |
| /plan | Enter planning mode to analyze solutions without modifying code. | /plan |
| /compact | Compress conversation history to free context space. | /compact |
| /config | Open configuration menu for language, theme, and other settings. | /config |
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
- Configure Coding Plan connection settings (Windows: install WSL or Git for Windows).
-
In VS Code marketplace, search for
Claude Code for VS Codeand install it. - Restart VS Code and click the upper-right icon to open Claude Code.
- Switch models: Type
/→ General config → set supported model in Selected Model → start new conversation.
Best practices
1. Manage context
- Clear regularly: Use
/clearto reset conversations and save tokens. - Compress proactively: Use
/compactto summarize key decisions and modified files, retaining core memory. - Specify files explicitly: Use
@to reference files (such aswrite 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 + Tabtwice to enter Plan Mode. - Prompt constraint: Explicitly require: "First output a detailed plan. Modify files only after I confirm."
- Quick action: Press
- 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:
- Run
/hooksfor interactive configuration. - Edit
.claude/settings.jsondirectly. - Ask Claude to write it (such as "Write a hook that runs eslint after every file edit").
- Run
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.