Lean Pr Review logo

Lean Pr Review

Community
ahmadrosid
lean-pr-review

Review a GitHub PR for major issues first, then unnecessary complexity. Approve the reviewed PR and open a separate fix PR for verified findings. Do not post review comments or wait for the author to fix issues. Use for a lean PR review, /lean-pr-review, /lean-review, or over-engineering feedback on a PR.

Overview

Publisherahmadrosid
Repositorynakama
Skill namelean-pr-review
Stars
492
Forks
91
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ahmadrosid on GitHub. Read the source before you install it.

Installation

Install the Lean Pr Review AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ahmadrosid/nakama/tree/main/.agents/skills/lean-pr-review
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ahmadrosid/nakama.git /tmp/nakama
mkdir -p .claude/skills
cp -r /tmp/nakama/.agents/skills/lean-pr-review .claude/skills/lean-pr-review
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Lean Pr Review in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Lean Pr Review on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Lean Pr Review is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Lean PR review

Review a GitHub PR for major issues, then over-engineering. Never mention internal frameworks, scoring tags, or this skill by name in comments or commit messages.

Input

PR URL or number (e.g. https://github.com/OWNER/REPO/pull/N).

Default: approve and open a fix PR

“Accept” means approve, not merge. For any author, fix verified findings in a separate PR instead of posting comments or waiting for the author. Explicit user instructions override this default.

Steps

  1. Fetch the PR with gh (REST preferred):

    • Metadata: title, body, base/head, author login, additions/deletions, changed files
    • Full diff for every changed file
    • Head SHA (needed to approve the reviewed version and prepare fixes)
    • Authenticated login: gh api user --jq .login
  2. First trace the changed behavior and its callers. Find concrete major issues: broken behavior, security or data exposure, data loss, or serious performance regressions. Report only issues supported by a clear failure scenario. Do not invent risks or flag style nits and minor test gaps. Fix these findings before any complexity findings.

  3. Then review for unnecessary complexity. A single smoke / assert-based self-check is fine — never ask to delete it.

    Ask: what can get shorter or go away without losing behavior?

    Look for:

    • Dead code, unused flexibility, speculative features → cut
    • Hand-rolled stdlib / platform features → use the built-in
    • Abstraction with one implementation, config nobody sets, layer with one caller
    • Same logic in fewer lines
    • Tests that re-prove the same property twice (e.g. two phases inside one try/finally when one hang + one failure already covers the lock)

    If neither pass finds anything, proceed to approval without inventing nits.

  4. Draft findings privately as file:Lline: problem, impact, and concrete fix for major issues, or file:Lline: what to cut. what replaces it. for lean cuts.

  5. If findings exist, prepare and open the separate fix PR below. Then re-fetch the original PR head SHA. If it changed, review the new changes and update the fixes before approving.

  6. Approve the reviewed SHA for an open PR by someone else using REST:

    bash
    gh api repos/OWNER/REPO/pulls/N/reviews --method POST --input review.json

    Write review.json with commit_id set to the reviewed head SHA and event set to APPROVE. Omit body and comments. GitHub does not allow approving your own PR; skip approval in that case. Skip approval for closed or merged PRs. Report API or permission failures in chat; do not substitute a comment or claim approval succeeded.

  7. Return the approval URL and fix PR URL with a short summary of the fixes. With no findings, return “LGTM” and the approval URL. Briefly state if approval was skipped or failed.

Separate fix PR

  1. Check out the reviewed head SHA in an isolated worktree when practical. Create a new branch, such as fix/pr-N-review, so the user's checkout stays untouched. Do not push fixes to the original PR branch.
  2. Fix verified major issues first, then apply lean cuts as minimal edits. No drive-by refactors beyond the findings.
  3. Run the smallest relevant tests and required checks for the touched files.
  4. Commit with a clear message focused on the fixes. Follow the user's git commit rules. Push to the original PR's base repository, or to your own fork if you cannot write there. Never push to the original author's fork.
  5. Open one ready-for-review PR containing the fixes:
    • Always open the fix PR in the original PR's base repository, targeting its base branch. Never open a PR in the original author's fork or target the author's branch.
    • Original PR open: base the fix branch on its reviewed head and state that the fix depends on the original PR. Its diff will narrow after the original PR merges. Do not merge the fix PR first.
    • Original PR merged: start from the updated base branch, apply only fixes still needed, test, and target that base branch.
    • Original PR closed without merging: report this in chat; do not reopen its changes through a fix PR.
  6. Link the original PR in the fix PR body. Explain the concrete failure, resulting behavior, and validation. Follow the repository's PR template and PR description skill. Do not rewrite the original PR description.
  7. If permissions or GitHub branch rules prevent opening the fix PR, preserve the prepared changes and report the blocker in chat. Do not post findings on the original PR or wait for its author to implement them.

Boundaries

  • Apply only verified major fixes and lean cuts.
  • Do not post issue comments, inline review comments, or request changes under the default workflow.
  • Approval does not authorize merging either PR.
  • Do not rewrite the original PR description.
  • Do not mention internal review frameworks, skills, or scoring in reviews or commit messages.
  • Do not flag production code that is already the minimal pattern (e.g. a boolean in-flight guard with try/finally).
  • Verify approval, push, and PR creation before claiming success.

Frequently asked questions

What does the Lean Pr Review AI skill do?

Review a GitHub PR for major issues first, then unnecessary complexity. Approve the reviewed PR and open a separate fix PR for verified findings. Do not post review comments or wait for the author to fix issues. Use for a lean PR review, /lean-pr-review, /lean-review, or over-engineering feedback on a PR.

Why use Lean Pr Review on TypingMind?

Because you install it once and use it with any model. Lean Pr Review is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Lean Pr Review in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ahmadrosid/nakama/tree/main/.agents/skills/lean-pr-review. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Lean Pr Review?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Lean Pr Review?

As many as you like. As long as a model supports skills, you can use Lean Pr Review with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Lean Pr Review AI skill free?

Yes. It is published on GitHub by ahmadrosid under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇