Finishing a Development Branch
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
Opens a pull request, publishing the current branch as a PR.
$ npx skills add opsmill/infrahub --skill pr -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install opsmill/infrahub pr --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/opsmill/infrahub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/pr .claude/skills/pr && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "pr" agent skill from https://github.com/opsmill/infrahub/tree/stable/.agents/skills/pr into .claude/skills/pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pr", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/opsmill/infrahub/tree/stable/.agents/skills/prType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add opsmill/infrahub --skill pr -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install opsmill/infrahub pr --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/opsmill/infrahub.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/pr .agents/skills/pr && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pr" agent skill from https://github.com/opsmill/infrahub/tree/stable/.agents/skills/pr into .agents/skills/pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pr", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add opsmill/infrahub --skill pr -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install opsmill/infrahub pr --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/opsmill/infrahub.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/pr .cursor/skills/pr && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pr" agent skill from https://github.com/opsmill/infrahub/tree/stable/.agents/skills/pr into .cursor/skills/pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pr", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/opsmill/infrahub.git --path .agents/skills/pr--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add opsmill/infrahub --skill pr -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install opsmill/infrahub pr --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/opsmill/infrahub.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/pr .gemini/skills/pr && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pr" agent skill from https://github.com/opsmill/infrahub/tree/stable/.agents/skills/pr into .gemini/skills/pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pr", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install opsmill/infrahub prInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add opsmill/infrahub --skill pr -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/opsmill/infrahub.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/pr .github/skills/pr && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pr" agent skill from https://github.com/opsmill/infrahub/tree/stable/.agents/skills/pr into .github/skills/pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pr", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add opsmill/infrahub --skill pr -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install opsmill/infrahub pr --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/opsmill/infrahub.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/pr .opencode/skills/pr && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pr" agent skill from https://github.com/opsmill/infrahub/tree/stable/.agents/skills/pr into .opencode/skills/pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pr", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
prOpens a pull request, publishing the current branch as a PR.
PR is an agent skill from opsmill/infrahub. Opens a pull request, publishing the current branch as a PR. TRIGGER when: the user wants to open a pull request, publish the current branch as a PR, or take the current work through to an open PR. DO NOT TRIGGER when: only committing changes → commit; babysitting CI after the PR is already open → monitoring-pull-requests.
Its SKILL.md is about 3.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires a Git working tree and GitHub access (gh CLI authenticated, GitHub MCP server, or equivalent). Works best alongside the commit and…
It sits in Development, covering Pull requests. It works with Git. The repository describes itself as: Infrahub is a graph-based data management platform with built-in version control, CI workflows, peer review, and API access. It’s purpose-built to power reliable infrastructure… The licence is Apache-2.0.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit af1c6c8. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitghFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
claude.aiFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Requires a Git working tree and GitHub access (gh CLI authenticated, GitHub MCP server, or equivalent). Works best alongside the `commit` and `monitoring-pull-requests` skills from this plugin.
From compatibility in the SKILL.md frontmatter.
PR loads about 3.7k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 1,783 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from opsmill/infrahub at commit af1c6c8, republished under its Apache-2.0 licence (© opsmill). 1,783 words, ~3,666 tokens.
.claude/skills/pr/SKILL.md (or your agent's skills folder).Handle the full workflow from current branch state to an open, CI-monitored pull request. This skill enforces branch discipline, analyzes all branch changes for a business-value-focused description, ensures documentation is current, and requires user approval at every step.
It is project-agnostic: base branch, validation commands, documentation layout, and labels are all discovered from the repository itself rather than assumed.
<arguments> $ARGUMENTS </arguments>
Supported arguments:
commit — Stage, commit, and push uncommitted changes before proceeding. Without this argument, no commits are made — the skill works only with what is already committed on the branch.First, verify the agent is on a safe branch and understand the current git state. Branch creation and commit logic are owned by the commit skill — this phase only inspects state and decides what to do next.
git status to see uncommitted/staged/untracked files.git branch --show-current to identify the current branch.git symbolic-ref --short refs/remotes/origin/HEAD (the name after origin/).commit skill's step 2 holds the canonical rules; don't re-derive the list here):commit was passed: proceed to Phase 2; the commit skill will refuse the unsafe branch, propose a properly named feature branch, and ask the user for approval before creating it. Do not pre-create the branch here — let the commit skill own that conversation so the rules stay in one place.commit was NOT passed: STOP. There's no feature branch to open a PR from. Tell the user they need to either invoke /pr commit (so the commit skill creates a branch and captures the changes), or switch to a feature branch first.commit argument is provided)Skip this phase entirely if commit was NOT passed as an argument. If there are uncommitted changes and commit was not provided, warn the user that uncommitted changes exist but will not be included in the PR.
When commit IS provided, run any project-specific prep first, then delegate the actual commit + push to the commit skill so branch discipline, secret hygiene, and message conventions stay in one place:
If the project defines fast validation commands (formatters, linters), run them first. Discover them from the project's own context — AGENTS.md/CLAUDE.md/CONTRIBUTING.md, a Makefile/Taskfile/justfile, package.json scripts, pyproject.toml/tox.ini, or a pre-commit config. If the project defines none, skip this step.
If the project checks in generated artefacts (GraphQL schemas, OpenAPI clients, generated SDK types, protobufs) and their sources were modified, regenerate them using the project's documented commands and include the regenerated files — CI commonly fails on stale generated artefacts.
Invoke the commit skill with the push argument: /commit push. The skill will:
feat/…, fix/…, etc.) for user approval before creating it.--no-verify); fix violations and create a new commit on hook failure.git push -u origin <branch> on first push).Do not duplicate any of that logic inline here. If the user has additional commit-message guidance specific to this PR (e.g., spec or issue reference, conventional-commit scope), pass it along when invoking the skill.
After /commit push returns, confirm the working tree is clean and the branch is published before continuing to Phase 3.
Understand the FULL scope of changes in this branch — not just the latest commit, but everything since it diverged from the base branch. If there's a related spec or issue, use it to understand the business context.
Use the base branch determined in Phase 1 (referred to as <base> below).
View all commits in the branch:
git log origin/<base>..HEAD --onelineView the full diff of all changes:
git diff origin/<base>...HEAD --stat
git diff origin/<base>...HEADCheck for related planning context. If the repository keeps specs, PRDs, or ADRs (e.g. a specs/ directory, docs/adr/, or locations referenced from AGENTS.md/CONTEXT.md), look for one matching this branch — by branch name, by files touched, or by a linked issue. When one exists, read it to understand user scenarios, requirements, and success criteria; it is the primary source for framing the PR's business value. If the repo keeps no such context, skip this step.
Categorize changes by area (e.g. application code, tests, documentation, CI/CD, configuration) using the repository's own layout.
Before opening the PR, ensure that the project's documentation reflects the changes being introduced. Stale docs are worse than no docs.
Discover where this project keeps developer documentation. Probe in this order, and use what actually exists:
AGENTS.md/CLAUDE.md/CONTEXT.md/CONTRIBUTING.md (these often map code areas to docs).dev/, docs/, doc/, ADR directories (docs/adr/, dev/adr/).README.md for user-facing behaviour changes.If the project keeps no developer documentation, note that and skip to Phase 5 — do not invent a documentation structure.
Based on the changes identified in Phase 3, check the docs covering the touched areas:
Commit any approved doc updates to the branch (with a docs: conventional commit, following the repo's commit style).
Push if new commits were added.
Focus on business value — what problem does this solve, what capability does it add? The reviewer should understand WHY before they look at HOW. Reference the spec or issue if one exists.
PR Title: Short, conventional format (under 70 chars), mirroring the repo's existing PR/commit style. Examples:
feat: add environment backup and restore operationsfix: resolve config drift during reconciliationrefactor: migrate inline queries to dedicated filesPR Body Template (adapt to the repository's PR template in .github/PULL_REQUEST_TEMPLATE.md if one exists — the repo template wins):
## Summary
[1-3 sentences: what business problem this solves or what capability it adds.
Frame as outcomes for users/operators, not as code changes.]
## Key Changes
[Bulleted list of the most important changes, framed as outcomes:
- "Operators can now back up and restore environments" NOT "Added backup_service.py"
- "Queries are validated against the schema in CI" NOT "Moved queries to .graphql files"]
## Related Context
[If tied to a spec, PRD, ADR, or issue: link it and highlight the key
requirements addressed. Omit this section if none exists.]
## Documentation Updates
[List any docs that were added or updated as part of this PR.
Omit this section if no docs were changed.]
## Test Plan
[How to verify — test commands to run, manual verification steps, or CI checks to watch]No session-link footer — strip it if the harness added one. Some harnesses append a trailer pointing at the private agent session after your body, typically a bare https://claude.ai/code/session_… URL (or a link wrapping one). Never include it: that URL is internal and usually unshareable, it lands in the project's permanent — often public — PR history, and it references session state no reviewer can open. If the harness inserts such a line, remove it before creating the PR, and never author one yourself. This mirrors the commit skill's step 4 rule for commit messages; legitimate attribution (e.g. a Co-Authored-By trailer or a generic "Generated with" credit) is unaffected.
Labels: Discover the repository's labels with gh label list and pick the ones that fit the change. Don't invent labels; if none fit, omit them.
IMPORTANT: Always present the full PR draft to the user for review BEFORE creating it. Never create a PR without explicit user approval.
Present to the user:
Wait for the user's explicit approval or requested changes.
After approval, create the PR using the GitHub interface available to the agent. First strip any harness-appended session-link footer from the body (see step 5). Examples:
gh pr create --title "[TITLE]" --body "[BODY]" --base <base> --label "[LABELS]"Or, when using the GitHub MCP server, the equivalent create_pull_request call.
Return the PR URL to the user.
monitoring-pull-requests as a Background AgentDon't just open the PR and walk away — but don't re-implement the CI babysitting loop here either, and don't sit blocked in the foreground waiting 30+ minutes for CI to finish. The monitoring-pull-requests skill owns the CI workflow (poll, classify, reproduce narrowly, fix, retry up to 5 times, revert on exhaustion), and CI watching is the textbook "long-running, independent of what the user does next" background task. Spawn it as a background agent so the parent conversation can return control to the user immediately.
Confirm the PR was created and you have the PR number / URL / branch name.
Spawn monitoring-pull-requests as a background agent. Use the runtime's agent-launching mechanism (Claude Code: the Agent tool with run_in_background: true; other runtimes: equivalent background-task primitive). The agent must run with a clean context — give it everything it needs in the prompt rather than relying on parent-conversation state.
Recommended invocation (Claude Code, general-purpose subagent):
Agent(
description: "Monitor PR #<N> CI",
subagent_type: "general-purpose",
run_in_background: true,
prompt: "Invoke the monitoring-pull-requests skill and run its workflow against
PR #<N> on branch <branch>. The PR was just opened by
the /pr skill at commit <sha>; pass that commit as the
expected baseline — monitoring-pull-requests re-captures and verifies
the baseline_commit itself in its Phase 0. Follow every
phase of the skill verbatim, including the narrow-
reproduction-first discipline and the 5-iteration cap.
Produce the skill's final report when you finish."
)Adjust the prompt to match your runtime's agent contract, but always (a) name the monitoring-pull-requests skill as the source of truth, (b) pass the PR number, branch, and baseline commit, and (c) require the skill's final report on completion.
Tell the user what just happened, then return control:
monitoring-pull-requests is now running in the background.Do not poll or re-summarize CI here. The agent's final report is the closing status; surface it to the user when it lands.
If the runtime cannot spawn background agents, fall back to invoking /monitoring-pull-requests <pr-number> synchronously, or — as a last resort — poll gh run list --branch <branch-name> every 30–60 seconds and follow the same narrow-reproduction-first discipline monitoring-pull-requests enforces. Do not push speculative fixes when local reproduction is possible.
Branch Safety:
commit skill's step 2.commit was not passed, warn but do not commit.Business Value Focus:
Documentation Discipline:
A pull request that:
monitoring-pull-requests agent, which owns post-creation CI watching and fix-on-failure asynchronously.© opsmill, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/pr of opsmill/infrahub.
Open the folder on GitHubat commit af1c6c8
PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| PR this skillopsmill/infrahub | 529 | — | ~3.7k | Automated safety check: Pass | Apache-2.0 | |
| Finishing a Development Branchobra/superpowers | 296k | 5 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Understand Diff AnalysisEgonex-AI/Understand-Anything | 85k | 1 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Contributor-First PR MergeHKUDS/OpenHarness | 16k | 1 repos | ~847 | Automated safety check: Pass | MIT | |
| Open Code Review CLIalibaba/open-code-review | 44k | — | ~3.1k | Automated safety check: Pass | Apache-2.0 | |
| Create Pull Requestcline/cline | 70k | 1 repos | ~1.6k | Automated safety check: Pass | Apache-2.0 |
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
Egonex-AI/Understand-Anything
Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.
HKUDS/OpenHarness
Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.
alibaba/open-code-review
Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.
cline/cline
Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.
openinterpreter/openinterpreter
Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.
opsmill/infrahub
Analyzes recent CI failures on pull requests to identify flaky tests, using retry outcomes (failed attempt → green re-run) and cross-PR recurrence as evidence, and maintains a local longitudinal…
opsmill/infrahub
Audits internal (dev/) and external (docs/) documentation completeness for a feature, subject, or set of existing docs, maps changes indicated by the user, across Infrahub's documentation layers…
opsmill/infrahub
Stages and commits the current changes onto a safe working branch, enforcing branch discipline and optionally pushing upstream.
opsmill/infrahub
A skill your agent uses when you've fixed a bug, added a feature, or made any user-facing change in a project that uses Towncrier and need to record it for the changelog — before committing or…
opsmill/infrahub
Turns a single feature idea, improvement, or bug into ONE well-structured GitHub issue.
opsmill/infrahub
Synthesises the current conversation context into a Product Requirements Document and publishes it to GitHub (as a comment on a referenced issue, or a new issue).
Works with
Categories
Opens a pull request, publishing the current branch as a PR. PR is an agent skill from opsmill/infrahub. Opens a pull request, publishing the current branch as a PR.
PR fits situations like: : the user wants to open a pull request; publish the current branch as a PR; take the current work through to an open PR; : only committing changes → commit.
Run `npx skills add opsmill/infrahub --skill pr -a claude-code`. Or copy the skill folder (.agents/skills/pr in opsmill/infrahub) into .claude/skills/pr in your project. Claude Code loads it when a task matches its description.
Run `npx skills add opsmill/infrahub --skill pr -a codex`. Or copy the skill folder (.agents/skills/pr in opsmill/infrahub) into .agents/skills/pr in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add opsmill/infrahub --skill pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr, .gemini/skills/pr, .github/skills/pr and .opencode/skills/pr in your project.
Going by SKILL.md and its folder, PR needs the command-line tools its instructions call (git and gh). Compatibility (from SKILL.md): Requires a Git working tree and GitHub access (gh CLI authenticated, GitHub MCP server, or equivalent). Works best alongside the `commit` and `monitoring-pull-requests` skills from this plugin..
SKILL.md names 1 domain. In commands or code: claude.ai; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
PR is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.7k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with PR: Finishing a Development Branch (obra/superpowers, 296k stars), Understand Diff Analysis (Egonex-AI/Understand-Anything, 85k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Open Code Review CLI (alibaba/open-code-review, 44k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
opsmill (a GitHub organization) maintains it in opsmill/infrahub, which has 529 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on October 7, 2026.
Source: opsmill/infrahub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.