Claude Code is Anthropic’s official agentic command-line tool for software development. Unlike traditional code completion tools, Claude Code operates as an autonomous agent that can:
It runs directly in your terminal (or IDE) and has full access to your local development environment.
| Capability | Description |
|---|---|
| Agentic Coding | Understands context, reasons about code, and takes multi-step actions |
| Multi-file Editing | Edits files across the codebase with cross-file reasoning |
| Plan Mode | Explores the codebase and presents a plan before making changes |
| Git Integration | Creates commits, branches, pull requests via git and
gh CLI |
| MCP Servers | Extensible via Model Context Protocol for tools, databases, and APIs |
| Hooks | Custom shell commands triggered on events (pre/post tool calls) |
| IDE Integration | Works in VS Code and JetBrains via official extensions |
| Memory System | Persists context across conversations via file-based memory |
| Feature | Claude Code | GitHub Copilot | Cursor |
|---|---|---|---|
| Agentic (multi-step) | Yes | Limited | Partial |
| Full codebase context | Yes | No | Yes |
| Runs shell commands | Yes | No | Limited |
| Open-source core | Yes | No | No |
| Custom model support | Yes | No | Partial |
gh, optional, for PR/issue
integration)Verify Node.js is installed:
If Node.js is not installed, download it from https://nodejs.org or use a package manager:
Install globally via npm:
Verify installation:
Navigate to your project directory and launch:
This opens an interactive REPL (Read-Eval-Print Loop) where you can chat with Claude Code in natural language.
When you first launch Claude Code:
CLAUDE.md
configuration filesExample prompts to try:
> What does this project do?
> Find all TODO comments in the codebase
> Help me fix the bug in src/main.py
> Refactor the database connection module
> Write unit tests for the authentication service
Claude Code provides built-in slash commands for common tasks:
| Command | Description |
|---|---|
/help |
Display help and available commands |
/config |
Open settings configuration |
/clear |
Clear conversation history |
/compact |
Compact the conversation to free context window |
/plan |
Enter plan mode (explore before editing) |
/review-pr <url> |
Review a GitHub pull request |
/commit |
Create a git commit with AI-generated message |
/fast |
Toggle fast mode (same model, faster output) |
/loop |
Set up a recurring task |
/tasks |
List background tasks |
Claude Code operates under user-controlled permission settings:
You can configure permissions in .claude/settings.json
or via the /config command.
CLAUDE.md is a special markdown file that provides
project-specific context and instructions to Claude Code. It acts as a
persistent “system prompt” for your project.
| Location | Scope | Purpose |
|---|---|---|
./CLAUDE.md |
Current project | Project-specific instructions |
./src/CLAUDE.md |
Subdirectory | Component-specific instructions |
~/.claude/CLAUDE.md |
Global | Personal preferences across all projects |
# Project: Volatility-Managed Portfolio Analysis
## Tech Stack
- R 4.x with tidyverse
- LaTeX for paper preparation
## Conventions
- Use snake_case for R variable names
- All figures should use the ggplot2 theme_minimal()
- Data files are in CSV format under the Data/ directory
## Testing
- Run scripts with `Rscript` before committingClaude Code settings can be configured at multiple levels:
File: ~/.claude/settings.json
Key environment variables for Claude Code:
| Variable | Description | Example |
|---|---|---|
ANTHROPIC_API_KEY |
Anthropic API key | sk-ant-xxxxx |
ANTHROPIC_BASE_URL |
Override API endpoint | https://api.anthropic.com |
ANTHROPIC_MODEL |
Default model | claude-sonnet-4-6 |
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC |
Disable telemetry | 1 |
Hooks allow you to run shell commands before or after Claude Code events:
Model Context Protocol (MCP) servers extend Claude Code with external
tools and data sources. Configure in
.claude/settings.json:
Plan Mode allows Claude Code to explore the codebase and design an approach before making any changes. This is useful for:
Activate with /plan or when Claude Code detects a
complex task.
Claude Code follows an agentic loop:
Claude Code can handle the full Git workflow:
Install the Claude Code extension from the VS Code marketplace. Features:
Install the Claude Code plugin from the JetBrains marketplace for similar functionality.
GLM 5.1 is the latest large language model from Zhipu AI (智谱AI). It offers strong coding capabilities and is available through the Zhipu AI platform at https://open.bigmodel.cn.
Claude Code supports using GLM 5.1 through Zhipu AI’s Anthropic-compatible API endpoint, which allows Claude Code to communicate with GLM models using the same protocol it uses with Anthropic’s models.
Log in to the Zhipu AI open platform and navigate to the API key management page. Create a new API key and copy it.
Edit ~/.claude/settings.json (create it if it does not
exist):
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your_zhipu_api_key_here",
"ANTHROPIC_BASE_URL": "https://open.bigmodel.cn/api/anthropic",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.1"
}
}The key configuration variables are:
| Variable | Value | Purpose |
|---|---|---|
ANTHROPIC_AUTH_TOKEN |
Your Zhipu API key | Authentication |
ANTHROPIC_BASE_URL |
https://open.bigmodel.cn/api/anthropic |
Redirect API calls to Zhipu |
ANTHROPIC_DEFAULT_OPUS_MODEL |
glm-5.1 |
Specify the GLM model |
After updating the configuration, restart Claude Code for the changes to take effect:
Launch Claude Code and check that the model indicator shows GLM 5.1. You can verify by asking:
> What model are you?
The response should indicate that it is running on GLM 5.1.
┌──────────────┐ Anthropic-compatible API ┌──────────────────┐
│ │ ─────────────────────────────────> │ │
│ Claude Code │ │ Zhipu AI Cloud │
│ (CLI Tool) │ <───────────────────────────────── │ (GLM 5.1) │
│ │ Response with GLM output │ │
└──────────────┘ └──────────────────┘
Claude Code sends requests to the Anthropic-compatible endpoint at Zhipu AI, which processes them using GLM 5.1 and returns results in the same format that Claude Code expects.
You can also configure other GLM model variants by changing the model name:
| Model Name | Description |
|---|---|
glm-5.1 |
Latest GLM model (recommended) |
glm-5-turbo |
Faster, more cost-effective |
glm-5 |
Base GLM 5 model |
glm-4v |
Vision-capable model |
Instead of settings.json, you can set environment
variables directly:
# Add to ~/.zshrc or ~/.bashrc
export ANTHROPIC_AUTH_TOKEN="your_zhipu_api_key_here"
export ANTHROPIC_BASE_URL="https://open.bigmodel.cn/api/anthropic"
export ANTHROPIC_DEFAULT_OPUS_MODEL="glm-5.1"Then reload your shell:
| Issue | Possible Cause | Solution |
|---|---|---|
| “Model not recognized” | Wrong model name | Use exactly glm-5.1 |
| Authentication error | Invalid API key | Verify key in Zhipu AI console |
| Connection timeout | Network/firewall issue | Check connectivity to open.bigmodel.cn |
| Slow responses | Model load or plan tier | Consider upgrading Coding Plan |
| “Permission denied” | File access issue | Check settings.json permissions |
| Commands not found | Node.js not installed | Install Node.js 18+ and reinstall |
/help inside Claude
CodeAnthropic. “Claude Code Documentation.” https://docs.anthropic.com/en/docs/claude-code
Anthropic. “Claude Code GitHub Repository.” https://github.com/anthropics/claude-code
Zhipu AI. “GLM Open Platform Documentation.” https://docs.bigmodel.cn
Zhipu AI. “GLM Coding Plan Guide.” https://docs.bigmodel.cn/cn/coding-plan/using5-1
Anthropic. “Model Context Protocol.” https://modelcontextprotocol.io