Claude Code

env

1
2
export ANTHROPIC_BASE_URL="xxx"
export ANTHROPIC_AUTH_TOKEN="xxx"

config

model

1
2
3
4
5
Here is the complete precedence order from highest to lowest priority:
1. Command-line flag (e.g.,  claude --model <model-name> )
2. Environment variable ( ANTHROPIC_MODEL  or  CLAUDE_MODEL  defined in your terminal,  ~/.bashrc , or  ~/.zshrc )
3. Project-level settings (a local  .claude/settings.json  inside your current working directory)
4. User-level global settings ( ~/.claude/settings.json )

command

claude.md

1
/init

session

1
2
3
4
5
6
7
8
# Rename current session
/rename [name]

# Resume session, --resume, -r
claude -r [session]

# Resume by ID/name
/resume [session]

model

1
2
3
4
5
6
7
8
9
10
11
12
# Launch with a specific model:
claude --model sonnet
claude --model opus
claude --model haiku
claude --model openai/gpt-5.6-sol
claude --model openai/gpt-5.6-luna

# Type /model inside session. It shows the available models and lets you switch:
/model sonnet # Sonnet 5 (default daily driver)
/model haiku # Haiku 4.5 (fast, cheap)
/model opus # Opus 4.8 (deepest reasoning)
/model fable # Fable 5 (newest)

slug

1
2
3
4
5
6
7
8
9
10
11
12
<original-model-slug>:amazon-bedrock
<original-model-slug>:google-vertex

# e.g.
claude-sonnet-4-5:amazon-bedrock
claude-sonnet-4-5:google-vertex
# opus
claude-opus-5:google-vertex
claude-opus-5:google-vertex

claude --model 'claude-sonnet-5:amazon-bedrock'
claude --model 'claude-sonnet-5:google-vertex'

cost

model output price 1M tokens output 1M tokens
deepseek/deepseek-v4-flash $0.14 $0.28
z-ai/glm-5.3 $1.4 $4.4
qwen/qwen3.8-max $1.4 $4.2
x-ai/grok-4.6 $2 $6
moonshotai/kimi-k3 $2.7 $13.5
openai/gpt-5.6-luna $0.2 $1.2
openai/gpt-5.6-terra $2 $12
anthropic/claude-sonnet-5:amazon-bedrock $2 $10
anthropic/claude-opus-5:google-vertex $5 $25
anthropic/claude-fable-5:google-vertex $10 $50

plugin

upgrade

1
2
3
4
5
6
7
8
# 1. Refresh the marketplace catalog so Claude Code sees the latest ECC version
/plugin marketplace update ecc

# 2. Update the plugin itself
/plugin update ecc@ecc

# 3. Verify what's now installed
/plugin list ecc@ecc

disable

  • method1: use command

    1
    2
    # disable specify plugin
    /plugin disable gateguard@ecc
  • method2: Persistent config in ~/.claude/settings.json

    1
    2
    3
    4
    5
    {
    "enabledPlugins": {
    "gateguard@ecc": false
    }
    }

uninstall

1
/plugin uninstall ecc@ecc

Mode

Shift+Tab

Mode What runs without asking Best for
default Reads only Getting started, sensitive work
acceptEdits Reads, file edits, and common filesystem commands (mkdir, touch, mv, cp, etc.) Iterating on code you’re reviewing
plan Reads, plus classifier-approved commands when auto mode is available Exploring a codebase before changing it
auto Everything, with background safety checks Long tasks, reducing prompt fatigue
dontAsk Only pre-approved tools Locked-down CI and scripts
bypassPermissions Everything Isolated containers and VMs only

dontAsk

1
2
3
4
5
6
7
8
9
# method1: config ~/.claude/settings.json
{
"permissions": {
"defaultMode": "dontAsk"
}
}

# method2:
claude --permission-mode dontAsk

bypassPermissions

1
2
3
4
5
6
7
8
9
10
11
# method1: config ~/.claude/settings.json
{
"permissions": {
"defaultMode": "bypassPermissions"
}
}

# method2:
claude --permission-mode bypassPermissions
or
claude --dangerously-skip-permissions

subagents

TBD

best practices

recap

1
2
# disable recaps
/config

continue

1
2
# prompt words
continue  or  please continue with the remaining tasks

skill

superpowers

An agentic skills framework & software development methodology that works.

everything-claude-code

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

1
2
3
4
5
6
7
8
9
10
11
12
# Add marketplace
/plugin marketplace add https://github.com/affaan-m/ECC

# Install plugin
/plugin install ecc@ecc

# disable GateGuard
ECC_GATEGUARD=off claude xxx

# disable plugin
/plugin disable gateguard@ecc
/plugin disable ecc@ecc

ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill)

An AI SKILL that provide design intelligence for building professional UI/UX multiple platforms

best practices

vscode login claude code

If you have ANTHROPIC_API_KEY set in your shell but still see the sign-in prompt, VS Code may not have inherited your shell environment. Launch VS Code from a terminal with code . so it inherits your environment variables, or sign in with your Claude account instead.

troubleshooting

API Error: 400 工具名称过长,请检查: mcp__plugin_everything-claude-code_github__create_pull_request_review