pr

pr is a command for Claude Code from NaanyaBiz/haggle. It costs 0 tokens per session (1,398 once invoked), scanned A, original, Apache-2.0.

A command that audits documentation, pushes the current feature branch, and opens a GitHub pull request. A pull request is a request for a repository's changes to be reviewed and merged.

In plain words
What is it for?
Use it to prepare and submit a feature branch for review after updating its documentation.
Why use it?
It checks that the work is committed, is not being sent directly from the main branch, and is based on the latest main branch before opening the request.

Command for Claude Code

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 commands/naanyabiz/haggle/pr
Clone the repo
git clone --depth 1 https://github.com/NaanyaBiz/haggle

Made for: Claude Code.

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 pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/naanyabiz/haggle/pr.svg)](https://agentmods.dev/commands/naanyabiz/haggle/pr)
Your own site
<a href="https://agentmods.dev/commands/naanyabiz/haggle/pr"><img src="https://agentmods.dev/badge/commands/naanyabiz/haggle/pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,398 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.1 $0.00000 $0.01398
Opus 5 $0.00000 $0.00699
Sonnet 5 $0.00000 $0.00280
Haiku 4.5 $0.00000 $0.00140

Measured today against content hash b20c93d7c9c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

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 today.

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/commands/pr.md · 152 lines

How it starts

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

/pr

Push the current feature branch and open a GitHub pull request, after running a full documentation audit.

Usage

/pr
/pr <optional PR title override>

Pre-conditions (check before proceeding)

  1. Working tree is clean (git status --porcelain returns empty). If dirty, stop and tell the user to commit or stash first.
  2. Not on main — never open a PR from main. If on main, stop and report the error.
  3. Branch is rebased onto current main. Run git fetch origin, then check git rev-list HEAD..origin/main --count. If the count is > 0 (main has commits this branch doesn't have):
    • Run git rebase origin/main.
    • If it succeeds (exit 0), continue — but note that history was rewritten, so a git push --force-with-lease origin <branch> will be needed in Step 3.
    • If it has conflicts, stop immediately: list the conflicting files from git diff --name-only --diff-filter=U, tell the user to resolve them manually and re-run /pr when done. If count is 0 (already up to date), continue with a regular push in Step 3.

Steps

1. Gather context

Run these in parallel:

  • git log main..HEAD --oneline — list commits on this branch.
  • git diff main..HEAD --stat — files changed.
  • Read CHANGELOG.md (current ## [Unreleased] section).
  • Read AGENTS.md (Repo Map + AGL API sections).

2. Documentation audit (REQUIRED — do not skip)

Work through the full checklist from AGENTS.md § Documentation Checklist. All four artifact types must be addressed before the PR is opened.

CHANGELOG.md — add bullet(s) under the appropriate sub-heading (### Added, ### Changed, ### Fixed) in ## [Unreleased]. One concise sentence per logical capability. Do not duplicate existing entries.

AGENTS.md — Repo Map — add any new files introduced by this branch; update descriptions if a file's role changed. Cross-check by running:

find custom_components/haggle tests -name "*.py" | sort

AGENTS.md — AGL API — if this branch corrected an API fact (endpoint, field name, token lifetime, header), update that bullet now.

Read the full file on GitHub · 152 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. today First seen · 152 lines · 0 tokens per session scan A b20c93d7c9c2

Subscribe to this mod's changes

pr is a command published in the GitHub repository NaanyaBiz/haggle (13 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,398 tokens. 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-04.