mcpField
E
export-open-issues

export-open-issues

github.com/huytieu生产力1.3k178 次安装6 天前更新
代码仓库

关于 export-open-issues

COG Skill 用于收集并分析项目跟踪器中的未关闭问题,生成积压审计报告。适合冲刺规划和进度汇报,可汇总多个活跃跟踪器的数据。

主要功能

  1. 01收集一个或多个跟踪器的问题
  2. 02按优先级、类型和状态分类
  3. 03识别过期、阻塞及未分配问题
  4. 04生成报告并保存到项目库
  5. 05按需生成 CSV

适用场景

  1. 01准备冲刺或周期规划
  2. 02检查积压中的过期与阻塞项
  3. 03向利益相关者汇报当前工作状态
  4. 04导出问题清单供表格分析

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/huytieu/cog-second-brain --skill export-open-issues

安装后在 Claude Code 中输入/export-open-issues确认已加载。

详细介绍

COG 导出未解决问题技能

调用时机

  • 用户想要审查未解决问题或积压工作状况
  • 用户说“导出问题”“未解决问题”“积压审计”“问题报告”“有哪些未解决问题”
  • 冲刺/周期规划准备——需要清楚了解正在进行的工作
  • 向利益相关者汇报——需要当前工作状态的快照

Agent 模式识别

检查 00-inbox/MY-PROFILE.md frontmatter 中的 agent_mode:

  • 如果 agent_mode: team — 使用并行 Agent 同时从所有活跃跟踪系统收集数据,并生成统一报告
  • 如果 agent_mode: solo — 按顺序从主要跟踪系统收集数据

命令:/export-open-issues

准备检查

  1. 读取 00-inbox/MY-INTEGRATIONS.md,确定哪些跟踪系统处于活跃状态

  2. 读取 00-inbox/MY-PROFILE.md,了解活跃项目

  3. 获取当前时间戳: 使用 Bash 运行 date '+%Y-%m-%d %H:%M'

  4. 询问用户(如果尚未提供):

    • 哪个项目?(如果有多个活跃项目)
    • 范围:所有未解决问题,还是按标签/里程碑/负责人筛选?
    • 是否包含额外分析?(问题存续时间、优先级分布、负责人负载)

执行策略

阶段 1:收集未解决问题
Team 模式(并行 Agent)

使用 Task 工具并设置 run_in_background: true,启动收集 Agent:

Agent:“github-issues-collector”(如果 GitHub 处于活跃状态)

Export all open issues from GitHub.
Repository: [CUSTOMIZE: your-org/your-repo]

1. Get all open issues:
   gh issue list --repo [CUSTOMIZE: your-org/your-repo] --state open --json number,title,author,assignees,labels,createdAt,updatedAt,milestone,url --limit 500

2. Get all open PRs (separate from issues):
   gh pr list --repo [CUSTOMIZE: your-org/your-repo] --state open --json number,title,author,labels,createdAt,updatedAt,reviewDecision,url --limit 200

For each issue, calculate:
- Age in days (today - createdAt)
- Days since last update (today - updatedAt)
- Staleness flag: >30 days since last update = stale

Return: full issue list with calculated fields

Agent:“linear-issues-collector”(如果 Linear 处于活跃状态)

Export all open issues from Linear.

1. Use ToolSearch to load Linear tools
2. List all teams: mcp__claude_ai_Linear_2__list_teams
3. For each relevant team, list open issues: mcp__claude_ai_Linear_2__list_issues
4. Get current cycles: mcp__claude_ai_Linear_2__list_cycles
5. Get milestones: mcp__claude_ai_Linear_2__list_milestones

For each issue, collect:
- ID, title, status, priority, assignee, labels, project
- Created date, updated date
- Cycle membership
- Blocked status

Return: full issue list with metadata

Agent:“jira-issues-collector”(如果 Jira 处于活跃状态)

Export all open issues from Jira.
Project: [CUSTOMIZE: YOUR-PROJECT-KEY]

1. Search open issues:
   JQL: project = "[CUSTOMIZE: YOUR-PROJECT-KEY]" AND status NOT IN (Done, Closed, Resolved) ORDER BY priority DESC, created ASC

2. For each issue, collect:
   key, summary, issuetype, status, priority, assignee, reporter, labels, components, fixVersion, created, updated, duedate

Return: full issue list with metadata
Solo 模式

按顺序从主要跟踪系统收集数据。

阶段 2:分析并分类

处理收集的数据,生成:

2.1 汇总统计
Total Open Issues: [N]
  - By Priority: Critical [N], High [N], Medium [N], Low [N], None [N]
  - By Type: Feature [N], Bug [N], Task [N], Other [N]
  - By Status: To Do [N], In Progress [N], In Review [N], Blocked [N]
  - By Assignee: [Name] ([N]), [Name] ([N]), Unassigned ([N])
2.2 健康状况指标
  • 长期未更新的问题(超过 30 天未更新):列出问题及存续时间
  • 未分配的问题:列出问题及优先级
  • 受阻问题:列出问题及阻塞详情
  • 逾期问题(已超过截止日期):列出问题及逾期天数
  • 最早的未解决问题:按存续时间列出前 10 项
  • 进行中瓶颈:“进行中”状态超过 7 天的问题
2.3 分布图表(文本形式)
Priority Distribution:
  Critical  ████░░░░░░  12%
  High      ████████░░  38%
  Medium    ██████░░░░  28%
  Low       ████░░░░░░  22%

Age Distribution:
  <7 days   ██████████  45%
  7-30 days ██████░░░░  30%
  30-90 d   ███░░░░░░░  15%
  >90 days  ██░░░░░░░░  10%
阶段 3:生成报告
---
type: open-issues-audit
project: [project-name]
date: [YYYY-MM-DD]
created: [YYYY-MM-DD HH:MM]
source: [github/linear/jira/multi]
tags: ["#issues-audit", "#[project-name]", "#backlog"]
summary:
  total_open: [N]
  critical: [N]
  high: [N]
  stale: [N]
  unassigned: [N]
  blocked: [N]
  oldest_days: [N]
---

# Open Issues Audit — [Project Name]

**Date:** [YYYY-MM-DD]
**Source:** [Tracker(s) used]
**Total Open Issues:** [N]

---

## Executive Summary

[2-3 sentences: overall backlog health, biggest concerns, and recommended actions]

---

## Summary Statistics

| Category | Count | % of Total |
|----------|-------|-----------|
| **By Priority** | | |
| Critical | [N] | [%] |
| High | [N] | [%] |
| Medium | [N] | [%] |
| Low | [N] | [%] |
| No Priority | [N] | [%] |
| **By Status** | | |
| To Do | [N] | [%] |
| In Progress | [N] | [%] |
| In Review | [N] | [%] |
| Blocked | [N] | [%] |
| **By Type** | | |
| Feature/Story | [N] | [%] |
| Bug | [N] | [%] |
| Task | [N] | [%] |
| Other | [N] | [%] |

---

## Assignee Load

| Assignee | Open Issues | Critical/High | In Progress | Oldest Issue (days) |
|----------|-------------|---------------|-------------|-------------------|
| [Name] | [N] | [N] | [N] | [N] |
| [Name] | [N] | [N] | [N] | [N] |
| Unassigned | [N] | [N] | — | [N] |

---

## Health Alerts

### Stale Issues (>30 days without update)
| # | Title | Assignee | Priority | Age (days) | Last Updated |
|---|-------|----------|----------|-----------|-------------|
| [#] | [Title] | [Name] | [Priority] | [N] | [Date] |

### Blocked Issues
| # | Title | Assignee | Blocked By | Days Blocked |
|---|-------|----------|-----------|-------------|
| [#] | [Title] | [Name] | [Reason] | [N] |

### Unassigned High-Priority Issues
| # | Title | Priority | Age (days) | Labels |
|---|-------|----------|-----------|--------|
| [#] | [Title] | [Priority] | [N] | [Labels] |

### Overdue Issues
| # | Title | Assignee | Due Date | Days Overdue |
|---|-------|----------|----------|-------------|
| [#] | [Title] | [Name] | [Date] | [N] |

---

## Full Issue List

### Critical Priority
| # | Title | Status | Assignee | Age | Labels | URL |
|---|-------|--------|----------|-----|--------|-----|
| [#] | [Title] | [Status] | [Name] | [N]d | [Labels] | [URL] |

### High Priority
[Same table format]

### Medium Priority
[Same table format]

### Low Priority
[Same table format]

---

## Recommendations

1. **[Recommendation 1]** — [Specific action with rationale]
2. **[Recommendation 2]** — [Specific action with rationale]
3. **[Recommendation 3]** — [Specific action with rationale]

---

*Generated by COG Open Issues Audit | [Date]*
阶段 4:保存到 Vault

保存到:04-projects/[project]/audits/open-issues-YYYY-MM-DD.md

mkdir -p "04-projects/[project]/audits"
阶段 5:呈现结果

向用户展示:

  1. 执行摘要
  2. 关键健康状况警报(长期未更新、受阻、未分配)
  3. 主要建议
  4. 文件位置

询问用户是否需要:

  • 完整详细视图
  • 导出为 CSV(在 Markdown 文件旁生成一个简单的 CSV 文件)
  • 分享到指定频道或 Wiki

CSV 导出(可选)

如果用户请求 CSV,则与 Markdown 文件一起生成:

#,Title,Type,Status,Priority,Assignee,Labels,Created,Updated,Age(days),URL
[data rows]

保存到:04-projects/[project]/audits/open-issues-YYYY-MM-DD.csv


回退行为

场景行为
没有活跃的跟踪系统告知用户需要集成项目跟踪系统;提供设置协助
跟踪系统 API 失败重试一次,然后报告部分结果并附上错误说明
问题过多(>500)对收集过程进行分页,提醒用户,并提供按标签/里程碑/负责人筛选的选项
有多个活跃的跟踪系统从所有系统收集数据并生成统一报告,注明每项问题的来源
未发现未解决问题报告积压工作状态良好(这是好消息!)

错误处理

  • 速率限制:对请求进行分页,必要时增加延迟
  • 大型载荷:如果问题超过 200 项,则进行汇总,而非列出所有问题
  • 缺少字段:标记为“N/A”,而不是失败
  • 上下文溢出:分批处理,并分别汇总每一批

评论

支持 Markdown