gh-pr-changelog

gh-pr-changelog is a command for Claude Code from james-prodopen/emcmd. It costs 0 tokens per session (1,273 once invoked), scanned A, original, MIT.

A command that creates a changelog from pull requests recently merged into a GitHub repository.

In plain words
What is it for?
It is for listing merged pull requests from the main branch, optionally limited to a number of days or a GitHub author.
Why use it?
It gathers merged changes for a chosen period in one summary, avoiding manual review of the repository's pull-request history.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit It is for listing merged pull requests from the main branch, optionally limited to a number of days or a GitHub author.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/james-prodopen/emcmd/gh-pr-changelog
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.

Clone the repo
git clone --depth 1 https://github.com/james-prodopen/emcmd

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 gh-pr-changelog

README.md
[![agentmods](https://agentmods.dev/badge/commands/james-prodopen/emcmd/gh-pr-changelog.svg)](https://agentmods.dev/commands/james-prodopen/emcmd/gh-pr-changelog)
Your own site
<a href="https://agentmods.dev/commands/james-prodopen/emcmd/gh-pr-changelog"><img src="https://agentmods.dev/badge/commands/james-prodopen/emcmd/gh-pr-changelog.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,273 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.00000 $0.01273
Opus 5 $0.00000 $0.00636
Sonnet 5 $0.00000 $0.00255
Haiku 4.5 $0.00000 $0.00127

Measured 7d ago against content hash c03107dd3a08, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

gh-pr-changelog 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 7d 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.

commands/gh-pr-changelog.md · 101 lines

How it starts

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

Generate changelog for recent PRs merged into main (args: owner/repo days author). Arguments: $ARGUMENTS

Arguments

Arguments must be provided in order, space-separated:

  1. Repository (required): Format owner/repo
  2. Days (optional): Number of days back to search for PRs - Default is 7, use a number like 3, 14, or 30
  3. Author (optional): Filter by author - GitHub username

Workflow

Follow these instructions explicitly:

  1. Parse $ARGUMENTS in order to extract repository (required), days (default: 7), and author filter:
    • First argument: Repository in format owner/repo - REQUIRED, if not provided, ask the user for it
    • Second argument (optional): Days as a number (e.g., 3, 7, 14, 30) - defaults to 7 if not provided
    • Third argument (optional): Author as a GitHub username
  2. Build the gh command:
    • gh pr list --repo owner/repo --search "base:main merged:>={today's date - N days} [author:username]" --state merged --json number,title,author,mergedAt,url
    • Replace N with the number of days from step 1 (e.g., 7, 14, 30)
    • Replace [author:username] with the author filter if provided, otherwise omit it
  3. For each PR found, use gh pr view <number> --repo owner/repo --json number,title,body,author,mergedAt,mergedBy,url,additions,deletions,changedFiles,files,labels,comments,reviews to fetch complete PR details including all comments and reviews
  4. For each PR, use gh pr diff <number> --repo owner/repo to get the full code diff/patch
  5. Analyze the PR to understand what functionality was added, modified, or removed:
    • Review the diff to identify what changed in the code
    • Read the PR title, body/description, and all comments for context about the purpose and intent
    • Review any discussion in comments and reviews for additional context about decisions made
    • Use the labels to help categorize the type of change (bug, enhancement, etc.)
  6. Generate a functional changelog entry for each PR based on the comprehensive analysis
  7. Present all changelog entries in chronological order (most recent first)

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

Subscribe to this mod's changes

gh-pr-changelog is a command published in the GitHub repository james-prodopen/emcmd (5 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,273 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-08-31.