push-pr

push-pr is a skill for Claude Code, Codex from Codagent-AI/agent-skills. It costs 51 tokens per session (935 once invoked), scanned A, original, MIT.

A workflow for committing local code changes, sending them to a remote Git repository, and creating or updating a pull request for the current branch. A pull request is a request for others to review and merge code.

In plain words
What is it for?
Checking changes, creating a commit, pushing the branch, and opening or updating its pull request.
Why use it?
It reduces the repeated manual steps involved in preparing code for review and checks whether validation gates need to run first.

Skill for Claude CodeCodex

Part of the codagent plugin — 27 skills shipped together

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.

agentmods
npx agentmods add skills/codagent-ai/agent-skills/push-pr
Any agent
npx skills add Codagent-AI/agent-skills --skill push-pr
Clone the repo
git clone --depth 1 https://github.com/Codagent-AI/agent-skills

Made for: Claude Code, Codex.

Or install codagent, the plugin that ships this one along with the rest of its 27 skills.

Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 935 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00051 $0.00935
Opus 5 $0.00026 $0.00467
Sonnet 5 $0.00010 $0.00187
Haiku 4.5 $0.00005 $0.00093

Measured 3d ago against content hash 1700727c9b6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

push-pr 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 3d ago.

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.

skills/push-pr/SKILL.md · 68 lines

How it starts

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

codagent:push-pr

Commit all changes, push to the remote, and create or update the pull request for the current branch.

Steps

  1. Run validator detection

    • Run agent-validator detect 2>&1
    • Exit 0 → gates would run, invoke agent-validator:validator-run skill and wait for it to pass before proceeding
    • Exit 2 → no gates would run (no changes or no applicable gates), skip to Step 2
    • Exit 1 → error, report the error to the user and stop
    • Any other exit code → treat as error, report output to the user, and stop
  2. Check for uncommitted changes using git status --porcelain

    • If there are changes, create a commit:
      • Run git diff --staged and git diff to see what's changed
      • Generate a concise, descriptive commit message based on the changes
      • Stage changed files by name (avoid staging sensitive files like .env or credentials)
      • Commit with: git commit -m "message"; add -m "Co-Authored-By: <Name> <email>" only when the co-author identity is explicitly configured or provided by the user
    • If there are no changes, proceed to push check
  3. Push to remote

    • Get current branch: git branch --show-current
    • Push with upstream tracking: git push -u origin <branch>
    • If push fails, show the error and stop
  4. Check if PR exists

    • Query the current branch explicitly: gh pr list --head <branch> --state open --json url,title,state,number,headRefOid --limit 2
    • If the command fails for auth, network, API, or another error, report stderr and stop
    • If the output is invalid JSON or contains more than one open PR, report the unexpected state and stop
    • If exactly one open PR exists, use it; do not let a prior closed or merged PR substitute for it
    • If PR exists and is OPEN:
      • Check if there are new commits by comparing current HEAD with PR's headRefOid
      • If new commits exist:
        • Get default branch: gh repo view --json defaultBranchRef --jq .defaultBranchRef.name
        • Get all commits for the description: git log <default-branch>..HEAD --oneline
        • Regenerate the PR description based on all commits (including the new ones)
        • Update the PR: gh pr edit <pr-number> --body "updated description"
        • Print: "PR updated with new commits: "
      • If no new commits: print "PR already exists: "
    • If no open PR exists:
      • Optionally query gh pr list --head <branch> --state all for context. Treat CLOSED and MERGED as terminal history, not as the current PR.
      • Print that no open PR exists and create a new PR using the steps below.
      • Get default branch: gh repo view --json defaultBranchRef --jq .defaultBranchRef.name
      • Get commit history for PR description: git log <default-branch>..HEAD --oneline
      • Generate a clear PR title and description based on the commits and change context
      • Create PR: gh pr create --base <default-branch> --title "title" --body "description"
      • Print the PR URL

Read the full file on GitHub · 68 lines

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. 3d ago First seen · 68 lines · 51 tokens per session scan A 1700727c9b6b

Subscribe to this mod's changes

push-pr is a skill published in the GitHub repository Codagent-AI/agent-skills (30 stars, last pushed 1mo ago), licensed MIT. It adds 51 tokens to every session and 935 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens