create-pr
Create a GitHub pull request from the current feature branch into the latest ``dev/MAJOR.MINOR.x`` integration branch. Use when the user asks to open/create a PR, ``/create-pr``, or merge feature work into ``dev/z.y.x``.
- License 许可
- Apache-2.0
- 所属仓库
- fritzprix/ak5
- 最近更新
- 2026-11-08
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- create-pr
- description
- Create a GitHub pull request from the current feature branch into the latest ``dev/MAJOR.MINOR.x`` integration branch. Use when the user asks to open/create a PR, ``/create-pr``, or merge feature work into ``dev/z.y.x``.
02 资源文件 1
- 脚本scripts/resolve_dev_base.py1.4 KB
03 SKILL.md 正文
Create PR → latest dev/z.y.x
Open a GitHub PR whose base is the newest remote dev/MAJOR.MINOR.x branch
(e.g. dev/1.0.x, dev/1.1.x) and whose head is the current feature branch.
Do not default to master / main for this workflow.
Workflow
Copy and track:
Create-PR Progress:
- [ ] 1. Resolve latest dev base
- [ ] 2. Inspect branch state
- [ ] 3. Push head if needed
- [ ] 4. Create PR with gh
- [ ] 5. Return PR URL
1. Resolve latest dev/z.y.x base
From the repo root:
python3 .agents/skills/create-pr/scripts/resolve_dev_base.py
- Fetches
origin(prune) and prints the highest(MAJOR, MINOR)amongorigin/dev/MAJOR.MINOR.x(example:dev/1.0.x). - If the script exits non-zero, stop and tell the user no matching remote
dev/*branch exists. Do not invent a base or fall back tomaster.
Optional override: if the user explicitly names a base (e.g. dev/1.1.x), use
that instead of the script output.
2. Inspect branch state (parallel)
Run together:
git status
git branch --show-current
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || true
git log --oneline origin/<BASE>..HEAD
git diff --stat origin/<BASE>...HEAD
Rules:
- Must be on a feature / work branch (not
master,main, ordev/*.x). If currently ondev/*.xor default branch, stop and ask for the feature branch name (or offer to create one). - Uncommitted changes: ask whether to commit first; do not silently commit.
- Empty
origin/<BASE>..HEAD: stop — nothing to PR.
3. Push head if needed
git push -u origin HEAD
Required when there is no upstream or local commits are ahead of the remote.
4. Create the PR
Use gh pr create with explicit base:
gh pr create --base <BASE> --head <CURRENT_BRANCH> --title "<title>" --body "$(cat <<'EOF'
## Summary
<1-3 bullets of what / why>
## Test plan
- [ ] <verification steps>
EOF
)"
Title / body:
- Prefer the repo’s recent commit / PR style (
fix:,feat:, etc.). - Summarize all commits on the feature branch vs base, not only the tip.
- If a PR for this head→base already exists, print its URL instead of creating
a duplicate (
gh pr list --head <branch> --base <BASE>).
5. Return the PR URL
Always end with the PR URL so the user can open it.
Anti-patterns
- Targeting
master/mainunless the user explicitly overrides. - Force-pushing or rewriting history.
- Creating an empty PR when
origin/<BASE>..HEADis empty. - Opening a PR from
dev/*.xinto itself.
Helper
scripts/resolve_dev_base.py — prints latest dev/MAJOR.MINOR.x short name.
04 同仓库更多 Skills
release
Automate AK5 version bump and release workflows for PyPI. Use when releasing a new version of AK5 (patch, minor, or major), running pre-flight linting and test suites, compiling embedded Web UI assets, synchronizing lockfiles, and pushing release git tags for automated CI/CD deployment.
ak5
Work as a triage, worker, or gatekeeper agent on an AK5 board through the `ak5` CLI (pull model), in an adversarial loop where each role verifies the previous one and a human gives final approval. Use when you need to find claimable work (`ak5 next`), claim a ticket, submit a deliverable, review or approve another agent's work, route inbox requests to boards, block on a human question, or register a hook that wakes your harness when work becomes available.
ak5
Work as a triage, worker, or gatekeeper agent on an AK5 board through the `ak5` CLI (pull model), in an adversarial loop where each role verifies the previous one and a human gives final approval. Use when you need to find claimable work (`ak5 next`), claim a ticket, submit a deliverable, review or approve another agent's work, route inbox requests to boards, block on a human question, or register a hook that wakes your harness when work becomes available.
release
Automate AK5 version bump and release workflows for PyPI. Use when releasing a new version of AK5 (patch, minor, or major), running pre-flight linting and test suites, compiling embedded Web UI assets, synchronizing lockfiles, and pushing release git tags for automated CI/CD deployment.
cursor-delegate
Delegate code reviews, refactoring, bug fixes, or implementation tasks to the Cursor Agent CLI (`cursor agent` / `agent`). Use when running Cursor as an AK5 worker (claim → run → submit), executing headless/non-interactive code reviews or refactoring, waking Cursor from AK5 WORK_AVAILABLE events, or syncing Cursor output back to AK5 tickets.
audit-local
Audit uncommitted local working-tree changes for bugs, security issues, regressions, and missing tests. Use when the user asks to audit/review local changes, dirty tree, uncommitted diff, ``/audit-local``, or wants a hands-on review instead of only launching Bugbot.