Install
openclaw skills install gitcode-issue-replyGenerate reply drafts for a single GitCode issue with similar-issue references; maintainer reviews before posting. Use when user asks to reply to or comment...
openclaw skills install gitcode-issue-reply对单个 GitCode Issue 生成回复草稿与相似 Issue 参考,供维护者审阅后发送。
owner/repo#number。仅提供链接但无回复意图时,不要使用本技能。
GITCODE_TOKEN 读取PRIVATE-TOKEN: {token}gitcode.com/.../issues/123)或 owner/repo#number。若为后者,拼接为完整 URL:https://gitcode.com/owner/repo/issues/number。python <SKILL_ROOT>/scripts/prepare_issue_reply.py --issue-url "<完整 Issue URL>"
status == "error",提示用户错误信息并结束。脚本将 JSON 输出保存到文件 <SKILL_ROOT>/output_{owner}_{repo}_{number}.json(例如 output_Ascend_RecSDK_1079.json),同时向 stderr 输出执行进度和提醒信息。使用 Read 工具读取该 JSON 文件并解析。
若 status == "already_replied":提示「该 Issue 已有其他人回复,已跳过」,流程结束。
若 JSON 中 label_needed == true:
python <SKILL_ROOT>/scripts/post_comment.py --issue-url "<Issue URL>" --body "/label add triage-review"
若失败可忽略,不影响后续流程。
JSON 中 prompt_draft_partial 为生成草稿的 prompt,similar_issues 为 BM25 检索到的相似 Issue 编号列表。
执行顺序(必须按以下步骤执行):
检查关键字段
处理图片内容(如 image_urls 非空,此步骤为强制)
生成草稿
详细步骤说明:
检查关键字段
status: 必须为 "ok",否则提示错误并结束image_urls: 检查是否非空,非空时必须在生成草稿前查看图片deepwiki_status: 若不为 "ok",告知用户知识库查询未成功security_warnings: 若非空,提示检测到敏感信息处理图片内容(如 image_urls 非空)
image_urls 中,本地路径在 image_local_paths 或 base64 在 image_base64_list)生成草稿
prompt_draft_partial 作为 prompt展示给维护者
similarity_details 字段获取详细信息(包含 number、score、title),按「#N - 标题(相似度: X.XX)」格式列出可点击链接(owner、repo 从 JSON 的 owner、repo 取),注明「仅供参考,不会加入回复内容」image_urls 非空):简要说明图片内容,确认已纳入回复考虑deepwiki_status 不为 "ok",告知用户知识库查询未成功,草稿可能缺少项目背景信息security_warnings 非空,提示用户检测到敏感信息(如密钥泄露)仅当用户在同一会话的后续消息中明确表达「发送」「回复」「发出去」「就按这个回复」等发送意图时,才可调用 post_comment.py 发送回复正文。未收到上述任一表述前,禁止发送回复评论。
若用户在第一轮展示草稿后的后续消息中说「取消」「不发了」「算了」等:提示「已取消本次 Issue 回复操作」,流程结束,不调用 post_comment 发送任何回复内容。
确定 Issue URL 与 body 后:
python <SKILL_ROOT>/scripts/post_comment.py --issue-url "<URL>" --body "<正文>"python <SKILL_ROOT>/scripts/post_comment.py --issue-url "<URL>" --body-file "<临时文件路径>"用户:回复这个 issue https://gitcode.com/owner/repo/issues/42
→ 解析 Issue URL → 执行 prepare_issue_reply.py
→ 读取 JSON → status=ok, label_needed=true, similar_issues=[38, 25]
→ 执行 post_comment.py 打 triage-review 标签
→ 生成 draft_reply → 会话状态 send_confirmed=false
→ 展示草稿 + 相似 Issue + 提醒语「审阅后请说「发送」或「回复」以发布评论,说「取消」则结束本次操作。」(第一轮结束)
用户:把第二段改温和一点
→ 修改 draft_reply → 更新会话中的草稿
→ 展示修改后的草稿 + 提醒语(仍为未确认发送状态)
用户:发送
→ 触发第二轮 → 视为 send_confirmed=true
→ 取修改后的 draft_reply 写入临时文件
→ 执行 post_comment.py --body-file "<临时文件>" 发送回复正文
→ 反馈发送成功结果
用户:回复这个 issue https://gitcode.com/owner/repo/issues/42
→ 生成草稿并展示 + 提醒语
用户:取消
→ 提示「已取消本次 Issue 回复操作」,流程结束,不发送回复评论
references/prompts/draft_reply.txt。v1.2.0 (2026-03-15)
v1.1.0 (2026-03-15)
v1.0.0 (2026-03-11)