
本文已收录在Github,关注我,紧跟本系列专栏文章,咱们下篇再续!
Claude Code 自带了一套功能完整的内置工具 (built-in tools),可处理常见开发任务,如读取文件、编写代码、执行命令和管理目录。
但 Claude Code 真正强大的地方在于:它能智能地把这些工具组合起来,解决复杂的多步骤任务。
Name | Purpose | 中文解释 |
|---|---|---|
Agent | Launch a subagent to handle a task | 启动一个子代理来处理任务 |
Bash | Run a shell command | 运行一个 Shell 命令 |
Edit | Edit a file | 编辑文件 |
Glob | Find files based upon a pattern | 根据模式查找文件 |
Grep | Search the contents of a file | 搜索文件内容 |
LS | List files and directories | 列出文件和目录 |
MultiEdit | Make several edits at the same time | 同时进行多次编辑 |
NotebookEdit | Write to a cell in a Jupyter notebook | 向 Jupyter Notebook 的单元格写入内容 |
NotebookRead | Read a cell | 读取 Jupyter Notebook 的单元格 |
Read | Read a file | 读取文件 |
TodoRead | Read one of the created to-do's | 读取已创建的待办事项之一 |
TodoWrite | Update the list of to-do's | 更新待办事项列表 |
WebFetch | Fetch from a URL | 从 URL 获取内容 |
WebSearch | Search the web | 搜索互联网 |
Write | Write to a file | 写入文件 |
下面来看几个实战案例:
目标:发现性能问题并优化 Chalk 库
运行 Chalk 库的基准测试。对于任何看起来缓慢的结果,找出根本原因并修复它。
→ Claude Code(执行步骤)
利用视频流媒体平台用户的数据发现洞察
对 streaming.csv 文件中的数据进行分析。
→ Claude Code(执行步骤)
任务
改进此应用的设计。重点关注聊天界面和头部。
Playwright MCP 服务器
允许 Claude 控制浏览器的一组工具
→ Claude Code(执行步骤)
任务:审查拉取请求中的更改
Github MCP 服务器:一组允许 Claude 与 Github 交互的工具
→ Claude Code(执行步骤)
工具使用的强度能带来独特(且出人意料)的益处
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。