跳到正文
Skillpedia
通用编程53k · #3383

code-mate-opencode

它能做什么

这个 AI 智能体可以帮你分析代码并完成编程任务。它可以用来检查项目、比较不同的编程工具,或者把工作交给另一个名为 OpenCode 的工具来完成。

适用场景

  • ✓当你想分析某个代码项目时。
  • ✓当你需要比较 OpenCode 与其他编程工具时。
  • ✓当你希望 AI 完成某项具体的编程任务时。

技能链接

https://github.com/CherryHQ/cherry-studio/blob/main/resources/code-cli-skills/code-mate-opencode/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/CherryHQ/cherry-studio/blob/main/resources/code-cli-skills/code-mate-opencode/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“分析一下这个项目,并告诉我主要的文件有哪些。”

每周 5 个新技能,1 分钟读完。

工作原理

它会在后台运行一个名为 OpenCode 的程序。OpenCode 分析你的代码,并返回所需的信息,你无需直接与它互动。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

OpenCode

Run

  1. Set the Bash working directory to the exact project the user named and set a finite timeout, normally 10 minutes.
  2. Check availability with command -v opencode. If it is missing, stop and ask the user to install OpenCode in Code Mate.
  3. Run one task and exit:
opencode run "<prompt>" --format json

Pass the prompt as one quoted argument. Parse stdout as a JSON event stream and treat an error event or nonzero exit as failure. Never start the interactive OpenCode UI or an authentication flow.

Authentication And Permissions

If OpenCode reports a missing provider or credentials, stop and ask the user to configure OpenCode in Code Mate. Never request, read, print, or copy credentials.

Headless mode denies permission prompts by default; keep that behavior for analysis. Only when the user explicitly requests workspace changes may the command enable the minimum tools needed. Do not add --auto merely to avoid a denied permission.

Example: ask OpenCode to inspect a failing test without editing, run the command above from that repository, and summarize the final content event and any tool errors.

常见问题

什么是 OpenCode?

OpenCode 是一个帮助分析和处理编程代码的工具。

我需要安装什么吗?

需要。你必须先安装 OpenCode,这个智能体才能工作。

AI 可以编辑我的代码吗?

一般不可以。它的设计是分析并汇报信息,除非你明确要求进行最少且必要的修改。

详情

作者的原始描述

Runs OpenCode non-interactively for repository analysis and coding tasks. Use when the user asks to delegate work to OpenCode or compare OpenCode with another coding agent.

repo: CherryHQ/cherry-studio

热度

GitHub 星标
53k
排名
#3383
许可证
AGPL-3.0
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能