From pr-via
Create a pull request via GitHub Actions workflow_dispatch. Use when the user says "create pr", "tạo pr cho con thỏ", "pr-via", or wants to open a PR for a branch. Triggers the create-pr.yml workflow.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pr-via:pr-viaThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a PR by triggering the `create-pr.yml` workflow via `gh` CLI.
Create a PR by triggering the create-pr.yml workflow via gh CLI.
/pr-via [branch-name] [base-branch]
branch-name: head branch (default: current git branch)base-branch: target branch to merge into (default: main)Determine branches:
head_branch: use arg if provided, otherwise git branch --show-currentbase_branch: use second arg if provided, otherwise mainAbort if an open PR already exists for this head→base pair (the workflow will fail anyway):
gh pr list --head <head> --base <base> --state open --json number,url --jq '.[0]'
If a PR is returned, report it and stop.
Check for unpushed commits:
git log @{u}..HEAD --oneline 2>/dev/null
git push -u origin <head_branch>git push -u origin <head_branch>Build PR title + body from the branch's commits (so the PR has a real summary instead of the workflow's "Auto-created by GitHub Actions." default):
git fetch origin <base> --quiet
git log --no-merges --pretty=format:'%s%n%n%b%n---' origin/<base>..HEAD
git diff --stat origin/<base>...HEAD
type(scope): short summary) that covers the branch. Do not prepend @coderabbitai — the workflow only adds that when no title is supplied.## Summary
- <bullet 1>
- <bullet 2>
- <bullet 3>
## Test plan
- [ ] <verification step>
- [ ] <verification step>
Bullets explain the why, not a file-by-file changelog. Skip the Test plan block only if there is genuinely nothing to verify (rare).Trigger the workflow, passing the generated title and body:
gh workflow run create-pr.yml \
-f head_branch=<branch> \
-f base_branch=<base> \
-f pr_title="<title>" \
-f pr_body="$(cat <<'EOF'
<body>
EOF
)"
Use a HEREDOC for pr_body so multi-line markdown survives shell escaping.
Get the workflow run URL:
gh run list --workflow=create-pr.yml --limit=1 --json databaseId,status,url --jq '.[0]'
gh pr list --head <head> --base <base> --state open --json number,url --jq '.[0]'
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub dinhnguyen/claude-plugins --plugin pr-via