improve-pr

A pull request review that examines code changes for security problems, code-quality issues, performance concerns, and common best-practice violations. A pull request is a proposed change submitted for review before it is merged.

In plain words
What is it for?
Use it to inspect a pull request, review its diff and checks, find issues such as injection risks or exposed secrets, and improve code structure, error handling, and performance.
Why use it?
It brings several kinds of review into one check and identifies changes that may need attention. It can also apply selected improvements automatically.

Skill for Claude CodeCodex

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 skills/smana/cloud-native-ref/improve-pr
Any agent
npx skills add Smana/cloud-native-ref --skill improve-pr
Clone the repo
git clone --depth 1 https://github.com/Smana/cloud-native-ref

Made for: Claude Code, Codex.

Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,181 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.00049 $0.01181
Opus 5 $0.00024 $0.00590
Sonnet 5 $0.00010 $0.00236
Haiku 4.5 $0.00005 $0.00118

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

Security

Grade A, and why

improve-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/skills/improve-pr/SKILL.md · 192 lines

How it starts

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

Improve PR Skill

Performs comprehensive PR analysis combining security review, best practices assessment, and actionable code improvements with auto-apply capability.

Usage

/improve-pr <pr-number>

Workflow

Step 1: Fetch PR and Checkout Branch

# Get PR details
PR_INFO=$(gh pr view $ARGUMENTS --json headRefName,baseRefName,files,title,additions,deletions)
HEAD_BRANCH=$(echo $PR_INFO | jq -r '.headRefName')

# Checkout the PR branch
git fetch origin
git checkout $HEAD_BRANCH
git pull origin $HEAD_BRANCH

# Get the diff
gh pr diff $ARGUMENTS

# Get PR checks status
gh pr checks $ARGUMENTS

Step 2: Comprehensive Analysis

Analyze the code across multiple dimensions:

🔒 Security Analysis:

  • SQL injection vulnerabilities
  • XSS (Cross-Site Scripting) risks
  • Authentication/authorization issues
  • Secrets in code (API keys, passwords)
  • Insecure dependencies
  • CSRF protection
  • Input validation
  • Cryptography weaknesses

🎨 Code Quality:

  • Extract duplicate code into functions
  • Simplify complex conditionals
  • Improve variable/function naming
  • Add error handling
  • Reduce nesting depth
  • Apply SOLID principles

⚡ Performance:

  • Optimize algorithms
  • Reduce database queries (N+1 issues)
  • Add caching where appropriate
  • Lazy load resources
  • Parallel processing opportunities

📖 Readability:

  • Add clarifying comments
  • Break down large functions
  • Improve code organization
  • Use descriptive names

✨ Best Practices:

  • Follow language idioms
  • Use modern syntax
  • Apply design patterns
  • Follow project conventions

🧪 Testing Coverage:

  • Missing unit tests
  • Untested edge cases
  • Error handling tests

Step 3: Generate Report

See references/report-template.md for full template.

Key sections:

  • Overview (files, lines, quality rating)
  • Security analysis (strengths, issues, warnings)
  • Code quality improvements by category
  • File-by-file improvements with before/after
  • Implementation priority (Critical → Low)
  • Testing coverage gaps
  • Impact summary

Read the full file on GitHub · 192 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 192 lines · 49 tokens per session scan A c2740f1dec22

Subscribe to this mod's changes

improve-pr is a skill published in the GitHub repository Smana/cloud-native-ref (99 stars, last pushed 2d ago), licensed Apache-2.0. It adds 49 tokens to every session and 1,181 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-30.

Related

Other skills, from other repositories

geoserver-cloud

Use when deploying GeoServer on Kubernetes as cloud-native microservices with auto-scaling, service discovery, and centralized configuration. GeoServer Cloud: break monolithic GeoServer into independently scalable WMS/WFS/WCS services.

znlgis/opengis-skills · 49 tokens

Cloud Security & Container Hardening

AWS/Azure/GCP security auditing, container and Kubernetes hardening, Infrastructure as Code scanning, and cloud compliance assessment.

Masriyan/Claude-Code-CyberSecurity-Skill · 30 tokens

kubernetes-agent

Kubernetes production patterns — manifests, resource sizing, health probes, scaling, secrets, networking, and troubleshooting.

chandrudp29/skillhub · 25 tokens

container-security

Performs a container and Kubernetes security review against the CIS Docker Benchmark v1.6.0, CIS Kubernetes Benchmark v1.9.0, and NIST SP 800-190. Auto-invoked when reviewing Dockerfiles, Kubernetes manifests, Helm charts, or container orchestration configurations. Evaluates image security, runtime hardening, RBAC…

UnitOneAI/SecuritySkills · 96 tokens

r00-anthropics-skills--devops

☁️ DevOps & Cloud Infrastructure skill suite derived from anthropics/skills. CI/CD pipelines, container orchestration, IaC, monitoring and incident response. Provides 10 specialised commands for devops, cloud, docker workflows.

CooperUncouple/r03-anthropics-skills-devops · 59 tokens

r00-vincenthopf-My-Claude-Code--devops

☁️ DevOps & Cloud Infrastructure skill suite derived from vincenthopf/My-Claude-Code. CI/CD pipelines, container orchestration, IaC, monitoring and incident response. Provides 10 specialised commands for devops, cloud, docker workflows.

MartinUpgrade/r12-vincenthopf-my-claude-code-devops · 65 tokens