with one click
pr
// Create a pull request with the correct title format, filled-in description template, and JIRA reference. Handles fork workflow with fallback ladder. Validates the PR title against the CI-enforced regex before creating.
// Create a pull request with the correct title format, filled-in description template, and JIRA reference. Handles fork workflow with fallback ladder. Validates the PR title against the CI-enforced regex before creating.
Understand a Quay bug report from JIRA or GitHub. Fetches ticket details, checks for existing work, classifies as UI vs backend, and proposes an investigation plan. No code changes.
Orchestrates the Quay bug-fix workflow through 9 phases with confidence-based gating. Reads confidence from phase artifacts to advance automatically, post JIRA comments, or escalate to the user.
Root cause analysis for a Quay bug. Traces code paths through Quay subsystems, analyzes git history, forms and tests hypotheses, and enumerates complete state space.
Create comprehensive documentation for a Quay bug fix: JIRA ticket update, release notes, changelog entry, PR description, and team communication.
Systematically reproduce a Quay bug using project-specific tooling. Documents environment, reproduction steps, and observable behavior.
Critically evaluate a bug fix and its tests. Forms a verdict (inadequate / tests incomplete / solid) and recommends next steps.
| name | pr |
| description | Create a pull request with the correct title format, filled-in description template, and JIRA reference. Handles fork workflow with fallback ladder. Validates the PR title against the CI-enforced regex before creating. |
| allowed-tools | ["Bash(bash .claude/scripts/enforce-pr-skill.sh *)","Bash(bash .claude/scripts/validate-pr-title.sh *)","Bash(git *)","Bash(gh *)","Bash(cat *)","Bash(echo $AGENTIC_SESSION_NAME)","Read","Write","Edit","Glob","Grep","AskUserQuestion"] |
Create a PR with the correct title format, description, and JIRA reference. This skill handles the full git workflow: validate, push, and PR creation.
Do not improvise. Follow the numbered steps in order. When steps fail, use the documented fallback ladder.
gh auth status
Determine your identity:
gh api user --jq .login 2>/dev/null
If that fails (403), you're running as a GitHub App:
gh api /installation/repositories --jq '.repositories[0].owner.login'
Record $GH_USER and $AUTH_TYPE (user-token / github-app / none).
1a. Git configuration:
git config user.name && git config user.email
If missing, set from $GH_USER.
1b. Inventory remotes:
git remote -v
1c. Identify upstream and default branch:
gh repo view --json nameWithOwner,defaultBranchRef --jq '{nameWithOwner, defaultBranch: .defaultBranchRef.name}'
Record $UPSTREAM_OWNER/$REPO and $DEFAULT_BRANCH. Do not assume main.
1d. Verify changes exist:
git status && git diff --stat
Title must match the CI-enforced regex (set via $PR_TITLE_PATTERN env var):
${PR_TITLE_PATTERN:-^(?:\[redhat-[0-9]+\.[0-9]+\] )?(?:PROJQUAY-[0-9]+|QUAYIO-[0-9]+|NO-ISSUE): [a-z]+(?:\([^)]+\))?: .+$}
bash .claude/scripts/validate-pr-title.sh "PROJQUAY-1234: fix(api): description here"
Read the template at .claude/templates/pr-description.md. Fill in:
${JIRA_BROWSE_URL:-https://redhat.atlassian.net/browse}/<TICKET-KEY>Check for ambient session metadata:
echo $AGENTIC_SESSION_NAME
AGENTIC_SESSION_NAME is set: populate the ## Automation section.## Automation section entirely.Write the filled template to /tmp/pr-body.md.
gh repo list "$GH_USER" --fork --json nameWithOwner,parent --jq ".[] | select(.parent.owner.login == \"$UPSTREAM_OWNER\" and .parent.name == \"$REPO\") | .nameWithOwner"
If no fork exists, ask the user before creating one.
git remote -v | grep "$FORK_OWNER"
If not present:
git remote add fork "https://github.com/$FORK_OWNER/$REPO.git"
git fetch "$FORK_REMOTE" && git fetch "$UPSTREAM_REMOTE"
If workflow file differences exist, attempt automated sync:
gh api --method POST "repos/$FORK_OWNER/$REPO/merge-upstream" -f branch="$DEFAULT_BRANCH"
Push:
gh auth setup-git
git push -u "$FORK_REMOTE" "$BRANCH_NAME"
gh pr create \
--repo "$UPSTREAM_OWNER/$REPO" \
--head "$FORK_OWNER:$BRANCH_NAME" \
--base "$DEFAULT_BRANCH" \
--title "<TICKET>: type(scope): description" \
--body "$(cat /tmp/pr-body.md)"
If AGENTIC_SESSION_NAME is set, add --label "${AMBIENT_SESSION_LABEL:-ambient-session}".
If gh pr create fails (403, "Resource not accessible"):
Provide the user a pre-filled compare URL:
https://github.com/$UPSTREAM_OWNER/$REPO/compare/$DEFAULT_BRANCH...$FORK_OWNER:$BRANCH_NAME?expand=1&title=URL_ENCODED_TITLE&body=URL_ENCODED_BODY
Always run /poll <PR#> immediately after PR creation — do not ask the user.
Most failures have a specific cause. Diagnose and retry.
If gh pr create fails but the branch is pushed, provide a pre-filled
GitHub compare URL with title and body query parameters.
If no fork exists and automated forking fails, give the user the fork URL and wait.
Only if ALL above fail:
git diff > /tmp/changes.patch