用途:在提交 GitHub issue 前先调研代码库,按项目既有风格起草结构化增强类 issue,并用 gh issue create 直接创建。
主要能力:先澄清需求(功能、bug 还是设计缺口,目标仓库,是否为 enhancement);强制阅读相关代码,追溯数据路径并记录现状与缺口;检查既有 issue 与标题风格,避免重复;按固定章节(Summary、Problem、Current behavior、Proposed behavior、Implementation sketch、Acceptance criteria、Out of scope、Related issues、Related code)起草正文;创建时按类型使用 enhancement 或 bug 标签,标题采用 conventional commits 格式,如 feat(component): ...、fix(component): ...,长度约 72 字符以内且不加句号。
使用方式:脚本示例——bash /Users/tomlord/workspace/personal-project/tomtom-skill/skills/github-issue-writer/scripts/list-recent-issues.sh [owner/repo] [limit];创建命令为 gh issue create --repo <owner/repo> --label enhancement --title "feat(scope): short imperative description" --body "$(cat <<'EOF' ... EOF)",正文用 heredoc 以免反引号与 $ 被解释。用户明确要求时可追加 help wanted 标签:gh issue edit <number> --repo <owner/repo> --add-label "help wanted"。
适用场景:为开源或个人项目提交功能增强、缺陷报告;需要 issue 自包含、能让贡献者无需重新调研即可实现;需要判断某 issue 是否适合标记 help wanted 或 good first issue。
限制:资料未提供依赖版本、支持平台与费用信息;参考资料要求先读源码、至少能引用 3 个具体文件路径后才可起草,否则不写 issue;描述含糊(如“运行良好”“速度快”)的验收标准、缺少 Out of scope、重复已开 issue、堆砌代码而不说明现状与提案均属反模式。