agentleFS
fritzprixfritzprix/ak5/.agents/skills/create-pr/SKILL.md

create-pr

Skill2 starsChanged 44 days agoApache-2.0View on GitHub

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``.

  • Commits and pushes

197 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use update-pr, create-release-note and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    update-pr

    Update the pull request for the current session. Use when the user wants to push new changes to an existing PR.

    Also in 10 projects that use this

  • ModelEngine-GroupSkill

    create-release-note

    从 PR/commit 中自动生成结构化的 Release Notes,并可选创建 GitHub Draft Release。支持 x.y.0 版本合并前一 minor 系列的 release notes。当用户要求生成发布说明、创建 release notes 时触发。参数为版本号和可选的上一版本号。

    Also in 3 projects that use this

  • frostneySkill

    delivery-wait

    Provides deterministic, resumable GitHub transition waits used internally by delivery workflows. Use when another workflow must await CI, merge, tag, or release state without model heartbeats.

    Also in 3 projects that use this

  • frostneySkill

    native-nostalgia-stack

    Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.

    Also in 3 projects that use this

  • parkchuSkill

    start-mission

    넥스트스텝(NextStep) 미션을 처음 시작할 때, 미션 저장소를 fork·clone하고 최초 작업 브랜치(step1 등)까지 만들어 준다. gh CLI로 fork하고 clone까지 이어서 처리하며, gh가 없거나 인증이 안 돼 있으면 브라우저 Fork 안내로 폴백한다. 이미 fork/clone돼 있으면 재사용하고 이어서 진행한다(재실행 안전). 사용자가 "미션 시작하려는데 저장소 세팅해줘", "새 미션 시작할래", "fork부터 해줘", "/nextstep:start-mission" 등으로 요청할 때 사용한다.

    Also in 3 projects that use this

  • MicrosoftSkill

    act-on-feedback

    Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

    Also in 3 projects that use this

  • +1 more from frostney
  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 182 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not default to master / main for this workflow.

    line 14
  2. Very specific:

    If the script exits non-zero, stop and tell the user no matching remote dev/* branch exists.

    line 41
  3. Very specific:

    Must be on a feature / work branch (not master, main, or dev/*.x).

    line 61
  4. Very specific:

    If currently on dev/*.x or default branch, stop and ask for the feature branch name (or offer to create one).

    line 62
  5. Very specific:

    Use gh pr create with explicit base:

    line 77
  6. Very specific:

    Prefer the repo’s recent commit / PR style (fix:, feat:, etc.).

    line 93
  7. Very specific:

    If a PR for this head→base already exists, print its URL instead of creating a duplicate (gh pr list --head <branch> --base <BASE>).

    line 95
  8. Distinctive:

    Always end with the PR URL so the user can open it.

    line 100

“Common” is measured: kept by at least 6 in 10 of the 182 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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) among origin/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 to master.

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, or dev/*.x). If currently on dev/*.x or 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 / main unless the user explicitly overrides.
  • Force-pushing or rewriting history.
  • Creating an empty PR when origin/<BASE>..HEAD is empty.
  • Opening a PR from dev/*.x into itself.

Helper

scripts/resolve_dev_base.py — prints latest dev/MAJOR.MINOR.x short name.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.