跳到正文
Skillpedia
通用编程7.6k · #13110

create-github-issue

它能做什么

这项技能使用 GitHub 命令行工具创建 GitHub 议题。它读取代码仓库的议题模板,并填写每个部分。适合想要报告错误或提出功能请求的人。

适用场景

  • ✓当你想在 GitHub 代码仓库中提交错误报告的时候。
  • ✓当你想使用项目自己的模板提出功能请求的时候。
  • ✓当你想在创建新议题之前,先检查是否已有相关议题的时候。

技能链接

https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/create-github-issue/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/create-github-issue/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“你能用他们的议题模板,在这个项目的 GitHub 上提交一份错误报告吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体列出代码仓库的议题模板,选择合适的模板,读取其中必填的字段,然后用 GitHub 命令行工具创建议题。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Create GitHub Issue

Create comprehensive GitHub issues using gh issue create by dynamically discovering and adhering to the repository's official issue templates.

Workflow

1. Discover and Select Template

CRITICAL: You must use the repository's official templates. Do not assume the structure.

  1. List available templates:
    ls .github/ISSUE_TEMPLATE/
    
  2. Select the most appropriate template based on the issue type (e.g., bug_report.yml, feature_request.yml).
  3. Read the selected template to understand its required fields, structure, and any title prefixes or default labels.
    cat .github/ISSUE_TEMPLATE/<selected_template>.yml
    

2. Gather Context

Gather relevant information to fulfill the template requirements:

# Check current git status for context
git status

# View recent commits if related to codebase changes
git log --oneline -10

# Check if related issues exist
gh issue list --search "keyword" --limit 10

3. Generate Markdown Body

MANDATORY: Structure the issue body exactly as defined in the selected YAML template without exception.

  1. Map YAML fields to Markdown: Convert each field in the template (typically found under body:) into a Markdown section.
  2. Use Headers: Use the label or id from the YAML field as an H2 header (e.g., ## Bug Description).
  3. Respect Validation: Ensure all fields marked as required: true in the YAML are populated with meaningful content.
  4. Format Correctly: Use code blocks (e.g., ```shell, ```yaml) for logs and configurations as suggested by the template's render attribute.

4. Choose Labels

Select labels by inspecting .github/labels.json.

  • Primary Label: Always include a type: label that matches the issue type.
  • Additional Labels: Add relevant state:, work:, or priority: labels if they exist in the configuration.
  • Constraint: Only use labels defined in .github/labels.json.

5. Create Title

Follow the template's title field if it provides a prefix (e.g., "[Bug]: ").

  • Be concise: Keep under 70 characters.
  • Use imperative mood: "Fix authentication timeout" instead of "Authentication is timing out".
  • Start with action verb: Fix, Add, Improve, Update, Refactor.

6. Execute Issue Creation

Step 1: Write body to temp file Use the write tool to create .forge/FORGE_ISSUE_BODY.md with the structured Markdown content.

Step 2: Create issue

gh issue create \
  --title "[Prefix]: Descriptive Title" \
  --body-file .forge/FORGE_ISSUE_BODY.md \
  --label "type: <type>, work: <complexity>"

Optional flags:

  • --assignee "username"
  • --milestone "name"
  • --draft (For proposals or research)

7. Finalize

Provide the user with the generated issue URL and a brief summary of the created issue.

Guidelines

  • No Exceptions: You must follow the discovered template's structure exactly. If a template asks for "Steps to Reproduce", you must provide them.
  • Dynamic Discovery: Always read the files in .github/ISSUE_TEMPLATE/ and .github/labels.json first. Never rely on hardcoded knowledge of templates or labels as they change frequently.
  • Cleanliness: Ensure no placeholder text (like "Describe the bug...") remains in the final body.
  • Contextual Awareness: If the user provides logs or code snippets, ensure they are placed in the correct sections of the template.

Notes

  • Single Source of Truth: The files in .github/ are the authoritative reference for issue structure and categorization.
  • Tooling: Use gh CLI directly. It is pre-authenticated and ready for use.
  • Automation: Do not ask for confirmation before creating the issue if the user's intent is clear.
常见问题

我需要安装 GitHub CLI 吗?

需要。技能使用 gh 命令行工具来创建议题。

它会遵循项目的模板吗?

会。它必须使用代码仓库的官方模板,并保持其章节结构。

它会检查是否重复吗?

在创建新议题之前,它可以搜索相关的议题。

详情

作者的原始描述

Create GitHub issues using GitHub CLI with support for templates, labels, assignees, milestones, and draft issues. Use when the user asks to create a GitHub issue, file a bug report, submit a feature request, or open an issue in a GitHub repository.

repo: tailcallhq/forgecode

热度

GitHub 星标
7.6k
排名
#13110
许可证
Apache-2.0
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能