Back to list
shiertier

get-issue-context

by shiertier

1🍴 0📅 Jan 16, 2026

SKILL.md


name: get-issue-context description: 获取 GitHub Issue 完整上下文。当需要分析、回复或处理 Issue 时使用。 allowed-tools: Bash(gh:), Bash(curl:), Bash(jq:*)

Get Issue Context

获取当前仓库指定 Issue 的完整上下文信息。

使用方法

当需要获取 Issue 上下文时,执行以下命令:

# 获取 Issue 基本信息
gh api repos/${GITHUB_REPOSITORY}/issues/${ISSUE_NUMBER}

# 获取 Issue 评论
gh api repos/${GITHUB_REPOSITORY}/issues/${ISSUE_NUMBER}/comments

其中 GITHUB_REPOSITORY 格式为 owner/repoISSUE_NUMBER 为 Issue 编号。

需要提取的信息

从 API 响应中提取以下关键信息:

Issue 元信息

  • title - 标题
  • user.login - 作者
  • state - 状态 (open/closed)
  • labels[].name - 标签列表
  • created_at - 创建时间
  • body - 正文内容

评论信息

对于每条评论:

  • user.login - 评论作者
  • created_at - 评论时间
  • body - 评论内容

输出格式

整理为易于理解的 Markdown 格式:

# Issue Context

- Repository: owner/repo
- Number: #123
- Author: @username
- State: open
- Labels: bug, enhancement

## Title

Issue 标题

## Body

Issue 正文内容

## Comments

### Comment 1

- Author: @commenter
- Created: 2024-01-01

评论内容...

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon