pr

A pull-request or merge-request description generator based on the changes in Git and, when available, a software specification.

In plain words
What is it for?
Use it to prepare structured descriptions for GitHub pull requests or GitLab merge requests, including the relevant project language and constitution rules.
Why use it?
It saves you from manually reconstructing what changed and checking it against project rules before opening a code review.

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/zts0hg/codexspec/pr
Clone the repo
git clone --depth 1 https://github.com/Zts0hg/codexspec

Made for: Claude Code.

Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,530 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.00031 $0.04530
Opus 5 $0.00015 $0.02265
Sonnet 5 $0.00006 $0.00906
Haiku 4.5 $0.00003 $0.00453

Measured 2d ago against content hash 4eea0ff80aaf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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/commands/codexspec/pr.md · 635 lines

How it starts

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

Constitution Compliance (MANDATORY)

Before generating PR description:

  1. Check for Constitution File: Look for .codexspec/memory/constitution.md
  2. If Constitution Exists:
    • Load and read relevant principles (especially documentation standards, code review guidelines)
    • Ensure PR description reflects constitutional principles
    • Verify that the changes align with project quality standards
  3. If No Constitution Exists: Proceed with standard PR generation

Language Preference

IMPORTANT: Before generating PR descriptions, read the project's language configuration from .codexspec/config.yml.

PR description language priority:

  1. If language.commit is set, use that language for the PR description
  2. Otherwise, use language.output as fallback
  3. If neither is configured, default to English

Note:

  • Technical terms (e.g., API, JWT, OAuth, PR, MR) may remain in English when appropriate
  • The PR title and section headers should follow the configured language

Examples:

  • output: "zh-CN" + commit: "en" → Chinese interactions, English PR descriptions
  • output: "zh-CN" + commit: "zh-CN" → Chinese for both
  • output: "zh-CN" + no commit setting → Chinese for both (fallback)

User Input

$ARGUMENTS

Parameters

Parse $ARGUMENTS for the following optional parameters:

Parameter Default Description
--target-branch <branch> origin/main Branch to compare against
--output <file> (none) Save output to file instead of terminal
--sections <list> all Comma-separated sections to include
--spec <path> (none) Enable spec.md integration (opt-in)

--sections Values

  • summary - High-level overview of changes
  • changes - Detailed file changes and technical approach
  • testing - Test coverage information
  • verify - Verification steps
  • checklist - Pre-merge checklist
  • notes - Additional notes and breaking changes
  • all - Include all sections (default)

Read the full file on GitHub · 635 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. 2d ago First seen · 635 lines · 31 tokens per session scan A 4eea0ff80aaf

Subscribe to this mod's changes

pr is a command published in the GitHub repository Zts0hg/codexspec (5 stars, last pushed 3d ago), licensed MIT. It adds 31 tokens to every session and 4,530 once invoked, about $0.0002 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.