prep-pr

prep-pr is a command for coding agents from dansasser/claude-code-marketplace. It costs 8 tokens per session (765 once invoked), scanned A, original, MIT.

A command that prepares a Git branch for a pull request and optionally a release. It checks the project, runs local continuous-integration checks, commits and pushes changes, and creates a detailed pull request.

In plain words
What is it for?
Use it to validate Python or Node.js projects, check lock files and Git state, create or verify CI, push changes, open pull requests, auto-merge them, or create release tags.
Why use it?
It brings common release checks into one repeatable workflow and can resume after a failure. Continuous integration is automated checking such as linting, type checking, testing, and building.

Command

Part of the pr-prep plugin — 1 command, 2 agents 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 commands/dansasser/claude-code-marketplace/prep-pr
Clone the repo
git clone --depth 1 https://github.com/dansasser/claude-code-marketplace

Or install pr-prep, the plugin that ships this one along with the rest of its 1 command, 2 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 prep-pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/dansasser/claude-code-marketplace/prep-pr.svg)](https://agentmods.dev/commands/dansasser/claude-code-marketplace/prep-pr)
Your own site
<a href="https://agentmods.dev/commands/dansasser/claude-code-marketplace/prep-pr"><img src="https://agentmods.dev/badge/commands/dansasser/claude-code-marketplace/prep-pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 765 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.00008 $0.00765
Opus 5 $0.00004 $0.00382
Sonnet 5 $0.00002 $0.00153
Haiku 4.5 $0.00001 $0.00076

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

Security

Grade A, and why

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

plugins/pr-prep/commands/prep-pr.md · 96 lines

How it starts

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

Prepare PR

Automate the complete PR preparation workflow from any branch state to published package.

What This Command Does

  1. Detects your environment and project type (Python or Node.js)
  2. Validates CI workflow exists (creates one if missing)
  3. Analyzes git state (uncommitted, unstaged, unpushed changes)
  4. Checks lock file consistency
  5. Runs local CI (lint, type, test, build) with smart error recovery
  6. Commits changes if needed
  7. Pushes to remote
  8. Creates detailed PR with Mermaid diagrams

Usage

/prep-pr              # Full pipeline
/prep-pr --no-push    # Run CI only, don't push
/prep-pr --resume     # Resume from last failure
/prep-pr --merge      # Auto-merge after CI passes
/prep-pr --release    # Create version tag after merge

Options

  • --no-push - Run local CI validation only, don't push or create PR
  • --resume - Resume from last saved state (useful after fixing errors)
  • --merge - Wait for GitHub CI, then auto-merge the PR
  • --release - After merge, create a version tag for release

Requirements

  • Git repository with a remote configured
  • Python 3.10+ (for running helper scripts)
  • For Python projects: ruff, mypy, pytest, build
  • For Node projects: npm/yarn/pnpm/bun, eslint, tsc

Example Workflow

$ /prep-pr

[INFO] Starting PR preparation...
[OK] Environment: Windows 11, PowerShell
[OK] Project: Python (pip), pyproject.toml detected
[OK] Workflow: .github/workflows/ci.yml exists
[INFO] Analyzing git state...
[OK] Branch: feature/auth (3 commits ahead of main)
[INFO] Running local CI...
[OK] lint (ruff) - 1.2s
[OK] type (mypy) - 3.4s
[OK] test (pytest) - 8.7s
[OK] build - 2.1s
[INFO] Pushing to origin/feature/auth...
[OK] Pushed successfully
[INFO] Creating pull request...
[OK] PR #42 created: https://github.com/user/repo/pull/42

Error Recovery

If CI fails, the system will:

  1. Diagnose the error type (dependency, lock file, stale artifacts, cache)
  2. Attempt automatic recovery for recoverable errors
  3. Report clearly if manual intervention is needed

Read the full file on GitHub · 96 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. 4d ago First seen · 96 lines · 0 tokens per session scan A 9bbfd611635e

Subscribe to this mod's changes

prep-pr is a command published in the GitHub repository dansasser/claude-code-marketplace (9 stars, last pushed 4mo ago), licensed MIT. It adds 8 tokens to every session and 765 once invoked, about $0.0000 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-31.