using-github

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Using GitHub

使用GitHub

Use this skill as the single entry point for GitHub work. It owns issue creation, issue editing, issue branch creation, milestone changelog rendering, and pull request preparation.
将此技能作为GitHub相关工作的唯一入口。它负责创建Issue、编辑Issue、创建Issue分支、渲染里程碑变更日志以及准备Pull Request。

First Checks

初始检查

  • Read root repository guidance such as
    AGENTS.md
    .
  • Read local docs that govern the files or GitHub surface being changed.
  • Use repository templates for issues and pull requests.
  • Use canonical labels from the remote label inventory.
  • Do not manually apply or remove reserved release automation labels.
  • Keep public-repo output free of private repository URLs, private paths, and private content.
  • Stay in the current working directory's default
    gh
    repository unless the repository guidance explicitly allows cross-repo work.
  • 阅读仓库根目录的指导文档,例如
    AGENTS.md
  • 阅读管理待修改文件或GitHub界面的本地文档。
  • 使用仓库提供的Issue和Pull Request模板。
  • 使用远程标签清单中的标准标签。
  • 不要手动添加或移除保留的发布自动化标签。
  • 确保公开仓库的输出中不包含私有仓库URL、私有路径和私有内容。
  • 除非仓库指导明确允许跨仓库工作,否则请停留在当前工作目录默认的
    gh
    仓库中。

Required Procedures

必选流程

Follow the matching procedure before taking GitHub actions. These files are supporting workflow contracts for this skill, not separate installable skills.
  • New issue: follow
    workflows/new-issue.md
    .
  • Existing issue edit: follow
    workflows/edit-issue.md
    .
  • Start issue work: follow
    workflows/new-branch.md
    .
  • Milestone changelog: follow
    workflows/write-changelog.md
    .
  • PR comments: follow
    workflows/pr-comments.md
    before replying to, resolving, or reporting PR review feedback handled.
  • Pull request: read
    .github/pull_request_template.md
    , use the repo's PR title format, and include acceptance-criteria verification when the issue defines acceptance criteria.
在执行GitHub操作前,请遵循对应的流程。这些文件是此技能的配套工作流约定,并非独立可安装的技能。
  • 新建Issue:遵循
    workflows/new-issue.md
  • 编辑现有Issue:遵循
    workflows/edit-issue.md
  • 开始Issue相关工作:遵循
    workflows/new-branch.md
  • 里程碑变更日志:遵循
    workflows/write-changelog.md
  • PR评论:在回复、解决或报告PR评审反馈处理情况前,遵循
    workflows/pr-comments.md
  • Pull Request:阅读
    .github/pull_request_template.md
    ,使用仓库的PR标题格式,若Issue定义了验收标准,则需包含验收标准验证内容。

Shared GitHub Rules

通用GitHub规则

  • Branches for issue work use
    <issue-number>-<kebab-title>
    from the default branch.
  • Commits and squash PR titles use
    type: #123 short description
    with no scope, unless the change is breaking. Breaking changes use
    type!: #123 short description
    .
  • GitHub issue titles are plain-language summaries, not conventional commits.
  • Relationships are same-repo
    #N
    references unless repository guidance says otherwise.
  • Public issue, PR, and changelog text must pass the public-repo leak guard.
  • Duplicate checks happen before filing new issues.
  • Label choices come from
    gh label list
    ; do not invent labels.
  • Pull request bodies use the repository template headings in order.
  • Issue相关工作的分支从默认分支创建,命名格式为
    <issue-number>-<kebab-title>
  • 提交记录和合并PR的标题使用
    type: #123 简短描述
    格式,无需作用域,除非是破坏性变更。破坏性变更使用
    type!: #123 简短描述
    格式。
  • GitHub Issue标题为通俗易懂的摘要,而非规范提交格式。
  • 关联引用使用同仓库的
    #N
    格式,除非仓库指导另有说明。
  • 公开Issue、PR和变更日志文本必须通过公开仓库防泄露检查。
  • 在提交新Issue前需检查是否存在重复。
  • 标签选择来自
    gh label list
    ;请勿自行创建标签。
  • Pull Request正文需按仓库模板的标题顺序填写。

Public-Repo Leak Guard

公开仓库防泄露检查

Before creating or updating public issues, PRs, changelog text, or rendered release notes:
  1. Resolve the target repository and visibility with
    gh repo view
    .
  2. If the target is public, scan the draft for private GitHub URLs and private path-shaped content.
  3. Refuse confirmed leaks.
  4. Surface ambiguous content for explicit review instead of silently rewriting.
在创建或更新公开Issue、PR、变更日志文本或渲染发布说明前:
  1. 使用
    gh repo view
    确认目标仓库及其可见性。
  2. 如果目标仓库是公开的,扫描草稿内容,检查是否包含私有GitHub URL和私有路径类内容。
  3. 拒绝已确认的泄露内容。
  4. 对于模糊内容,需提交明确审核,而非自行修改。

Common Mistakes

常见错误

MistakeFix
Invoking removed specialized skillsUse this skill and its required procedure files.
Inventing labels or templatesRead the repository label inventory and templates.
Treating PR creation as just a
gh pr create
command
Satisfy the repository PR template, title format, and acceptance-criteria rules first.
Including private repository context in public textRewrite as a public-safe summary or file in a private repository first.
错误修复方法
调用已移除的专用技能使用此技能及其必选流程文件。
自行创建标签或模板阅读仓库的标签清单和模板。
仅将PR创建视为执行
gh pr create
命令
首先满足仓库的PR模板、标题格式和验收标准规则。
在公开文本中包含私有仓库上下文重写为适合公开的摘要,或先在私有仓库中提交。