
Issue To PR Resolver
Implement a GitHub issue end-to-end, create a worktree branch, implement the feature...
Install
npx skills add homeassistant-ai/ha-mcp --skill issue-to-pr-resolver -g -a claude-code -y- Repository
- homeassistant-ai/ha-mcp5.4k
- Category
- Testing
- Updated
- 3d ago
- License
- MIT
- Context cost
- Lightabout 1,026 tokens
- Runs scripts
- No, instructions only
What it does
Implement a GitHub issue end-to-end, create a worktree branch, implement the feature with tests, create a draft PR, then iteratively resolve all CI failures and review comments until the PR is clean. Use when you need to fully implement a GitHub issue from start to merge-ready. Triggers on "implement issue", "resolve issue", "/issue-to-pr-resolver <number>".
Issue-to-PR Resolver
Implement GitHub issue #$ARGUMENTS in homeassistant-ai/ha-mcp end-to-end.
Phase 1: Setup
Read the issue:
gh issue view "$ARGUMENTS" --repo homeassistant-ai/ha-mcp --json title,body,labels,comments,author
Create a worktree from repo root:
cd "$(git rev-parse --show-toplevel)"
git checkout master && git pull origin master
git worktree add "worktree/issue-$ARGUMENTS" -b "feature/issue-$ARGUMENTS"
git -C "worktree/issue-$ARGUMENTS" submodule update --init --recursive
cd "worktree/issue-$ARGUMENTS"
Phase 2: Implement
- Analyze codebase structure and patterns before writing code
- Follow project conventions (see
AGENTS.mdfor patterns, naming, error handling) - Write tests, all new MCP tools in
src/ha_mcp/tools/need E2E tests - Make atomic, well-described commits using conventional commit prefixes
Philosophy: Work autonomously. Don't ask about every small decision. Fix unrelated test failures encountered. Document all choices for the final summary.
If a non-obvious choice has significant consequences, present the available options to the user and let them choose.
Phase 3: Create PR
Write the PR body to local/pr-body-$ARGUMENTS.md first. local/ is git-ignored, so a new worktree does not have it; create it with mkdir -p local if it does not exist. Build the body from .github/pull_request_template.md: keep its headings, put Closes #$ARGUMENTS and the description under ## What does this PR do?, and delete ## Future improvements unless the user has confirmed work to defer. Then push and create the PR:
git push -u origin "feature/issue-$ARGUMENTS"
PR_NUMBER=$(gh pr create --draft \
--repo homeassistant-ai/ha-mcp \
--title "<descriptive title>" \
--body-file "local/pr-body-$ARGUMENTS.md" | grep -oE '[0-9]+$')
Wait for CI:
gh pr checks "$PR_NUMBER" --repo homeassistant-ai/ha-mcp --watch


