Claude Code + IntelliJ IDEA in Practice: Installation, Configuration, and AI Coding Workflows for Real Projects

Claude Code is an AI coding partner built for real software engineering. Its core strengths are project-level context awareness, plan-driven changes, and rule-based collaboration. This article focuses on three key topics—Claude Code, IntelliJ IDEA integration, and Coding Plan configuration—to solve a common problem: AI tools can chat, but they often fail to fit into real engineering workflows.

The technical specification snapshot covers the essentials

Parameter Details
Tool Name Claude Code
Primary Language/Environment Shell, JSON, JetBrains IDEA
Protocol Compatibility Anthropic API-compatible protocol
Access Methods Official subscription, Anthropic account, third-party Coding Plan
Example Provider in This Article Alibaba Cloud Bailian
Core Dependencies Homebrew, Claude CLI, JetBrains Plugin
Typical Capabilities Context awareness, plan mode, Hooks, MCP, Skills
Common Use Cases Code generation, refactoring, dependency upgrades, test validation

Claude Code is designed for engineering collaboration rather than one-shot Q&A

The biggest difference between Claude Code and traditional chat-based AI is that it does not only answer isolated questions. Instead, it attempts to understand the entire project structure, constraints, and workflow. For developers, that means it fits real repositories much better than one-off code snippets.

Its value concentrates in three areas: understanding context, following project rules, and participating in a verifiable change process. This becomes especially valuable in refactoring, dependency upgrades, bulk edits, and test backfilling, where it often delivers more benefit than a general conversational model.

The core capabilities of Claude Code are best understood this way

  • Context awareness: It can reason about the project directory, file dependencies, and historical changes.
  • Engineering-oriented execution: It emphasizes planning, execution, and validation instead of immediately generating code.
  • Extensible behavior: You can inject team rules and external capabilities through Skills, Hooks, and MCP.
claude --version  # Check the Claude Code version
claude update     # Update to the latest version

These commands help you verify that the local CLI is available and that it has been upgraded to a version that supports the latest features.

A third-party Coding Plan makes Claude Code easier to adopt in enterprise environments

Claude officially supports Claude subscriptions and Anthropic accounts, and it also works with third-party services that implement an Anthropic-compatible protocol. For developers in China, a third-party Coding Plan often provides more practical access to stable APIs, unified billing, and model-switching capabilities.

Alibaba Cloud Bailian is the example platform used in this article. It provides an Anthropic-compatible API and can connect to multiple mainstream models. The key point of this setup is not to replace Claude Code, but to provide Claude Code with a compatible backend.

img AI Visual Insight: This image shows the console or integration page for a third-party Coding Plan. The key information typically includes the API endpoint, model name, and authentication method, demonstrating that Claude Code can connect to non-official model services through a compatible protocol.

Installation and initialization form the first minimal working loop

Mac users can install Claude Code directly with Homebrew. After installation, configure ~/.claude/settings.json and ~/.claude.json to establish a complete authentication and startup environment.

brew install --cask claude-code  # Install the Claude Code CLI
mkdir -p ~/.claude               # Ensure the configuration directory exists

These commands install Claude Code locally and prepare the configuration directory.

{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_BASE_URL": "https://coding.dashscope.aliyuncs.com/apps/anthropic",
    "ANTHROPIC_MODEL": "qwen3.6-plus",
    "ANTHROPIC_SMALL_FAST_MODEL": "qwen3.6-plus",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "qwen3.6-plus",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "qwen3.6-plus",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "qwen3.6-plus",
    "CLAUDE_CODE_SUBAGENT_MODEL": "qwen3.6-plus"
  }
}

This configuration routes Claude Code requests to a third-party model service that supports the Anthropic-compatible protocol.

{
  "hasCompletedOnboarding": true
}

This configuration skips the first-run onboarding check and avoids the Unable to connect to Anthropic services startup error.

The most common commands determine whether you truly enter an engineering workflow

After entering your project directory, run claude to start a session within the repository context. The first time you open a project, the CLI asks you to confirm that the directory is trusted. This acts as a safety boundary before file modifications are allowed.

cd path/to/your_project  # Go to the project root directory
claude                   # Start Claude Code
/status                  # Check the model, URL, and authentication status

These commands start Claude Code and verify that the current model and backend configuration are correct.

The most valuable commands are not for generating code, but for controlling workflow

/init generates CLAUDE.md, which stores project rules. /plan performs analysis without making changes. /compact compresses context. /clear removes previous task history. Together, these commands determine whether the AI remains stable and controllable.

Command Purpose Recommended Scenario
/init Initialize the project rules file New project onboarding
/status Check the runtime configuration Troubleshooting configuration issues
`/model
` Switch models Cost or performance tuning
/plan Plan before execution Complex refactoring tasks
/compact Compress context Reduce noise in long sessions
/clear Clear context Switch to a new task

IntelliJ IDEA integration brings Claude Code into the main development path

Claude Code supports plugins for the JetBrains IDE family. After you install the plugin in IDEA, AI collaboration is no longer limited to the terminal. Instead, it can work directly with the current file, editor context, and project navigation.

img AI Visual Insight: This image shows the Claude Code installation entry in the JetBrains Marketplace, highlighting how it embeds into the development environment as an IDE plugin and reduces the operational cost of switching back and forth to the terminal.

After installation, restart IDEA and click the plugin entry in the upper-right corner to begin using it. For team development, the value of this integration is that it unifies code editing, AI collaboration, and task confirmation in a single interface.

img AI Visual Insight: This image shows what it looks like to invoke Claude Code inside IDEA. It typically includes model switching, a chat entry point, and a project context area, showing that Claude Code has expanded from a standalone CLI into an embedded IDE collaboration assistant.

/model qwen3-coder-next  # Switch the coding model within the session

Use this command to adjust the model based on the task type, such as switching between complex code generation and fast question answering.

Planning before execution is the most important practical methodology

In a dependency upgrade scenario, directly asking AI to modify pom.xml is risky. A safer approach is to first ask it to scan dependencies, check the latest versions, and produce an upgrade proposal. Only after review should it make changes.

img AI Visual Insight: This image shows how a user assigns a task to Claude Code. The key detail is the explicit constraint in the prompt: plan first, confirm next, execute last. That creates an auditable workflow at the prompt level.

img AI Visual Insight: This image shows the execution plan generated by Claude Code. Typical steps include dependency scanning, version lookup, change recommendations, and waiting for confirmation, which reflects its engineering-oriented multi-stage execution model.

img AI Visual Insight: This image shows the result after the user confirms the plan and Claude Code applies the changes. It typically modifies pom.xml directly or outputs a diff, demonstrating a closed loop from analysis to applied edits.

Analyze the pom dependency versions in this project and help me upgrade them to the latest versions.
Important: output a detailed plan first, and wait for my confirmation before modifying any files.

This prompt constrains Claude Code to enter the planning phase first, reducing the risk of incorrect configuration changes.

Stable Claude Code usage requires supporting governance mechanisms

Context management is the first principle. In complex tasks, use /compact to preserve key decisions, /clear to remove stale context, and @filename in prompts to narrow the scan scope. This prevents the model from wasting attention on irrelevant files.

The second principle is knowledge persistence. By writing build commands, coding standards, and testing procedures into CLAUDE.md, every new session can automatically inherit team rules and reduce repeated explanation costs.

Advanced capabilities should serve controllable automation

MCP connects Claude Code to external services such as web search. Skills define the boundaries of tool capabilities. Hooks run deterministic scripts at critical points, such as automatically executing ESLint, tests, or static analysis after edits.

{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}

This configuration enables the experimental Agent Teams capability, which is useful for breaking large tasks into smaller units and coordinating sub-agents.

Finally, establish a self-validation loop. Require the AI to run tests after making changes, verify compilation results, and check API responses. For frontend tasks, ask for screenshot-based verification when necessary. Without validation, AI output is only a suggestion—not a deliverable.

FAQ provides structured answers to common adoption questions

1. What is the fundamental difference between Claude Code and a general AI chat tool?

Claude Code is designed for project-level collaboration. It emphasizes context understanding, planned execution, file modification, and a validation loop, while general chat tools are better suited to knowledge Q&A and isolated code generation.

2. Why is plan-first execution recommended?

Because complex tasks often involve multiple files, multiple dependencies, and implicit constraints. Planning first lets developers review the path, scope, and risks before authorizing changes, which significantly reduces the chance of mistakes.

3. What should a team do first when adopting Claude Code?

Start with three things: configure a stable compatible backend, write project rules in CLAUDE.md, and establish testing and Hooks-based validation workflows. Only then can AI move from merely usable to controllable and reusable.

Core summary: This article systematically reconstructs a practical Claude Code and IntelliJ IDEA integration workflow. It covers installation, third-party Coding Plan configuration, common commands, JetBrains plugin integration, a dependency upgrade case study, and engineering best practices—helping developers build an AI coding workflow that is plannable, verifiable, and extensible.