push-and-pr

A Git workflow for pushing the current branch and opening a GitHub pull request, which is a request to review and merge code. It follows a rebase-based workflow and prepares a structured pull request.

In plain words
What is it for?
Use it to check that work is committed, rebase a feature branch onto main, push it safely, check for an existing pull request, and create or update one with testing and risk details.
Why use it?
It removes repetitive checks around branch state, synchronization, pushing, and pull-request creation while guarding against accidental work on the main branch.

Skill for Claude CodeCodex

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/defaultperson/agent-setup/push-and-pr
Any agent
npx skills add DefaultPerson/agent-setup --skill push-and-pr
Clone the repo
git clone --depth 1 https://github.com/DefaultPerson/agent-setup

Made for: Claude Code, Codex.

Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 616 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.00061 $0.00616
Opus 5 $0.00030 $0.00308
Sonnet 5 $0.00012 $0.00123
Haiku 4.5 $0.00006 $0.00062

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

Security

Grade A, and why

push-and-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.

.claude/skills/push-and-pr/SKILL.md · 49 lines

What it actually says

Context

  • Status: !git status
  • Branch: !git branch --show-current
  • Remote: !git remote -v
  • Unpushed commits: !git log @{u}..HEAD --oneline 2>/dev/null || echo "No upstream set"

Git Rules

  • Trunk-based development with rebase (linear history)
  • PR title = Conventional Commit format, ≤72 chars
  • PR description: what / why / how to test / risks
  • PR base always main, merge strategy: Rebase and merge
  • --force-with-lease only on personal feature branches after rebase
  • Use gh for all GitHub operations
  • Large PRs (>400 LOC) — consider splitting

Algorithm

  1. Guard: git status — ensure working tree is clean (everything committed).
    • If on main: ask user (AskUserQuestion): "You're on main. Push directly or create a feature branch for PR?"
      • Push directly: git push origin main → output "Pushed to main." STOP.
      • Create branch: help create feature branch, switch to it, then continue.
    • If on feature branch: continue.
  2. Sync: git fetch origingit rebase origin/maingit push -u origin HEAD --force-with-lease.
  3. PR:
    • Check if PR exists: gh pr view --json number — if exists, just push updates.
    • Create: gh pr create --base main --head <current-branch>.
    • Title: Conventional Commit format.
    • Body: what / why / how to test / risks.
  4. Checks: gh pr checks --watch — if failing, diagnose and fix, re-push.
  5. Review: Review using repo's PR template/checklist if present.
  6. Merge: All checks green → ask user (AskUserQuestion): "Merge and delete branch?"
    • Yes: gh pr merge --rebasegit switch main && git pull origin maingit branch -D <branch> && git push origin --delete <branch>.
    • No: output PR link and stop.
  7. Output: PR link, check statuses, summary of what was done.

Act immediately — no confirmation needed (except merge step).

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 · 49 lines · 61 tokens per session scan A ab4a597b4832

Subscribe to this mod's changes

push-and-pr is a skill published in the GitHub repository DefaultPerson/agent-setup (11 stars, last pushed 1mo ago), licensed MIT. It adds 61 tokens to every session and 616 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

bark-notify-test

Send a Bark verification notification for the current Claude Code Bark setup on macOS or Windows. Use when the user wants to test delivery, confirm encryption works, or check whether the configured completion notification is healthy.

RUIIIOVO/claude-code-bark-notify · 47 tokens

bark-notify

Use this skill whenever the user wants Claude Code to notify an iPhone through Bark when a task, turn, or coding session finishes. Works on macOS, Linux, and Windows. Trigger on requests about Bark notifications, Claude completion alerts, iPhone push reminders, completion messages, Bark hook setup, or Bark…

RUIIIOVO/claude-code-bark-notify · 81 tokens

bark-notify-setup

Set up Bark completion notifications for Claude Code on macOS or Windows by safely writing the local Bark sender script and merging hooks into /.claude/settings.json. Use when the user explicitly asks to configure Bark for them or to directly install the completion notification flow.

RUIIIOVO/claude-code-bark-notify · 58 tokens

bark-notify-uninstall

Remove Bark notification configuration from Claude Code on macOS, Linux, or Windows. Use when the user wants to uninstall, remove, or clean up Bark notifications, delete the Bark hook, or reset their Bark setup.

RUIIIOVO/claude-code-bark-notify · 50 tokens

at-vision

Inspect screenshots, photos, diagrams, image paths, and image URLs when the task depends on visible content. Use when the prompt lacks actual image content, native inspection fails, or the user requests inspectimage; prefer the MCP tool, then the installed CLI.

kairyou/agent-tools · 55 tokens

decision-ledger

Maintain an append-only decision ledger (DECISIONS.md). Use when the user confirms a decision, reverses or changes a past decision, asks what was decided and why, or at session start to load standing decisions.

svy04/ballast · 48 tokens