Skip to content

[Docs]: 新增 Claude Code github-pr skill,规范贡献者向上游提交 Issue 和 PR 的工作流 #81

@ZhengZhenyu

Description

@ZhengZhenyu

Problem Description

项目缺少统一的 Issue + PR 提交规范,贡献者在向 opensourceways/openGecko 上游提交 PR 时:

  • 不清楚应选择哪种 Issue 模板(Feature Request / Bug Report / Documentation / Governance Task)
  • 不了解如何将个人 fork 的用户名自动关联,避免硬编码
  • 只知道使用 gh CLI,不清楚 gh 未安装时的替代方案(curl + PAT、Web UI、hub

Suggested Improvement

在 CLAUDE.md 中新增 Contributing to Upstream 章节,并在 .claude/skills/github-pr/SKILL.md 中封装完整工作流:

CLAUDE.md 新增章节

说明何时触发 /github-pr skill、upstream/origin 远端约定,以及完整的 Issue + PR 提交步骤。

.claude/skills/github-pr/SKILL.md 内容

  1. 自动推断 fork 用户名 — 通过 git remote get-url origin + sed 提取,支持 SSH 和 HTTPS 两种格式,不硬编码任何用户名
  2. commit 前缀 → Issue 模板映射
    • feat: → Feature Request(标题前缀 [Feature]:
    • fix: → Bug Report([Bug]:
    • docs: → Documentation([Docs]:
    • Governance 相关 → Governance Task([Governance]:
  3. 各模板 body 结构(因项目 .yml 模板不支持 gh --template,需手动组织 body)
  4. gh CLI 的替代方案
    • Option A:curl + GitHub PAT(REST API)
    • Option B:GitHub Web UI(YAML 表单模板推荐方式)
    • Option C:hub CLI

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions