to-pr

to-pr is a skill for Claude Code from helderberto/agent-skills. It costs 25 tokens per session (1,416 once invoked), scanned A, original, MIT.

A process for preparing and opening a GitHub pull request, which is a proposed set of code changes for review and merging. It checks the branch, commits, project rules, and continuous integration, or CI, results before opening the request.

In plain words
What is it for?
Use it to inspect a branch, run its required checks, push it, create a pull request from the repository template, and monitor CI.
Why use it?
It catches repository and review requirements before changes are submitted. Optional modes can scan for secrets or skip CI when the change has nothing to test.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the hb plugin — 37 skills, 4 agents shipped together

Good fit Use it to inspect a branch, run its required checks, push it, create a pull request from the repository template, and monitor CI.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/helderberto/agent-skills/to-pr
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 helderberto/agent-skills --skill to-pr
Clone the repo
git clone --depth 1 https://github.com/helderberto/agent-skills

Made for: Claude Code.

Or install hb, the plugin that ships this one along with the rest of its 37 skills, 4 agents.

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 to-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/helderberto/agent-skills/to-pr/github.svg)](https://agentmods.dev/skills/helderberto/agent-skills/to-pr)
Your own site
<a href="https://agentmods.dev/skills/helderberto/agent-skills/to-pr"><img src="https://agentmods.dev/badge/skills/helderberto/agent-skills/to-pr/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 to-pr

Your own site · 80×15
<a href="https://agentmods.dev/skills/helderberto/agent-skills/to-pr"><img src="https://agentmods.dev/badge/skills/helderberto/agent-skills/to-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,416 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.
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.00025 $0.01416
Opus 5.5 $0.00010 $0.00566
Sonnet 5.5 $0.00005 $0.00283
Haiku 4.5 $0.00003 $0.00142

Measured 4d ago against content hash 0c578fcdab44, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

to-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 4d 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/to-pr/SKILL.md · 84 lines

How it starts

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

To PR

Arguments: $ARGUMENTS

  • --safe — scan the branch for secrets and sensitive data before pushing (step 6).
  • --skip-ci — mark the pushed HEAD commit [skip ci] so CI doesn't run, and skip the CI watch. Only when CI has nothing to check (docs, prose). Required checks then stay pending and block the merge, and a squash merge can carry the marker to the base branch. Say why in the PR body.
  • --diagram[=flow|sequence|class|state] — make the Summary visual a mermaid diagram. No type → the Visuals row for the change, else flow.

Workflow

  1. gh auth status. Not logged in → stop: "Run ! gh auth login, then /hb:to-pr again."
  2. In parallel: base branch (git remote show origin | grep 'HEAD branch'), ticket id from the branch name ([A-Z]+-[0-9]+) or the matching spec's ticket: frontmatter, PR template (.github/pull_request_template.md, .github/PULL_REQUEST_TEMPLATE.md, .github/PULL_REQUEST_TEMPLATE/, docs/pull_request_template.md, pull_request_template.md).
  3. In parallel: git diff <base>...HEAD and the full commit list — review every commit, not just the latest.
  4. Gate:
    • Call the Skill tool with check. FAIL → report, stop.
    • ADR check: the diff adds a dependency or a module, changes a public API, or adds a migration, and nothing in docs/adr/ covers it → offer to call the Skill tool with to-adr before pushing.
  5. Uncommitted work → call the Skill tool with commit (never open a PR on a dirty tree).
  6. --safe → call the Skill tool with safe-repo, passing --diff <base>. Findings → report each file:line, then ask: fix first (Recommended) or push anyway.
  7. Push with -u. On the default branch → confirm first. Rejected as non-fast-forward → git pull --rebase, retry once. Never force push.
    • --skip-ci → first git commit --allow-empty -m "chore: [skip ci]", so HEAD carries the marker.
  8. Draft the title and a concise body from the diff, the commits, and the conversation. Answer every field yourself; never ask the user.
    • Title matches ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(.*\))?: .+$.
    • Template found → it is the body, verbatim structure: fill every section and placeholder, check applicable boxes, add nothing outside it. Its summary section carries the visual, its testing section the Evidence, its risk section the Merge Danger. No template → assets/pr-template.md, filled the same way.
    • Evidence you can't show → say what wasn't verified. Never invent it.
    • Reference the ticket in the summary (Resolves TICKET-123).
  9. gh pr create with a HEREDOC body. Return the URL.
  10. gh pr checks --watch (skipped with --skip-ci). Red → call the Skill tool with debug on the failing check, fix, commit, push. At most 2 rounds; still red → stop and report the failing checks.

Read the full file on GitHub · 84 lines

Files

What ships with it

1 file 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. 4d ago First seen · 84 lines · 25 tokens per session scan A 0c578fcdab44

Subscribe to this mod's changes

to-pr is a skill published in the GitHub repository helderberto/agent-skills (17 stars, last pushed 3d ago), licensed MIT. It adds 25 tokens to every session and 1,416 once invoked, about $0.0001 per session on Opus 5.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-10-12.

Related

Other skills, from other repositories

git-workflow-and-versioning

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple…

addyosmani/agent-skills · 89 tokens

git-workflow-and-versioning

A guide to using Git, a system for tracking code changes, branches, and saved versions. It recommends small, focused commits and short-lived feature branches while keeping the main branch deployable.

vinvcn/addyosmani-agent-skills-zh · 97 tokens

shipping-and-launch

A production-release checklist and planning guide for putting software in front of real users. It covers testing, security, monitoring, staged rollout, and rollback, which means returning to the previous working version.

vinvcn/addyosmani-agent-skills-zh · 49 tokens

argocd

Expert Argo CD GitOps assistance covering Application CRDs, sync policies, automated self-healing, Helm/Kustomize, and multi-cluster deployments. Use when managing Kubernetes deployments via GitOps.

G1Joshi/Agent-Skills · 44 tokens

github-actions

Expert GitHub Actions assistance covering workflow syntax, matrices, composite actions, caching, environments, and OIDC AWS/GCP auth. Use when building robust CI/CD automation pipelines.

G1Joshi/Agent-Skills · 38 tokens

gitlab-ci

Expert GitLab CI/CD assistance covering .gitlab-ci.yml, stages, artifacts, caching, GitLab Runners, and Auto DevOps. Use when configuring continuous integration and deployment pipelines on GitLab.

G1Joshi/Agent-Skills · 45 tokens