ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/autoxj/gitcode-issue-reply
Or

GitCode Issue 回复

单个 GitCode Issue 生成回复草稿与相似 Issue 参考,供维护者审阅后发送。

何时使用(须同时满足)

  1. 用户表达**「回复 issue」**意图(如「回复这个 issue」「帮回复 issue #123」)。
  2. 用户提供了唯一的 GitCode Issue 链接或 owner/repo#number

仅提供链接但无回复意图时,不要使用本技能。

认证

  • Token 获取方式(按优先级):
    1. 用户直接提供:用户可在问题中直接提供 token
    2. 环境变量:从 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 编号列表。

执行顺序(必须按以下步骤执行):

  1. 检查关键字段

    • status: 必须为 "ok",否则提示错误并结束
    • image_urls: 检查是否非空
    • deepwiki_status: 记录状态
    • security_warnings: 检查是否存在
  2. 处理图片内容(如 image_urls 非空,此步骤为强制)

    • 使用 Read 工具查看每张图片(优先使用 image_local_paths)
    • 记录图片关键信息(报错、配置、日志等)
    • 将图片分析结果纳入回复生成
    • ⚠️ 警告:此步骤不可跳过!图片信息对理解 Issue 至关重要!
  3. 生成草稿

详细步骤说明:

  1. 检查关键字段

    • status: 必须为 "ok",否则提示错误并结束
    • image_urls: 检查是否非空,非空时必须在生成草稿前查看图片
    • deepwiki_status: 若不为 "ok",告知用户知识库查询未成功
    • security_warnings: 若非空,提示检测到敏感信息
  2. 处理图片内容(如 image_urls 非空)

    • 必须使用多模态能力查看每张图片(URL 在 image_urls 中,本地路径在 image_local_paths 或 base64 在 image_base64_list
    • 记录图片中的关键信息(如报错截图、配置界面、日志等)
    • 图片信息对于理解 Issue 问题往往至关重要,不要忽略
    • 将图片分析结果纳入回复草稿的生成过程
  3. 生成草稿

    • prompt_draft_partial 作为 prompt
    • 结合:Issue 内容 + DeepWiki 内容 + 图片分析结果(如有图片)
    • 去除首尾空白及「回复:」前缀,即为 draft_reply

Metadata

Author@autoxj
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-autoxj-gitcode-issue-reply": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.