pr-enhance

pr-enhance is a command for Claude Code from HermeticOrmus/LibreUIUX-Claude-Code. It costs 0 tokens per session (4,495 once invoked), scanned A, a copy of pr-enhance, MIT.

A command for improving pull requests, which are proposed changes submitted for review and merging. It analyses the changes and prepares descriptions, context, testing information, and review guidance.

In plain words
What is it for?
Use it to summarise changed files, describe the type and possible impact of changes, check test coverage, improve documentation, and prepare review-friendly pull requests.
Why use it?
It helps make pull requests easier to understand and review. Clearer context and test information reduce back-and-forth between authors and reviewers.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to summarise changed files, describe the type and possible impact…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hermeticormus/libreuiux-claude-code/pr-enhance
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/HermeticOrmus/LibreUIUX-Claude-Code

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-enhance

README.md
[![agentmods](https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/pr-enhance.svg)](https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/pr-enhance)
Your own site
<a href="https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/pr-enhance"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/pr-enhance.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 4,495 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod 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.04495
Opus 5 $0.00000 $0.02247
Sonnet 5 $0.00000 $0.00899
Haiku 4.5 $0.00000 $0.00449

Measured 3d ago against content hash 919305db4b5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

pr-enhance scanned grade A with 1 finding 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 3d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(cmd.split(), capture_output=True, text=True)
Origin

This is a copy

92% identical to pr-enhance — 149 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/comprehensive-review/commands/pr-enhance.md · 697 lines

How it starts

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

Pull Request Enhancement

You are a PR optimization expert specializing in creating high-quality pull requests that facilitate efficient code reviews. Generate comprehensive PR descriptions, automate review processes, and ensure PRs follow best practices for clarity, size, and reviewability.

Context

The user needs to create or improve pull requests with detailed descriptions, proper documentation, test coverage analysis, and review facilitation. Focus on making PRs that are easy to review, well-documented, and include all necessary context.

Requirements

$ARGUMENTS

Instructions

1. PR Analysis

Analyze the changes and generate insights:

Change Summary Generator

import subprocess
import re
from collections import defaultdict

class PRAnalyzer:
    def analyze_changes(self, base_branch='main'):
        """
        Analyze changes between current branch and base
        """
        analysis = {
            'files_changed': self._get_changed_files(base_branch),
            'change_statistics': self._get_change_stats(base_branch),
            'change_categories': self._categorize_changes(base_branch),
            'potential_impacts': self._assess_impacts(base_branch),
            'dependencies_affected': self._check_dependencies(base_branch)
        }
        
        return analysis
    
    def _get_changed_files(self, base_branch):
        """Get list of changed files with statistics"""
        cmd = f"git diff --name-status {base_branch}...HEAD"
        result = subprocess.run(cmd.split(), capture_output=True, text=True)
        
        files = []
        for line in result.stdout.strip().split('\n'):
            if line:
                status, filename = line.split('\t', 1)
                files.append({
                    'filename': filename,
                    'status': self._parse_status(status),
                    'category': self._categorize_file(filename)
                })
        
        return files
    
    def _get_change_stats(self, base_branch):
        """Get detailed change statistics"""
        cmd = f"git diff --shortstat {base_branch}...HEAD"
        result = subprocess.run(cmd.split(), capture_output=True, text=True)
        
        # Parse output like: "10 files changed, 450 insertions(+), 123 deletions(-)"
        stats_pattern = r'(\d+) files? changed(?:, (\d+) insertions?\(\+\))?(?:, (\d+) deletions?\(-\))?'
        match = re.search(stats_pattern, result.stdout)
        
        if match:
            files, insertions, deletions = match.groups()
            return {
                'files_changed': int(files),
                'insertions': int(insertions or 0),
                'deletions': int(deletions or 0),
                'net_change': int(insertions or 0) - int(deletions or 0)
            }
        
        return {'files_changed': 0, 'insertions': 0, 'deletions': 0, 'net_change': 0}
    
    def _categorize_file(self, filename):
        """Categorize file by type"""
        categories = {
            'source': ['.js', '.ts', '.py', '.java', '.go', '.rs'],
            'test': ['test', 'spec', '.test.', '.spec.'],
            'config': ['config', '.json', '.yml', '.yaml', '.toml'],
            'docs': ['.md', 'README', 'CHANGELOG', '.rst'],
            'styles': ['.css', '.scss', '.less'],
            'build': ['Makefile', 'Dockerfile', '.gradle', 'pom.xml']
        }
        
        for category, patterns in categories.items():
            if any(pattern in filename for pattern in patterns):
                return category
        
        return 'other'

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

Subscribe to this mod's changes

pr-enhance is a command published in the GitHub repository HermeticOrmus/LibreUIUX-Claude-Code (101 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,495 tokens. A static security scan graded it A with 1 finding (runs shell commands). It is 92% identical to pr-enhance, differing in 149 lines, and is treated as a copy.