搜索

PythonReactSEOPDF
GitHub Skill

issue-worker

Spawn a Claude worker to handle a GitHub issue. Fetches issue details, creates a feature branch, and works autonomously. Use when you want to delegate an issue to a worker.

schmug☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Issue Worker Skill

Spawn a Claude worker to handle a GitHub issue.

Usage

/issue-worker <issue-number>

Examples

/issue-worker 42
/issue-worker 123

Instructions

When the user invokes /issue-worker, follow these steps:

1. Fetch Issue Details
gh issue view <issue-number> --json number,title,body,labels,comments
2. Generate Branch Name

Create a descriptive branch name from the issue:

  • Format: feat/issue-<number>-<short-description>
  • Example: Issue #42 "Add retry logic" → feat/issue-42-add-retry-logic

For bug issues, use fix/ prefix instead of feat/.

3. Create Worktree
BRANCH="feat/issue-<number>-<slug>"
WORKTREE_PATH="../artemis-issue-<number>"
git worktree add "$WORKTREE_PATH" -b "$BRANCH"
4. Build Task Prompt

Construct a comprehensive prompt for the worker:

You are working on GitHub Issue #<number>: <title>

## Issue Description
<body>

## Labels
<labels>

## Comments
<comments if any>

## Your Task
1. Understand the issue requirements
2. Implement the necessary changes
3. Write tests if applicable
4. Commit your changes with message referencing the issue (e.g., "feat: add retry logic (fixes #42)")
5. Push your branch and create a PR

## Guidelines
- Follow existing code patterns in the repository
- Keep changes focused on the issue scope
- Add comments only where logic isn't self-evident
5. Spawn Worker
cd "$WORKTREE_PATH" && claude --print --dangerously-skip-permissions "$PROMPT"
6. Push and Create PR

After the worker completes successfully and has made commits:

# Push the branch to origin
git push -u origin "$BRANCH"

# Create PR linking to the issue
gh pr create --title "<issue title>" --body "$(cat <<'EOF'
## Summary
<brief description of changes>

Closes #<issue-number>

## Changes
<list of key changes made>

---
🤖 Generated by Claude worker
EOF
)"

# Enable auto-merge (will merge automatically when CI passes)
gh pr merge --auto --squash
7. Report Results

After completion:

  1. Show worker output summary
  2. Show commits made: git log $BRANCH --oneline -5
  3. Show files changed: git diff main...$BRANCH --stat
  4. Show the PR URL
  5. Offer next steps:
    • Review the PR
    • Continue working on it
    • Clean up if failed
8. Track Worker

Add to .claude/workers.json:

{
  "type": "issue",
  "issue": 42,
  "branch": "feat/issue-42-add-retry-logic",
  "worktree": "../artemis-issue-42",
  "created": "2024-01-15T10:30:00Z",
  "status": "completed",
  "pr": "<pr-url>"
}

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!