用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/pkulijing/claude-code-global --skill backlog命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | backlog |
| description | 把一条 backlog 创建成 issue(GitHub / GitLab 自动双轨,含三轴 label)—— issue 即单一真源,无本地索引文件 |
| disable-model-invocation | false |
用户调用此 skill 表示要新增一条 backlog。「issue 是单一真源、无本地索引文件、open 项速览走 saved query」这套原则见 GLOBAL_AGENTS.md「需求管理」,此处不复述。本 skill 只做一件事:
git remote get-url origin 自动判定 GitHub / GitLabissue 关闭仍由 /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 / GitLabpython3 $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 不复述。
询问用户,让其在 feat / bug / spike 中选一个。决定走哪份模板。
读对应模板(.github/ISSUE_TEMPLATE/<type>.md)。基于其骨架字段(如 feat 模板的「动机 / 希望达到 / 候选方向 / 风险 / scope」),AI 按字段引导用户填:
对话来回 1~2 轮够了,不要拖。
读 .github/labels.yml(或缺失时 python3 $HOME/.claude/scripts/platform_issue.py label-list 取 fallback)拿 area:* 列表。GitLab 项目同样读 .github/ 下这一份(缘由见 scripts/platform_issue.md「label-sync-from-file 语义」)。
询问用户,让其从 area 列表中选一条。如列表为空(仅 placeholder),允许用户输入新 area 名(warn 一句「这个 area 不在 labels.yml 中,建议本轮结束后补到 labels.yml + 跑 /sync-project-config 同步到远端 labels」)。
询问用户,让其在 P0 / P1 / P2 中选一个,并要求一句话说明优先级判断理由(写到 issue body 顶部 blockquote 中)。
把 title + body + 三个 label 一并展示,等用户确认。允许调整任意字段,不自动落盘。
把 Step 5 确认过的 body 内容写到临时文件 /tmp/backlog-body.md(用 Write 工具),再调 helper:
python3 $HOME/.claude/scripts/platform_issue.py issue-create \
--title "<标题>" \
--body-file /tmp/backlog-body.md \
--label "type:<X>" \
--label "area:<Y>" \
--label "priority:<Z>"
helper stdout 输出新建 issue 的 URL(单行),从中提取 issue 号 #N。GitHub URL pattern: .../issues/N;GitLab URL pattern: .../-/issues/N。不写任何本地索引。
打印新创建的 issue URL,让用户确认。再附一行「open 项速览」的 saved query 链接(按 priority 过滤未关闭 issue),方便用户挑下一轮:
https://github.com/{slug}/issues?q=is%3Aissue+is%3Aopen+label%3Apriority%3AP0%2Cpriority%3AP1%2Cpriority%3AP2https://gitlab.com/{slug}/-/issues?state=opened&label_name[]=priority:P0&label_name[]=priority:P1&label_name[]=priority:P2(自托管把 host 换成对应实例域名){slug} 由 python3 $HOME/.claude/scripts/platform_issue.py repo-slug 获取(GitHub 端 owner/repo,GitLab 端 namespace/project)。
不调用 /commit —— 本 skill 只动云端 issue、不改任何本地文件,无需 commit。