Git open pr
Skill ainova-systems/intelligence-dev-packs/packs/core/skills/git-open-pr
Open a pull request for the current branch against its target, using the repo templateFrom its SKILL.md
npx -y skills add ainova-systems/intelligence-dev-packs --skill git-open-prAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 7 commands, including `git branch --show-current` and 6 more.
SKILL.md
2.8 KB, 668 tokens by cl100k_base, as published. Nobody here has run it
Open a PR
Turn a pushed feature branch into a reviewable PR. Idempotent: if a PR already exists for the branch, report it and stop - never open a second.
Steps
git branch --show-current- on a protected branch (default/integration), STOP; a PR is opened FROM a feature branch.- Confirm the branch is pushed and current:
git rev-parse HEADequalsgit rev-parse @{u}- unpushed work goes throughgit-commit-pushfirst. - Existing-PR check:
gh pr list --head <branch> --state open --json number,url --jq '.[0]'. Non-empty - report the URL and STOP (nothing to open). - Resolve the target from profile
pr_target(defaultauto- the integration branch when one exists, else the default branch). - Title: an explicit argument wins; else the latest commit subject (
git log -1 --pretty=%s). Honor profileartifact_languagefor title and body when set (e.g. write them in English even when the working language differs). - Body: if the repo has a PR template (
.github/PULL_REQUEST_TEMPLATE.mdor.github/pull_request_template.md), fill ITS sections honestly - real content per section, "None" where one genuinely does not apply; never leave the template's hint comments. No template - a concise default: what & why, the changes, and how to verify (the concrete steps or call a reviewer runs, plus the gates already run). When profilepr_risk_size: on, prepend the deterministic Risk/Size line (below). - Open it:
gh pr create --base <target> --title <title> --body-file <file>(--body-fileavoids shell-quoting traps). On non-GitHub platforms use the profilecli(glab mr create, ...). - Report the PR URL and number.
Risk & Size (only when profile pr_risk_size: on)
Compute both mechanically so the same diff always yields the same flags:
- Size from
git diff <target>...HEAD --shortstat: thresholds from profilepr_size_thresholds(defaultsmall <= 5 files & 50 lines; large >= 20 files or 400 lines; else medium). - Risk = the highest-matching category from profile
pr_risk_globs(path globs mapped to high / medium / low). No profile globs - skip Risk rather than guess.
State one value each, e.g. Risk: low | Size: small.
Verify
- Exactly one open PR for the branch; it targets the resolved base; the body has real content (no template hint comments left).
Scope / hand-off
- Committing/pushing first -
git-commit-push; driving the opened PR to green and draining comments -git-finalize-pr; merging -git-merge-pr.
CRITICAL
- Idempotent: never open a second PR when one is already open for the branch.
- Never open a PR from a protected branch, or from a branch with unpushed commits.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.