using-github
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUsing 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 repository unless the repository guidance explicitly allows cross-repo work.
gh
- 阅读仓库根目录的指导文档,例如。
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 before replying to, resolving, or reporting PR review feedback handled.
workflows/pr-comments.md - Pull request: read , use the repo's PR title format, and include acceptance-criteria verification when the issue defines acceptance criteria.
.github/pull_request_template.md
在执行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:阅读,使用仓库的PR标题格式,若Issue定义了验收标准,则需包含验收标准验证内容。
.github/pull_request_template.md
Shared GitHub Rules
通用GitHub规则
- Branches for issue work use from the default branch.
<issue-number>-<kebab-title> - Commits and squash PR titles use with no scope, unless the change is breaking. Breaking changes use
type: #123 short description.type!: #123 short description - GitHub issue titles are plain-language summaries, not conventional commits.
- Relationships are same-repo references unless repository guidance says otherwise.
#N - Public issue, PR, and changelog text must pass the public-repo leak guard.
- Duplicate checks happen before filing new issues.
- Label choices come from ; do not invent labels.
gh label list - 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:
- Resolve the target repository and visibility with .
gh repo view - If the target is public, scan the draft for private GitHub URLs and private path-shaped content.
- Refuse confirmed leaks.
- Surface ambiguous content for explicit review instead of silently rewriting.
在创建或更新公开Issue、PR、变更日志文本或渲染发布说明前:
- 使用确认目标仓库及其可见性。
gh repo view - 如果目标仓库是公开的,扫描草稿内容,检查是否包含私有GitHub URL和私有路径类内容。
- 拒绝已确认的泄露内容。
- 对于模糊内容,需提交明确审核,而非自行修改。
Common Mistakes
常见错误
| Mistake | Fix |
|---|---|
| Invoking removed specialized skills | Use this skill and its required procedure files. |
| Inventing labels or templates | Read the repository label inventory and templates. |
Treating PR creation as just a | Satisfy the repository PR template, title format, and acceptance-criteria rules first. |
| Including private repository context in public text | Rewrite as a public-safe summary or file in a private repository first. |
| 错误 | 修复方法 |
|---|---|
| 调用已移除的专用技能 | 使用此技能及其必选流程文件。 |
| 自行创建标签或模板 | 阅读仓库的标签清单和模板。 |
仅将PR创建视为执行 | 首先满足仓库的PR模板、标题格式和验收标准规则。 |
| 在公开文本中包含私有仓库上下文 | 重写为适合公开的摘要,或先在私有仓库中提交。 |