You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bugfix workflow: PR skill assumes main as default branch #85
PR skill assumes main as default branch instead of detecting it
Summary
The /pr skill hardcodes main as the target branch for pull requests instead of detecting the upstream repository's actual default branch. This causes PR creation to fail when the upstream uses a different default branch (e.g., dev).
Steps to Reproduce
Run the bugfix workflow against a repo whose default branch is dev (not main)
Complete all phases through /document
Run /pr to create the pull request
The skill creates the feature branch off the correct local branch (dev), but when constructing the PR and compare URLs, it targets main
Expected Behavior
The PR skill should detect the upstream repo's default branch (via gh api repos/{owner}/{repo} --jq '.default_branch' or git remote show origin) and use that as the PR base branch.
Actual Behavior
The PR compare URL targets main: .../compare/main...fork:branch
GitHub shows "there isn't anything to compare" because main doesn't exist
The gh pr create command also uses --base main, which fails
Root Cause
The PR skill (.claude/skills/pr/SKILL.md) and/or the workflow's PR creation logic assumes the base branch is main rather than querying the actual default branch of the target repository.
Suggested Fix
Before constructing the PR:
Query the upstream default branch:
gh api repos/{owner}/{repo} --jq '.default_branch'
Use the result as the --base argument for gh pr create and in compare URLs.
Context
Encountered while running the bugfix workflow against anomalyco/opencode, which uses dev as its default branch. The branch was pushed successfully but PR creation failed, and the provided GitHub compare URL showed no changes because it referenced a nonexistent main branch.
Activity
fix(bugfix): comprehensive workflow improvements addressing 9 open is…