AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Push Pr

skill-codagent-ai-agent-skills-push-pr · by Codagent-AI

>

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-codagent-ai-agent-skills-push-pr

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-codagent-ai-agent-skills-push-pr)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Push Pr? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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
  1. 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: " only when the co-author identity is explicitly configured or provided by the user
  • If there are no changes, proceed to push check
  1. Push to remote
  • Get current branch: git branch --show-current
  • Push with upstream tracking: git push -u origin
  • If push fails, show the error and stop
  1. Check if PR exists
  • Run gh pr view --json url,title,state,number,headRefOid while capturing stdout, stderr, and exit code
  • If the command exits non-zero and stderr indicates no pull requests were found for the branch, treat it as no PR existing and proceed to creation
  • If the command exits non-zero for auth, network, API, or other errors, report stderr and stop
  • If the command succeeds but output is empty or invalid JSON, report the unexpected output and stop
  • Otherwise, parse the state field from the JSON response
  • 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 ..HEAD --oneline
  • Regenerate the PR description based on all commits (including the new ones)
  • Update the PR: gh pr edit --body "updated description"
  • Print: "PR updated with new commits: "
  • If no new commits: print "PR already exists: "
  • If PR exists but is CLOSED:
  • Print: "Previous PR is closed, creating new PR"
  • Create a new PR (follow creation steps below)
  • If no PR exists, create one:
  • Get default branch: gh repo view --json defaultBranchRef --jq .defaultBranchRef.name
  • Get commit history for PR description: git log ..HEAD --oneline
  • Generate a clear PR title and description based on the commits and change context
  • Create PR: gh pr create --base --title "title" --body "description"
  • Print the PR URL
  1. Print the PR URL at the end so it's easy to find

Notes

  • Operates on the current branch — does NOT create or switch branches
  • Uses descriptive commit messages that explain the "why" not just the "what"
  • PR descriptions should summarize the changes and their purpose
  • Always include the PR URL in the final output
  • Can be invoked standalone at any point without prior workflow state

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.