将 Claude Desktop 作为免费编码 agent 使用,无需 Cursor 或 Claude Code
何时使用: 你已经有 Claude Desktop,希望它真正编辑你的仓库,而不仅仅是粘贴代码片段。
前置条件
- 已安装 Claude Desktop — 从 claude.ai/download 下载
- 工作目录已加白名单 — 首次运行时会提示选择 Claude 可操作的目录
步骤
-
安装并锁定工作区Install desktop-commander. Limit it to ~/Code/myproject — nothing outside.✓ 已复制→ 配置中 allowed_directories 已限制;Claude 中出现工具列表
-
驱动一次真实变更Open ~/Code/myproject. Find every TODO comment, group by file, propose fixes for the top 5.✓ 已复制→ ripgrep 级速度的扫描,带行号的优先级列表
-
通过 edit_block 应用更改Apply the proposed fixes using edit_block. Don't rewrite whole files — just the necessary diffs.✓ 已复制→ 每次编辑显示 old_string/new_string 块;之后 git diff 干净
结果: Claude Desktop 现在能像付费 IDE 助手一样,向你的仓库写入真实代码更改。
注意事项
- 忘记设置 allowed_directories——Claude 会扫描你的主目录 — 编辑 ~/.claude-server-commander/config.json 并重启 Claude Desktop