code-mate-pi
它能做什么
这个智能体会运行一个名为 Pi 的工具,来分析或实现你代码中的特定任务。它会自动完成这些工作,不需要你持续互动。
适用场景
- ✓当你希望 AI 分析某段代码,找出其中的问题时。
- ✓当你需要 AI 在项目中实现某个特定功能时。
- ✓当你想把一个重复性的代码分析任务自动化时。
技能链接
https://github.com/CherryHQ/cherry-studio/blob/main/resources/code-cli-skills/code-mate-pi/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“分析这个文件,告诉我有没有语法错误。”
每周 5 个新技能,1 分钟读完。
工作原理
它会在后台运行 Pi 程序,并进行设置,让 Pi 分析你的代码,然后以计算机可读的格式(JSON)返回结果。开始之前,它会先检查 Pi 是否已安装,以及访问权限设置是否正确。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Pi
Run
- Set the Bash working directory to the exact project the user named and set a finite timeout, normally 10 minutes.
- Check availability with
command -v pi. If it is missing, stop and ask the user to install Pi in Code Mate. - Run one sessionless task:
pi --mode json --no-session "<prompt>"
Pass the prompt as one quoted argument. Parse stdout as JSONL and inspect error events; Pi can report model or tool failure in the event stream, so process exit alone is insufficient. Never start interactive Pi or /login.
Authentication And Permissions
If Pi reports missing login, model, provider, or API configuration, stop and ask the user to configure Pi in Code Mate. Never request, read, print, or copy credentials.
Pi has no tool-approval prompt and normally exposes read, write, edit, and Bash tools. For analysis, append --tools read,grep,find,ls. Include write, edit, or Bash only when the user explicitly requested workspace changes, and keep the tool list and working directory as narrow as possible.
Example: run a read-only diagnosis with --tools read,grep,find,ls, then use the final JSONL message only if no error event occurred.
常见问题
Pi 是什么?
Pi 是一个能够自动分析代码并处理代码的程序。
“非交互式”是什么意思?
意思是智能体会自己完成工作,不会在每个步骤都向你请求许可或确认。
如果没有安装 Pi 会怎样?
智能体会提示你,需要先安装 Pi 才能正常工作。
详情
作者的原始描述
Runs Pi non-interactively and parses its JSON event stream for repository tasks. Use when the user asks to delegate a bounded analysis or implementation task to Pi.
repo: CherryHQ/cherry-studio
热度
- GitHub 星标
- 53k
- 排名
- #3384
- 许可证
- AGPL-3.0
- 更新时间
- 2026/10/15
评论
- …