backloglisted
Install: claude install-skill pkulijing/claude-code-global
用户调用此 skill 表示要新增一条 backlog。「issue 是单一真源、无本地索引文件、open 项速览走 saved query」这套原则见 `GLOBAL_AGENTS.md`「需求管理」,此处不复述。本 skill 只做一件事:
- 走 issue template 创建一个 issue(含三轴 label)—— 平台由 `git remote get-url origin` 自动判定 GitHub / GitLab
issue 关闭仍由 `/finish` 完成(commit 写 `Closes #N`,语义同上)。
所有平台耦合的 CLI 调用都通过 helper `python3 $HOME/.claude/scripts/platform_issue.py <subcommand>`,本 SKILL 不直接调 `gh` / `glab`。**给已有 issue 补材料(实测数据、验证产物、决策更正)走 `issue-comment`,同样不许直调 `gh issue comment`** —— 契约见 `scripts/platform_issue.md`。
## 前置检查
按顺序,**任一失败立即停止并报告**:
- `git rev-parse --is-inside-work-tree` → 必须是 git 仓库
- `python3 $HOME/.claude/scripts/platform_issue.py detect-platform` → exit 0 才算识别到 GitHub / GitLab
- `python3 $HOME/.claude/scripts/platform_issue.py auth-status` → 对应平台 CLI 必须已登录
- `.github/ISSUE_TEMPLATE/feat.md` 等模板存在 → 否则提示「先 `/sync-project-config` 同步模板」(GitHub / GitLab 两端模板共存于同一项目,本检查对两端等价)
上面两条 helper 调用的非零退出,一律按 `scripts/platform_issue.md`「exit code 降级」表给提示,本 skill 不复述。
## 参数处理
- **有参数**:参数是这条 backlog 的原始描述(一句话或半结构化)
- **无参数**:追问「本次要加的 backlog 条目是什么?」
## 执行流程
### Step 1:选 issue 类型
询问用户,让其在 `feat` / `bug` / `spike` 中选一个。决定走哪份模板。
### Step 2:协作填 body
读对应模板(`.github/ISSUE_TEMPLATE/<type>.md`)。基于其骨架字段(如 feat 模板的「动机 / 希望达到 / 候选方向 / 风险 / scope」),AI 按字段引导用户填:
- 信息够:直接基于参数 + 用户对话内容生成
- 信息不够:写「待补充」,**不脑补**
- 用户明示「先放着之后再补」:尊重,body 写最少必要字段
对话来回 **1~2 轮够了**,不要拖。
### Step 3:选 area
读 `.github/labels.yml`(或缺失时 `python3 $HOME/.claude/scripts/platform_issue.py label-list` 取 fallback)拿 `area:*` 列表。**