gitcode-issue-reply
Generate reply drafts for a single GitCode issue with similar-issue references; maintainer reviews before posting. Use when user asks to reply to or comment on an issue and provides a GitCode issue link; do not use when user only wants to fetch or query issue data. 针对单个 GitCode Issue 生成回复草稿(含相似 Issue 参考),维护者审阅后可发送评论;仅当用户要回复或评论且提供链接时使用,仅获取或查询 issue 信息时勿用。Python 3.7+ standard library only.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/autoxj/gitcode-issue-replyGitCode Issue 回复
对单个 GitCode Issue 生成回复草稿与相似 Issue 参考,供维护者审阅后发送。
何时使用(须同时满足)
- 用户表达**「回复 issue」**意图(如「回复这个 issue」「帮回复 issue #123」)。
- 用户提供了唯一的 GitCode Issue 链接或
owner/repo#number。
仅提供链接但无回复意图时,不要使用本技能。
认证
- Token 获取方式(按优先级):
- 用户直接提供:用户可在问题中直接提供 token
- 环境变量:从
GITCODE_TOKEN读取
- 请求头:使用
PRIVATE-TOKEN: {token} - 未配置时:提示用户到 GitCode 个人访问令牌 创建 Token
依赖
- Python 3.7+ 标准库(必需,无外部依赖)。
第一轮:生成草稿
1. 解析并调用脚本
- 从用户消息中解析 Issue:链接(
gitcode.com/.../issues/123)或owner/repo#number。若为后者,拼接为完整 URL:https://gitcode.com/owner/repo/issues/number。 - SKILL_ROOT:本 SKILL.md 所在目录。
- 执行(使用脚本绝对路径):
python <SKILL_ROOT>/scripts/prepare_issue_reply.py --issue-url "<完整 Issue URL>" - 脚本执行时间约 30秒–2分钟(DeepWiki 查询与 API 调用并行执行)。
- 若退出码非 0 或 JSON 中
status == "error",提示用户错误信息并结束。
2. 读取脚本输出
脚本将 JSON 输出保存到文件 <SKILL_ROOT>/output_{owner}_{repo}_{number}.json(例如 output_Ascend_RecSDK_1079.json),同时向 stderr 输出执行进度和提醒信息。使用 Read 工具读取该 JSON 文件并解析。
3. 若已有人回复
若 status == "already_replied":提示「该 Issue 已有其他人回复,已跳过」,流程结束。
4. 发送 Label(可选)
若 JSON 中 label_needed == true:
python <SKILL_ROOT>/scripts/post_comment.py --issue-url "<Issue URL>" --body "/label add triage-review"
若失败可忽略,不影响后续流程。
5. 生成回复草稿
JSON 中 prompt_draft_partial 为生成草稿的 prompt,similar_issues 为 BM25 检索到的相似 Issue 编号列表。
执行顺序(必须按以下步骤执行):
-
检查关键字段
- status: 必须为 "ok",否则提示错误并结束
- image_urls: 检查是否非空
- deepwiki_status: 记录状态
- security_warnings: 检查是否存在
-
处理图片内容(如 image_urls 非空,此步骤为强制)
- 使用 Read 工具查看每张图片(优先使用 image_local_paths)
- 记录图片关键信息(报错、配置、日志等)
- 将图片分析结果纳入回复生成
- ⚠️ 警告:此步骤不可跳过!图片信息对理解 Issue 至关重要!
-
生成草稿
详细步骤说明:
-
检查关键字段
status: 必须为"ok",否则提示错误并结束image_urls: 检查是否非空,非空时必须在生成草稿前查看图片deepwiki_status: 若不为"ok",告知用户知识库查询未成功security_warnings: 若非空,提示检测到敏感信息
-
处理图片内容(如
image_urls非空)- 必须使用多模态能力查看每张图片(URL 在
image_urls中,本地路径在image_local_paths或 base64 在image_base64_list) - 记录图片中的关键信息(如报错截图、配置界面、日志等)
- 图片信息对于理解 Issue 问题往往至关重要,不要忽略
- 将图片分析结果纳入回复草稿的生成过程
- 必须使用多模态能力查看每张图片(URL 在
-
生成草稿
- 将
prompt_draft_partial作为 prompt - 结合:Issue 内容 + DeepWiki 内容 + 图片分析结果(如有图片)
- 去除首尾空白及「回复:」前缀,即为 draft_reply
- 将
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-autoxj-gitcode-issue-reply": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
deepwiki-ask
通过 DeepWiki MCP 查询仓库信息。支持提问、获取结构、获取文档内容。Query a repository via DeepWiki MCP: ask questions, get structure, get documentation. 用户提供 owner/repo 时触发。
gitcode-release-notes
Generate release notes for GitCode repositories from commits (by tag range or since-date), grouped as feat/fix/docs/other, output Markdown for Release pages. 按 tag 区间或日期拉取提交并生成版本发布公告 Markdown。Python 3.7+ standard library only.
skill-everyday
每天抓取 Clawhub 热门技能,深入分析并生成报告。每次执行获取一个未分析过的热门技能,避免重复。
gitcode-pr-audit
Quality audit for merged GitCode PRs: sample by time range or repo list, check compliance (labels, comments, tests, size, etc.), output table. Use when user asks to 抽检/质量检查 已合入的 PR 规范性、多仓库 PR、或 将结果整理成表格. Multi-repo (owner/repo). Python 3.7+ stdlib only.
gitcode
Fetch and query data from GitCode platform via its REST API: repositories, branches, issues, pull requests, commits, tags, users, organizations, search, webhooks, members, releases and more. 查询 GitCode 上的仓库、分支、议题、PR、提交、标签、用户、组织等数据。Python 3.7+ standard library only.