Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计提醒

issue-create问题创建

Agent Skill

用于围绕 GitHub 仓库、Issue、Pull Request、分支、提交和代码协作流程提供辅助能力。它适合让 Agent 查询项目状态、整理变更、辅助创建或检查协作事项,并把仓库中的信息转成可执行的下一步。使用时需要区分只读查询和写入操作;涉及创建 PR、修改 Issue、推送分支或访问私有仓库时,应确认 token 权限、目标仓库范围和用户授权。

总安装

1,932

周安装

83

GitHub Stars

38

下载量

677
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:issue-create(问题创建)
来源仓库:https://github.com/terrylica/cc-skills
仓库路径:skills/issue-create
安装命令:
npx skills add https://github.com/terrylica/cc-skills --skill issue-create
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/terrylica/cc-skills --skill issue-create

简介

用于创建新的 GitHub Issue,支持标题、描述和标签设置。

  • 适合在开发流程中快速生成标准化 Issue,提升团队协作效率。
  • 通过自然语言指令自动生成 Issue 内容并提交到指定仓库。
  • 使用前需确认 GitHub token 权限,确保可写入目标仓库。
  • issue-create 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Issue Create Skill

Create well-formatted GitHub issues with intelligent automation including AI-powered label suggestions, content type detection, template formatting, and related issue linking.

Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

When to Use This Skill

Use this skill when:

  • Creating bug reports, feature requests, questions, or documentation issues
  • Need AI-powered label suggestions from repository's existing taxonomy
  • Want automatic duplicate detection and related issue linking
  • Need consistent issue formatting across different repositories

Invocation

Slash command: /gh-tools:issue-create

Natural language triggers:

  • "Create an issue about..."
  • "File a bug for..."
  • "Submit a feature request..."
  • "Report this problem to..."
  • "Post an issue on GitHub..."

Features

1. Repository Detection

  • Auto-detects repository from current git directory
  • Supports explicit --repo owner/repo flag
  • Checks permissions before attempting to create

2. Content Type Detection

  • AI-powered detection (gpt-4.1 via gh-models)
  • Fallback to keyword matching
  • Types: Bug, Feature, Question, Documentation

3. Title Extraction

  • Extracts informative title from content
  • Adds type prefix (Bug:, Feature:, etc.)
  • Maximizes GitHub's 256-character limit for informative titles

4. Body Limit Maximization (65,536 Characters)

GitHub issue bodies support 65,536 characters (not bytes — UTF-8 multibyte characters count as 1). Always aim to fill a single post rather than splitting across multiple issues or comments.

Principle: One comprehensive post is more valuable than many fragmented ones. Pack as much analysis, context, history, and multi-perspective reasoning as possible into a single issue body or comment.

When composing long-form issue content:

  • Check remaining capacity: echo "$BODY" | wc -m (characters, not bytes)
  • Target ~60,000 chars to leave headroom for GFM rendering edge cases
  • Use collapsible sections (<details><summary>) for dense reference material — they don't reduce the char budget but improve readability
  • Include all perspectives: if the issue documents a decision, include the alternatives considered, trade-offs, evidence for/against, and why the chosen path won
  • Embed historical context: timelines, prior art, links to related issues, session provenance — all belong in one post
  • Never pre-emptively split: only split if you genuinely exceed 65,536 chars (rare)

Pre-post size check pattern:

# Build body, then verify it fits
BODY=$(cat <<'EOF'
... your content ...
EOF
)
CHARS=$(echo "$BODY" | wc -m | tr -d ' ')
echo "Body size: ${CHARS}/65536 chars"
if [ "$CHARS" -gt 65536 ]; then
  echo "WARNING: Exceeds limit by $((CHARS - 65536)) chars — trim or split"
fi

5. Template Formatting

  • Auto-selects template based on content type
  • Bug: Steps to reproduce, Expected/Actual behavior
  • Feature: Use case, Proposed solution
  • Question: Context, What was tried
  • Documentation: Location, Suggested change

5. Label Suggestion

  • Fetches repository's existing labels
  • AI suggests 2-4 relevant labels
  • Only suggests labels that exist (taxonomy-aware)
  • 24-hour cache for performance

6. Related Issues

  • Searches for similar issues
  • Links related issues in body
  • Warns about potential duplicates

7. Preview & Confirm

  • Full preview before creation
  • Dry-run mode available
  • Edit option for modifications

Usage Examples

Basic Usage

# From within a git repository
bun ~/eon/cc-skills/plugins/gh-tools/scripts/issue-create.ts \
  --body "Login page crashes when using special characters in password"

With Explicit Repository

bun ~/eon/cc-skills/plugins/gh-tools/scripts/issue-create.ts \
  --repo owner/repo \
  --body "Feature: Add dark mode support for better accessibility"

Dry Run (Preview Only)

bun ~/eon/cc-skills/plugins/gh-tools/scripts/issue-create.ts \
  --repo owner/repo \
  --body "Bug: API returns 500 error" \
  --dry-run

With Custom Title and Labels

bun ~/eon/cc-skills/plugins/gh-tools/scripts/issue-create.ts \
  --repo owner/repo \
  --title "Bug: Login fails with OAuth" \
  --body "Detailed description..." \
  --labels "bug,authentication"

Disable AI Features

bun ~/eon/cc-skills/plugins/gh-tools/scripts/issue-create.ts \
  --body "Question: How to configure..." \
  --no-ai

CLI Options

OptionShortDescription
--repo-rRepository in owner/repo format
--body-bIssue body content (required)
--title-tIssue title (optional)
--labels-lComma-separated labels
--dry-runPreview without creating
--no-aiDisable AI features
--verbose-vEnable verbose output
--help-hShow help

Dependencies

  • gh CLI (required) - GitHub CLI tool
  • gh-models extension (optional) - Enables AI features

Installing gh-models

gh extension install github/gh-models

Permission Handling

LevelBehavior
WRITE/ADMINFull functionality
TRIAGECan apply labels
READShows formatted content for manual copy
NONESuggests fork workflow

Logging

Logs to: ~/.claude/logs/gh-issue-create.jsonl

Events logged:

  • preflight - Initial checks
  • type_detected - Content type detection
  • labels_suggested - Label suggestions
  • related_found - Related issues search
  • issue_created - Successful creation
  • dry_run - Dry run completion

Related Documentation

Embedding Images in Issues

GitHub Issues have no API for programmatic image upload. The web UI's drag-and-drop uses an internal S3 policy flow that is intentionally not exposed to API clients (cli/cli#1895).

Preflight: Ensure Images Are Reachable

The ?raw=true URL resolves via github.com — if the image doesn't exist at that path on the remote, it silently 404s (broken image, no error). Run this preflight before creating the issue:

# 1. Detect repo context
OWNER_REPO=$(gh repo view --json nameWithOwner -q '.nameWithOwner')
BRANCH=$(git rev-parse --abbrev-ref HEAD)
VISIBILITY=$(gh repo view --json visibility -q '.visibility')

# 2. Verify images are git-tracked (not gitignored)
IMG_DIR="path/to/images"
for f in ${IMG_DIR}/*.png; do
  git ls-files --error-unmatch "$f" >/dev/null 2>&1 \
    || echo "WARNING: $f is NOT tracked by git (check .gitignore)"
done

# 3. Verify images are committed (not just staged or untracked)
UNCOMMITTED=$(git diff --name-only HEAD -- "${IMG_DIR}/" 2>/dev/null)
UNTRACKED=$(git ls-files --others --exclude-standard -- "${IMG_DIR}/" 2>/dev/null)
if [[ -n "$UNCOMMITTED" || -n "$UNTRACKED" ]]; then
  echo "FAIL: Images not committed — commit and push first"
  echo "  Uncommitted: ${UNCOMMITTED}"
  echo "  Untracked:   ${UNTRACKED}"
  exit 1
fi

# 4. Verify commit is pushed to remote (local commits invisible to github.com)
LOCAL_SHA=$(git rev-parse HEAD)
REMOTE_SHA=$(git rev-parse "origin/${BRANCH}" 2>/dev/null)
if [[ "$LOCAL_SHA" != "$REMOTE_SHA" ]]; then
  echo "FAIL: Local commits not pushed — run: git push origin ${BRANCH}"
  exit 1
fi

# 5. Build image base URL
IMG_BASE="https://github.com/${OWNER_REPO}/blob/${BRANCH}/${IMG_DIR}"
echo "Image base URL: ${IMG_BASE}/<filename>.png?raw=true"
echo "Repo visibility: ${VISIBILITY}"
if [[ "$VISIBILITY" == "PRIVATE" ]]; then
  echo "NOTE: Images only visible to authenticated collaborators"
fi

Preflight checklist (what each step catches):

StepCheckFailure Mode
1Repo context existsNo OWNER_REPO to build URLs
2Images are git-tracked.gitignore silently excludes them
3Images are committedStaged/untracked files don't exist on remote
4Commit is pushedLocal-only commits are invisible to github.com
5URL constructionWrong branch name → 404

URL Format: ?raw=true vs raw.githubusercontent.com

For images already committed and pushed, use github.com/blob/...?raw=true URLs — not raw.githubusercontent.com:

<!-- BROKEN for private repos (no browser cookies on raw.githubusercontent.com) -->

![img](https://raw.githubusercontent.com/owner/repo/main/path/image.png)

<!-- WORKING for all repos (browser has cookies on github.com, gets signed redirect) -->

![img](https://github.com/owner/repo/blob/main/path/image.png?raw=true)

Scripting pattern (batch images → issue body):

IMG_BASE="https://github.com/${OWNER_REPO}/blob/${BRANCH}/${IMG_DIR}"

gh issue create --title "Feedback with screenshots" --body "$(cat <<EOF
## Item 1
![description](${IMG_BASE}/01-screenshot.png?raw=true)

## Item 2
![description](${IMG_BASE}/02-screenshot.png?raw=true)
EOF
)"

See AP-07 in GFM Anti-Patterns for the full technical explanation.

Images NOT in the Repository

For images only on disk (not committed), four options:

MethodHowPermanent?Preflight?
Commit + push firstgit add images, push, run preflight, then use ?raw=true URLsYes (repo-hosted)Yes (5-step)
Web UI pasteOpen issue in browser, Ctrl/Cmd+V images into comment boxYes (user-attachments CDN)None
Web UI drag-and-dropDrag image files into the comment boxYes (user-attachments CDN)None
Playwright automationScript automates the browser file-attachment flowYes (user-attachments CDN)None

Playwright Automation (Programmatic CDN Upload)

GitHub has no API for image uploads, but the browser's file-attachment flow can be automated via Playwright to get permanent user-attachments CDN URLs without any commit/push preflight.

How it works:

  1. Playwright opens the issue page in Chromium with a persistent profile (~/.claude/tools/pw-github-profile/)
  2. First run only: user logs in to GitHub (any method — Google SSO, passkey, password). Cookies persist.
  3. Script clicks "Paste, drop, or click to add files" → intercepts the file chooser → sets the image file
  4. GitHub uploads to its S3 backend and inserts an <img> tag with a user-attachments CDN URL into the comment textarea
  5. Script extracts the CDN URL and clears the textarea (no comment is actually posted)

Key implementation details (GitHub's 2026 React comment composer):

  • Comment textarea selector: textarea[placeholder="Use Markdown to format your comment"] (dynamic React IDs — do NOT match by id)
  • File upload trigger: click the "Paste, drop, or click to add files" text, then intercept page.waitForEvent("filechooser")
  • Upload result format: <img width="W" height="H" alt="Image" src="https://github.com/user-attachments/assets/UUID" /> (HTML <img> tag, not ![](...) markdown)
  • Old textarea#new_comment_field and file-attachment input[type='file'] selectors no longer exist
  • Batch uploads: clear textarea between uploads with textarea.fill("")

Chrome CDP note: chromium.connectOverCDP() fails with Chrome 136+ (WebSocket timeout). Use chromium.launchPersistentContext() with Playwright's bundled Chromium instead. Chrome 136+ also requires --user-data-dir for CDP (DevTools remote debugging requires a non-default data directory), making CDP impractical for reusing existing browser sessions.


Troubleshooting

"No repository context"

Run from a git directory or use --repo owner/repo flag.

Labels not suggested

  • Check if gh-models is installed: gh extension list
  • Verify repository has labels: gh label list --repo owner/repo
  • Check label cache: ls ~/.cache/gh-issue-skill/labels/

AI features not working

Install gh-models extension:

gh extension install github/gh-models

Post-Execution Reflection

After this skill completes, check before closing:

  1. Did the command succeed? — If not, fix the instruction or error table that caused the failure.
  2. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
  3. Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.39%
按下载量换算192

OpenCode

21.75%
按下载量换算147

Antigravity

20%
按下载量换算135

Gemini CLI

14.67%
按下载量换算99

windsurf

7.6%
按下载量换算51

trae

3.93%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills