ln-911-github-triager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePaths: File paths (,shared/,references/) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.../ln-*
路径说明: 文件路径(、shared/、references/)是相对于技能仓库根目录的。如果在当前工作目录(CWD)中未找到,请定位到本SKILL.md所在目录,然后向上一级目录即为仓库根目录。../ln-*
ln-911-github-triager
ln-911-github-triager
Type: L3 Worker (standalone)
Category: 9XX Community Engagement
Caller: ln-910-community-engagement (or standalone)
Scans all open issues, PRs, and discussions in the current repository. Categorizes by urgency. Produces an actionable triage report.
类型: L3 Worker(独立运行)
分类: 9XX 社区参与
调用方: ln-910-community-engagement(或独立运行)
扫描当前仓库中所有公开的Issue、PR和讨论,按紧急程度分类,生成可执行的分类报告。
Arguments
参数
$ARGUMENTS| Token | Effect | Default |
|---|---|---|
| Scan issues only | All three |
| Scan PRs only | All three |
| Scan discussions only | All three |
Number (e.g., | Staleness threshold in days | 7 |
| Combine: scope + threshold | -- |
| Compact output for coordinator: skip Phase 4 preview, return red flags + priority counts + metrics only | Full interactive report |
Parse : extract scope tokens (, , ), numeric threshold, and flag. If no scope tokens, scan all three. If no number, default to 7 days.
$ARGUMENTSissuesprsdiscussionssummary$ARGUMENTS| 令牌 | 作用 | 默认值 |
|---|---|---|
| 仅扫描Issue | 同时扫描三类 |
| 仅扫描PR | 同时扫描三类 |
| 仅扫描讨论 | 同时扫描三类 |
数字(例如 | Stale阈值(天数) | 7 |
| 组合使用:范围 + 阈值 | -- |
| 为协调者生成精简输出:跳过第4阶段预览,仅返回红色预警、优先级统计和指标 | 完整交互式报告 |
解析:提取范围令牌(、、)、数字阈值和标志。如果没有指定范围令牌,则扫描全部三类内容;如果没有指定数字,则默认阈值为7天。
$ARGUMENTSissuesprsdiscussionssummaryPhase 0: GitHub Discovery
阶段0:GitHub发现
MANDATORY READ: Load
../ln-910-community-engagement/references/github_discovery.mdExecute the discovery protocol. Extract:
- for
{owner}/{repo}flag and URLs--repo - login (authenticated user) for maintainer detection
maintainer - Verify is authenticated
gh
Load strategy: check in target project, fallback to . Extract Section 5 (Engagement Metrics) for targets and red flags.
docs/community_engagement_strategy.md../ln-910-community-engagement/references/community_strategy_template.md必读: 加载
../ln-910-community-engagement/references/github_discovery.md执行发现协议,提取:
- 用于
{owner}/{repo}参数和URL--repo - 登录账号(已认证用户),用于识别维护者
maintainer - 验证工具已完成认证
gh
加载策略:检查目标项目中的,如果不存在则回退到。提取第5部分(参与度指标)中的目标值和红色预警条件。
docs/community_engagement_strategy.md../ln-910-community-engagement/references/community_strategy_template.mdPhase 1: Fetch Data
阶段1:获取数据
Run these commands based on scope. Execute all applicable fetches in parallel.
gh根据扫描范围运行以下命令,所有适用的获取操作并行执行。
gh1a. Issues
1a. Issues
bash
gh issue list --repo {owner}/{repo} --state open --limit 100 --json number,title,labels,createdAt,updatedAt,author,comments,assigneesbash
gh issue list --repo {owner}/{repo} --state open --limit 100 --json number,title,labels,createdAt,updatedAt,author,comments,assignees1b. Pull Requests
1b. Pull Requests
bash
gh pr list --repo {owner}/{repo} --state open --limit 100 --json number,title,labels,createdAt,updatedAt,author,reviewDecision,reviewRequests,isDraft,comments,assigneesbash
gh pr list --repo {owner}/{repo} --state open --limit 100 --json number,title,labels,createdAt,updatedAt,author,reviewDecision,reviewRequests,isDraft,comments,assignees1c. Discussions (GraphQL)
1c. Discussions (GraphQL)
bash
gh api graphql -f query='
query($owner: String!, $name: String!) {
repository(owner: $owner, name: $name) {
discussions(first: 100, states: OPEN) {
nodes {
number
title
category { name }
createdAt
updatedAt
author { login }
answerChosenAt
labels(first: 5) { nodes { name } }
comments(first: 20) {
totalCount
nodes {
author { login }
createdAt
}
}
}
}
}
}
' -f owner="{owner}" -f name="{repo}"Gate: If all sources return zero items, report "No open items. Triage complete." and stop.
bash
gh api graphql -f query='
query($owner: String!, $name: String!) {
repository(owner: $owner, name: $name) {
discussions(first: 100, states: OPEN) {
nodes {
number
title
category { name }
createdAt
updatedAt
author { login }
answerChosenAt
labels(first: 5) { nodes { name } }
comments(first: 20) {
totalCount
nodes {
author { login }
createdAt
}
}
}
}
}
}
' -f owner="{owner}" -f name="{repo}"判断: 如果所有数据源都返回0条内容,则报告“无公开内容,分类完成”并终止流程。
Phase 2: Classify Each Item
阶段2:分类每个内容项
For every fetched item, evaluate these conditions. An item can match multiple -- use highest priority.
对每个获取到的内容项,评估以下条件。一个内容项可能匹配多个条件,使用最高优先级的分类。
Priority Matrix
优先级矩阵
| Priority | Condition | Applies to |
|---|---|---|
| P0 Critical | Label contains | Issues |
| P0 Critical | Label contains | Issues, PRs |
| P1 Urgent | Author != maintainer AND zero comments from maintainer | Issues, Discussions |
| P1 Urgent | Q&A discussion with | Discussions |
| P1 Urgent | | PRs |
| P2 Stale | No activity for > threshold days ( | All |
| P3 Monitor | PR marked as draft ( | PRs |
| P3 Monitor | Author == maintainer AND 0 community replies | Discussions |
| P4 Info | Items not matching any above condition | All |
| 优先级 | 条件 | 适用对象 |
|---|---|---|
| P0 紧急 | 标签包含 | Issues |
| P0 紧急 | 标签包含 | Issues、PRs |
| P1 高优先级 | 作者不是维护者,且维护者未留下任何评论 | Issues、Discussions |
| P1 高优先级 | Q&A类讨论未标记已解答( | Discussions |
| P1 高优先级 | | PRs |
| P2 已停滞 | 超过阈值天数无任何活动( | 所有 |
| P3 监控中 | PR标记为草稿( | PRs |
| P3 监控中 | 作者是维护者,且无社区回复 | Discussions |
| P4 信息类 | 不匹配上述任何条件的内容项 | 所有 |
Maintainer Detection
维护者识别
The maintainer login comes from Phase 0 discovery (). An item "has maintainer reply" if any comment's equals the maintainer login.
viewer.loginauthor.loginFor issues: check array authors. For discussions: check .
commentscomments.nodes[].author.login维护者登录账号来自阶段0的发现流程()。如果任何评论的等于维护者登录账号,则认为该内容项“有维护者回复”。
viewer.loginauthor.login对于Issues:检查数组中的作者;对于Discussions:检查。
commentscomments.nodes[].author.loginStaleness Calculation
停滞状态计算
Days since last activity: in days. Compare against threshold (default 7, or from ).
(today - updatedAt)$ARGUMENTS最后一次活动至今的天数:的天数。与阈值(默认7天,或来自)进行比较。
(今天 - updatedAt)$ARGUMENTSLabel Urgency Signals
标签紧急信号
Labels that elevate priority: , , , .
bugbreakingsecurityurgentLabels that signal engagement opportunity (not urgency): , .
help wantedgood first issue提升优先级的标签:、、、。
bugbreakingsecurityurgent表示参与机会的标签(非紧急):、。
help wantedgood first issuePhase 3: Engagement Metrics
阶段3:参与度指标
Calculate aggregate metrics per strategy Section 5:
| Metric | Calculation | Target | Red Flag |
|---|---|---|---|
| Time to First Response | Avg(first maintainer comment - item created) for items WITH reply | <24h | >72h |
| Unanswered discussions | Count where author != maintainer AND no maintainer comment AND age > threshold | 0 | Any >7 days |
| Community-to-maintainer ratio | Non-maintainer comments / maintainer comments across all items | >0.3 | 0 |
| New discussions this month | Discussions created in last 30 days | >2 | 0 |
| Zero-engagement items | Items with 0 comments total | -- | -- |
根据策略第5部分计算汇总指标:
| 指标 | 计算方式 | 目标值 | 红色预警 |
|---|---|---|---|
| 首次响应时间 | 所有有回复的内容项中,(首次维护者评论时间 - 内容项创建时间)的平均值 | <24小时 | >72小时 |
| 未回复的讨论 | 作者不是维护者、维护者未评论且存在时间超过阈值的讨论数量 | 0 | 任何超过7天的内容 |
| 社区与维护者回复比 | 所有内容项中,非维护者评论数 / 维护者评论数 | >0.3 | 0 |
| 本月新增讨论 | 过去30天内创建的讨论数量 | >2 | 0 |
| 零互动内容项 | 总评论数为0的内容项数量 | -- | -- |
Phase 4: Preview Table
阶段4:预览表格
If contains → skip this phase entirely. Output compact summary (red flags, priority counts per category, health metrics table) and stop. Do NOT compose the full Phase 5 report.
$ARGUMENTSsummaryOtherwise (standalone mode): present a compact summary table of ALL classified items for user review. Wait for user approval before proceeding to Phase 5.
undefined如果包含 → 完全跳过此阶段。输出精简摘要(红色预警、各优先级数量统计、健康指标表格)并终止流程,不生成完整的第5阶段报告。
$ARGUMENTSsummary否则(独立运行模式): 展示所有已分类内容项的精简摘要表格,供用户审核。获得用户确认后,方可进入第5阶段。
undefinedTriage Preview -- {total count} items found
分类预览 -- 共找到 {total count} 条内容
| # | Type | Title | Priority | Age | Key Signal |
|---|---|---|---|---|---|
| {number} | {Issue/PR/Discussion} | {title (truncated to 50 chars)} | {P0/P1/P2/P3/P4} | {days}d | {short reason} |
Sort by priority (P0 first), then by age (oldest first) within each priority group.
After presenting, ask the user:
- Confirm priorities look correct
- Whether to exclude any items from the full report
- Whether to adjust the staleness threshold
Proceed to Phase 5 only after user confirms.
---| 编号 | 类型 | 标题 | 优先级 | 存在天数 | 关键信号 |
|---|---|---|---|---|---|
| {number} | {Issue/PR/Discussion} | {title(截断至50字符)} | {P0/P1/P2/P3/P4} | {days}d | {简短原因} |
按优先级排序(P0优先),同一优先级内按存在天数排序(最旧的在前)。
展示预览后,询问用户:
- 确认优先级分类是否正确
- 是否需要从完整报告中排除某些内容项
- 是否需要调整停滞阈值
仅在用户确认后,方可进入第5阶段。
---Phase 5: Compose Report
阶段5:生成完整报告
Present the full triage report in this format:
undefined按以下格式生成完整的分类报告:
undefinedGitHub Triage Report -- {YYYY-MM-DD}
GitHub分类报告 -- {YYYY-MM-DD}
Scope: {issues/PRs/discussions or "all"} | Threshold: {N} days | Open items: {total count}
undefined扫描范围: {issues/PRs/discussions 或 "全部"} | 阈值: {N} 天 | 公开内容项总数: {total count}
undefinedRed Flag Alerts
红色预警提示
If any red flags from Phase 3 are triggered, add BEFORE Health Metrics:
> [!WARNING]
> **Red flags detected:**
> - {description, e.g., "2 unanswered discussions older than 7 days"}如果阶段3中触发了任何红色预警,需在健康指标表格之前添加:
> [!WARNING]
> **检测到红色预警:**
> - {描述,例如:"2条超过7天未回复的讨论"}Health Metrics Table
健康指标表格
| Metric | Value | Target | Status |
|--------|-------|--------|--------|
| Unanswered (>{N}d) | {count} | 0 | {OK / RED FLAG} |
| Avg first response | {hours}h | <24h | {OK / RED FLAG} |
| Community:maintainer ratio | {ratio} | >0.3 | {OK / RED FLAG} |
| New discussions (30d) | {count} | >2 | {OK / RED FLAG} |
| Zero-engagement items | {count} | -- | {count} || 指标 | 数值 | 目标值 | 状态 |
|--------|-------|--------|--------|
| 未回复内容(>{N}天) | {count} | 0 | {正常 / 红色预警} |
| 平均首次响应时间 | {hours}h | <24h | {正常 / 红色预警} |
| 社区:维护者回复比 | {ratio} | >0.3 | {正常 / 红色预警} |
| 新增讨论(30天内) | {count} | >2 | {正常 / 红色预警} |
| 零互动内容项 | {count} | -- | {count} |Priority Tables
优先级表格
For each priority P0..P3, show header with count. If count is 0, show header and skip table.
(0)P0 Critical:
| # | Type | Title | Labels | Age | Action Needed |
|---|
P1 Urgent:
| # | Type | Title | Author | Age | Why |
|---|
P2 Stale:
| # | Type | Title | Last Activity | Days Stale |
|---|
P3 Monitor:
| # | Type | Title | Note |
|---|
P4 Info: Do NOT list individually -- only include in total count.
为每个优先级P0..P3展示标题和数量。如果数量为0,展示标题并跳过表格。
(0)P0 紧急:
| 编号 | 类型 | 标题 | 标签 | 存在天数 | 需执行操作 |
|---|
P1 高优先级:
| 编号 | 类型 | 标题 | 作者 | 存在天数 | 原因 |
|---|
P2 已停滞:
| 编号 | 类型 | 标题 | 最后活动时间 | 停滞天数 |
|---|
P3 监控中:
| 编号 | 类型 | 标题 | 备注 |
|---|
P4 信息类: 不单独列出,仅计入总数。
Recommended Actions
建议操作
undefinedundefinedRecommended Actions
建议操作
- Respond: {items needing maintainer reply, with GitHub URLs}
- Review: {PRs needing review, with GitHub URLs}
- Close or bump: {stale items -- suggest close if resolved, bump if relevant}
- Engage: {items that could benefit from community call-to-action}
undefined- 回复: {需要维护者回复的内容项,附GitHub链接}
- 审核: {需要审核的PR,附GitHub链接}
- 关闭或激活: {已停滞的内容项 -- 建议如果已解决则关闭,若仍相关则激活}
- 参与互动: {可发起社区号召的内容项}
undefinedFormatting Rules
格式规则
- Sort items within each priority group by age (oldest first)
- URL format:
https://github.com/{owner}/{repo}/{issues|discussions|pull}/{number} - Dates in , ages in days
YYYY-MM-DD - All items in Recommended Actions must have direct GitHub URLs
- 同一优先级内的内容项按存在天数排序(最旧的在前)
- URL格式:
https://github.com/{owner}/{repo}/{issues|discussions|pull}/{number} - 日期格式为,存在天数以天为单位
YYYY-MM-DD - 建议操作中的所有内容项必须附带直接的GitHub链接
Rules
规则
- Read-only: this skill fetches and reports -- never create, modify, or close any GitHub item
- No publishing: do not create issues, comments, labels, or any other GitHub state change
- Maintainer login: from Phase 0 discovery (authenticated user)
- Default threshold: 7 days (per strategy Section 5)
- Rate limits: if GraphQL rate limit hit, report partial results with a warning
- 只读: 本技能仅获取数据并生成报告 -- 绝不创建、修改或关闭任何GitHub内容项
- 禁止发布: 不得创建Issue、评论、标签或任何其他GitHub状态变更
- 维护者登录账号: 来自阶段0的发现流程(已认证用户)
- 默认阈值: 7天(根据策略第5部分)
- 速率限制: 如果触发GraphQL速率限制,需报告部分结果并附带警告
Definition of Done
完成标准
- GitHub data fetched for all scoped item types (issues/PRs/discussions)
- Every item classified by priority (P0-P4)
- Engagement metrics calculated per strategy targets
- Report composed (full interactive report OR compact summary for coordinator)
Version: 1.0.0
Last Updated: 2026-03-13
- 已获取所有指定范围内容类型的GitHub数据(Issue/PR/讨论)
- 所有内容项已按优先级分类(P0-P4)
- 已根据策略目标计算参与度指标
- 已生成报告(完整交互式报告 或 供协调者使用的精简摘要)
版本: 1.0.0
最后更新: 2026-03-13