Claude code使用教程记录持续更新

1、.claude/CLAUDE.md 自动上下文恢复

  1. 读取 .claude/CLAUDE.md 文件内容
  2. 扫描项目结构
  3. 理解技术栈和配置文件
  4. 恢复基本的项目理解

2、.claude/CLAUDE.md 手动恢复上下文的方法

2.1 让 Claude 重新熟悉项目

claude "请帮我回顾一下这个项目的结构和当前状态"

2.2 询问具体的进度

claude "上次我们做到哪里了?还有什么待完成的任务?"

2.3 检查最近的更改

claude "帮我看看最近的 git commit,了解一下项目进展"

3、Serenaa安装

Serena项目地址:https://github.com/oraios/serena

Serena是让Claude Code更便宜、更强大的好方法!

从您的项目目录中,使用这样的命令添加serena

claude mcp add serena -- <serena-mcp-server> --context ide-assistant --project $(pwd)

其中<serena-mcp-server>是您运行Serena MCP服务器的方式。例如,在使用uvx时,你会运行

 

claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context ide-assistant --project $(pwd)

注意 在 macos终端启动claude code后输入【/mcp】提示错误时

 

1. serena            ✘ failed · Enter to view details                                                                                       │ │                                                                                                                                               │ │ ※ Tip: Run claude --debug to see logs inline, or view log files in                                                                            │ │   /Users/wenlei/Library/Caches/claude-cli-nodejs/-Users-wenlei-Desktop-DeskTop-claude-gdyd-themes                                             │ │                                                                                                                                               │ │ MCP Config locations (by scope):                                                                                                              │ │  • User config (available in all your projects):                                                                                              │ │    • /Users/wenlei/.claude.json                                                                                                               │ │  • Project config (shared via .mcp.json):                                                                                                     │ │    • /Users/wenlei/Desktop/DeskTop/claude/gdyd-themes/.mcp.json (file does not exist)                                                         │ │  • Local config (private to you in this project):                                                                                             │ │    • /Users/wenlei/.claude.json [project: /Users/wenlei/Desktop/DeskTop/claude/gdyd-themes]                                                   │ │                                                                                                                                               │ │ For help configuring MCP servers, see: https://docs.anthropic.com/en/docs/claude-code/mcp
解决Serena MCP服务器问题
1. 安装uvx
bash# 检查是否已安装uvx
which uvx

# 如果没有安装,使用pip安装
pip install uv

# 或者使用homebrew安装
brew install uv
2. 验证uvx安装
bash# 验证uvx是否可用
uvx --version

# 测试Serena安装
uvx --from git+https://github.com/oraios/serena serena --help
3. 如果还是有问题,手动安装Serena
bash# 方法1:直接用pip安装
pip install git+https://github.com/oraios/serena

# 方法2:clone然后安装
git clone https://github.com/oraios/serena.git
cd serena
pip install .

4克劳德代码使用监视Claude Code Usage Monitor

 

项目地址:https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor

安装和使用显示器的最快和最简单的方法:

皮皮

从PyPI安装

# Install directly from PyPI with uv (easiest)
uv tool install claude-monitor

# Run from anywhere
claude-monitor  # or cmonitor, ccmonitor for short

从源安装

# Clone and install from source
git clone https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor.git
cd Claude-Code-Usage-Monitor
uv tool install .

# Run from anywhere
claude-monitor

 

运行后的界面

Claude code使用教程记录持续更新

阅读剩余
THE END