opening-prs

opening-prs is a skill for Claude Code, Codex from oaustegard/claude-skills. It costs 86 tokens per session (1,238 once invoked), scanned A, original, MIT.

A workflow for creating a GitHub pull request through the GitHub API: it creates a branch, uploads files, opens the request, and checks whether it can be merged.

In plain words
What is it for?
Use it to publish files on a new branch, open a pull request, and wait for GitHub's merge status.
Why use it?
It organizes several error-prone steps and prevents changes from being pushed directly to protected branches such as main or master.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to publish files on a new branch, open a pull request, and wait for GitHub's merge status.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/oaustegard/claude-skills/opening-prs
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add oaustegard/claude-skills --skill opening-prs
Clone the repo
git clone --depth 1 https://github.com/oaustegard/claude-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for opening-prs

README.md
[![agentmods](https://agentmods.dev/badge/skills/oaustegard/claude-skills/opening-prs/github.svg)](https://agentmods.dev/skills/oaustegard/claude-skills/opening-prs)
Your own site
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/opening-prs"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/opening-prs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for opening-prs

Your own site · 80×15
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/opening-prs"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/opening-prs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,238 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 91
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00086 $0.01238
Opus 5 $0.00043 $0.00619
Sonnet 5 $0.00017 $0.00248
Haiku 4.5 $0.00009 $0.00124

Measured 7d ago against content hash 757d25a6f04f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

opening-prs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/opening_prs.py, tests/test_opening_prs.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

opening-prs/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Opening PRs

A flowing graph that turns the imperative "create branch, push files, open a PR, poll mergeable_state" workflow into a structural DAG. The "NEVER push directly to main" rule is encoded as a validate= gate that physically can't be skipped.

from opening_prs import open_pr

result = open_pr(
    repo="owner/repo",
    branch_name="feat/cool-thing",
    title="Add cool thing",
    body="## Summary\n\n...",
    files=[
        ("src/cool.py", "<file content>"),
        ("docs/cool.md", "<file content>"),
    ],
    base="main",  # default; protected names are also rejected
)

print(result["pr_url"])             # https://github.com/.../pull/N
print(result["mergeable_state"])    # clean | dirty | unstable | behind | blocked

What this fixes

The gh pr create workflow (or hand-rolled API calls) has five steps in prose form:

  1. Determine the branch name
  2. Get the base branch's HEAD SHA
  3. Create the branch
  4. Push files to the branch
  5. Create the PR
  6. Poll mergeable_state until GitHub finishes computing it

Each step has known failure modes:

  • Step 1: Accidentally pushing to main — the diagnosed pattern that motivated github-procedures §6 in the first place.
  • Step 6: GitHub returns mergeable_state: null immediately after creation. Need to poll. "Wait a few seconds and check" is prose, not a procedure — so it gets skipped under context pressure.

This skill encodes both as flowing primitives:

determine_branch ──▶ guard ──▶ get_base_head ──▶ create_branch
                      │                              │
                      │                              ▼
                      │                        push_files
                      │                              │
                      │                              ▼
                      │                         create_pr
                      │                          /        \
                      │                         ▼          ▼
                      │                  wait_mergeable  present_pr [terminal]
                      │
                      └─ validate=must_not_be_base_branch

Read the full file on GitHub · 144 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 144 lines · 86 tokens per session scan A 757d25a6f04f

Subscribe to this mod's changes

opening-prs is a skill published in the GitHub repository oaustegard/claude-skills (148 stars, last pushed yesterday), licensed MIT. It adds 86 tokens to every session and 1,238 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

address-pr-review

Look at the pull request review comments and address any issues raised.

mnapoli/skill-address-pr-review · 17 tokens

git-workflow

A guide for handling Git repository work safely, including status checks, branches, commits, pushes, pull requests, and rebasing. Git is a version-control system that records code changes and coordinates work between developers.

laolaoshiren/claude-code-skills-zh · 73 tokens

history-portability

Import Claude Code or Codex history and move complete CCAM datasets between machines. Use when rescanning provider history, importing a copied directory, uploading JSONL or archives, exporting a backup, restoring it idempotently, or verifying that tokens, workflows, runs, rules, and pricing survived.

hoangsonww/Claude-Code-Agent-Monitor · 63 tokens

reply-to-pr-threads

Draft, confirm, and post replies to GitHub PR review threads. Handles per-category reply formatting, re-fetches thread resolution state so auto-resolved threads are skipped, and posts via GraphQL. Use when the user asks to "reply to PR threads", "post PR thread replies", or "draft PR reply messages".

tobihagemann/turbo · 71 tokens

suede-play-release

Suede Labs Google Play delivery skill: ship an Android release end to end from the agent interface, without opening the Play Console. Set up credentials, upload an AAB, promote between tracks, stage or complete a rollout, push per-locale release notes, and prove against the Play Developer API what is actually live.…

JasonColapietro/suede-creator-skills · 200 tokens

create-changelog

Create a CHANGELOG.md following keepachangelog.com conventions with version history backfilled from GitHub releases or git tags. Use when the user asks to "create a changelog", "add a changelog", "initialize changelog", "start a changelog", "set up changelog", "generate changelog", or "backfill changelog".

tobihagemann/turbo · 75 tokens