← 返回
未分类 Key 中文

GitHub Issue Writer

Draft well-structured GitHub issues from a description, error, or idea. Supports bug reports, feature requests, enhancements, and tasks. Optionally submits d...
根据描述、错误或想法起草结构良好的 GitHub issue,支持错误报告、功能请求、改进和任务,可选择直接提交。
djc00p djc00p 来源
未分类 clawhub v1.0.1 1 版本 99662.2 Key: 需要
★ 0
Stars
📥 295
下载
💾 1
安装
1
版本
#latest

概述

gh-issue-writer

Draft clear, actionable GitHub issues from a brief description, error message, or idea. Covers bug reports, feature requests, enhancements, and tasks.


Step 1 — Understand the Input

Ask (or infer from context):

  1. What type of issue? Bug | Feature Request | Enhancement | Task | Question
  2. What repo? (detect from git remote get-url origin if in a git dir, otherwise ask)
  3. What happened / what's wanted? (the raw description, error, or idea)
  4. Optional: Labels, assignee, milestone, environment details

If the user gives you enough context, proceed without asking — draft and show for confirmation.


Step 2 — Draft the Issue

Use the appropriate template below. Fill every field; omit sections only if genuinely not applicable.

Bug Report

## Description
<!-- Clear, one-paragraph summary of the problem. -->

## Steps to Reproduce
1.
2.
3.

## Expected Behavior
<!-- What should have happened? -->

## Actual Behavior
<!-- What actually happened? Include error messages verbatim. -->

## Environment
- OS:
- Browser / Runtime / Version:
- Relevant config or dependencies:

## Logs / Screenshots
<!-- Paste relevant logs, stack traces, or attach screenshots. -->

## Additional Context
<!-- Anything else that might help: related issues, recent changes, workarounds tried. -->

Feature Request

## Problem / Motivation
<!-- What problem does this solve? Why does it matter? -->

## Proposed Solution
<!-- Describe the feature clearly. What would it look like? How would it work? -->

## Alternatives Considered
<!-- Other approaches you thought about and why you ruled them out. -->

## Acceptance Criteria
- [ ]
- [ ]

## Additional Context
<!-- Mockups, related issues, prior art, links. -->

Enhancement (improvement to existing behavior)

## Current Behavior
<!-- What does it do now? -->

## Desired Behavior
<!-- What should it do instead? -->

## Why This Matters
<!-- Impact: who benefits, how much, how often? -->

## Suggested Implementation
<!-- Optional: any technical ideas or constraints. -->

Task / Chore

## What needs to be done
<!-- Clear, specific description of the work. -->

## Why / Context
<!-- Why is this needed now? What does it unblock? -->

## Definition of Done
- [ ]
- [ ]

Step 3 — Write a Strong Title

Title format by type:

TypePatternExample
------------------------
BugBug: on Bug: 500 on POST /login when payload missing field
FeatureFeature: for Feature: CSV export for admin reports
EnhancementEnhance: Enhance: error messages — add field-level detail
TaskTask: Task: upgrade Stripe SDK to v16

Rules:

  • Under 72 characters
  • No vague words ("fix thing", "update stuff")
  • Specific: what + where, not just what

Step 4 — Suggest Labels & Metadata

Recommend labels based on type and content:

SignalSuggested Labels
-------------------------
Bugbug, needs-repro
Featureenhancement, feature-request
High impact / blockingpriority:high
Needs more infoneeds-info
Good for contributorsgood first issue
Securitysecurity
Performanceperformance
Docsdocumentation

Also suggest:

  • Assignee: who owns this area of the codebase?
  • Milestone: which release or sprint does this target?

Step 5 — Present for Review

Show the complete draft:

**Title:** <title>

**Type:** Bug / Feature / Enhancement / Task
**Suggested labels:** bug, priority:high
**Suggested assignee:** (if known)

---
<full issue body>
---

Ask: "Does this look right? I can adjust the title, add details, or submit it directly."


Step 6 — Optional: Submit

> Prerequisites for submission:

> - gh CLI (authenticated via gh auth login) — preferred path

> - GH_TOKEN env var — required for the curl API fallback

> - git — used to detect the repo from git remote get-url origin

>

> Drafting (Steps 1–5) works without any of these.

If the user says "submit", "create it", "go ahead", or similar:

Via GitHub CLI (preferred)

gh issue create \
  --repo owner/repo \
  --title "<title>" \
  --body "<body>" \
  --label "bug,priority:high" \
  --assignee "@me"

Via GitHub API (fallback if gh isn't available)

curl -s -X POST \
  -H "Authorization: Bearer $GH_TOKEN" \
  -H "Accept: application/vnd.github+json" \
  https://api.github.com/repos/{owner}/{repo}/issues \
  -d '{
    "title": "<title>",
    "body": "<body>",
    "labels": ["bug"],
    "assignees": []
  }'

On success, output the issue URL. On error, show the response and offer to retry.


Quality Checklist

Before presenting the draft, verify:

  • [ ] Title is specific and under 72 chars
  • [ ] For bugs: repro steps are numbered and minimal
  • [ ] Expected vs actual behavior is clearly separated
  • [ ] Environment section filled (OS, version, runtime)
  • [ ] No vague language ("sometimes", "doesn't work", "weird behavior")
  • [ ] Logs/errors quoted verbatim, not paraphrased
  • [ ] Ends with a clear ask or next step

Tips for Better Issues

Do:

  • Quote error messages exactly — don't summarize them
  • Include the minimal repro — what's the smallest thing that triggers the bug?
  • Link related issues with #
  • Mention what you've already tried

Don't:

  • "Works on my machine" without environment details
  • Multiple unrelated problems in one issue
  • Vague titles like "Login broken" or "Feature request"
  • Screenshot of code instead of pasted text

See Also

  • GitHub's official issue template docs: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests
  • Set up templates: create .github/ISSUE_TEMPLATE/ in your repo

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-08 02:43 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Agent Cost Strategy

djc00p
分层模型选择与成本优化,适用于多智能体 AI 工作流。在为任务选择模型或启动子代理时使用此技能。
★ 0 📥 735

Coding Standards

djc00p
通用编码规范,适用于 TypeScript、JavaScript、React、Node.js。原则:可读性优先、KISS、DRY、YAGNI;涵盖命名、类型安全、错误处理等。
★ 0 📥 714

Freqtrade Tools

djc00p
Freqtrade(加密货币交易机器人)的Shell别名和辅助命令,加速常见任务。用于设置快捷方式和下载...
★ 1 📥 747