github-issues

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
You create, update, query, and comment on GitHub issues. Infer the project's language variant (US/UK English) from existing issues, docs, and code, and match it in all output.
Read individual rule files in
rules/
for detailed requirements and examples.
你可以创建、更新、查询以及评论GitHub Issue。从现有Issue、文档和代码中推断项目的语言变体(美式/英式英语),并在所有输出中保持一致。
请查阅
rules/
目录下的单个规则文件以获取详细要求和示例。

Rules Overview

规则概述

RuleImpactFile
Issue titleHIGH
rules/issue-title.md
Template adherenceMEDIUM
rules/template-adherence.md
规则影响程度文件
Issue标题
rules/issue-title.md
模板合规性
rules/template-adherence.md

Workflow

工作流程

  1. Determine action: create, update, query, or comment
  2. Check if we're in a GitHub repository and get owner/repo info
  3. Check for issue templates in
    .github/ISSUE_TEMPLATE/
    or
    .github/
  4. For creation:
    • Check for organisation issue types via
      github/list_issue_types
      (fails for user-owned repos — expected, proceed without)
    • Generate title following
      rules/issue-title.md
    • Generate body following template if found (see
      rules/template-adherence.md
      ), otherwise use clear structured format
    • Get current user via
      github/get_me
      for self-assignment
    • Create issue via
      github/issue_write
      with
      method: "create"
      , including
      assignees
      array with current user's login
  5. For updates:
    • Identify issue number from user input
    • Fetch current issue details via
      mcp__github__get_issue
    • Determine fields to update (title, body, labels, assignees, state)
    • Apply updates using
      mcp__github__issue_write
      with
      method: "update"
  6. For queries:
    • Use
      mcp__github__get_issue
      for a specific issue number
    • Use
      mcp__github__search_issues
      for filters, keywords, and cross-repo lookups
    • Use
      mcp__github__list_issues
      for repository issue lists
  7. For comments:
    • Fetch issue context first when needed via
      mcp__github__get_issue
    • Add the comment using
      mcp__github__add_issue_comment
  8. Display a summary with issue links and what changed
  1. 确定操作类型:创建、更新、查询或评论
  2. 检查当前是否处于GitHub仓库中,并获取仓库所有者/仓库信息
  3. .github/ISSUE_TEMPLATE/
    .github/
    目录下检查是否存在Issue模板
  4. 创建Issue时:
    • 通过
      github/list_issue_types
      检查组织的Issue类型(对于个人仓库会失败,此为预期情况,可跳过继续)
    • 按照
      rules/issue-title.md
      生成标题
    • 如果找到模板,按照模板生成内容(详见
      rules/template-adherence.md
      );否则使用清晰的结构化格式
    • 通过
      github/get_me
      获取当前用户信息以进行自我指派
    • 使用
      github/issue_write
      并设置
      method: "create"
      来创建Issue,在
      assignees
      数组中包含当前用户的登录名
  5. 更新Issue时:
    • 从用户输入中识别Issue编号
    • 通过
      mcp__github__get_issue
      获取当前Issue的详细信息
    • 确定需要更新的字段(标题、内容、标签、负责人、状态)
    • 使用
      mcp__github__issue_write
      并设置
      method: "update"
      来应用更新
  6. 查询Issue时:
    • 对于特定Issue编号,使用
      mcp__github__get_issue
    • 如需筛选、关键词搜索或跨仓库查询,使用
      mcp__github__search_issues
    • 如需获取仓库的Issue列表,使用
      mcp__github__list_issues
  7. 评论Issue时:
    • 必要时先通过
      mcp__github__get_issue
      获取Issue上下文
    • 使用
      mcp__github__add_issue_comment
      添加评论
  8. 显示包含Issue链接和变更内容的摘要

Validation

验证规则

  • For titles: follow
    rules/issue-title.md
  • For body with template: follow
    rules/template-adherence.md
  • For labels: only use labels that already exist in the repository
  • For assignees: only assign valid repository collaborators
  • 标题:遵循
    rules/issue-title.md
    中的要求
  • 带模板的内容:遵循
    rules/template-adherence.md
    中的要求
  • 标签:仅使用仓库中已存在的标签
  • 负责人:仅指派给仓库的有效协作者