Agent skill

Learn From Code Review

by OpenHands in OpenHands/extensions

Distill code review feedback from GitHub PRs into reusable skills and guidelines.

MITAuto-check passedDevelopment

Install Learn From Code Review

skills CLI
$ npx skills add OpenHands/extensions --skill learn-from-code-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenHands/extensions learn-from-code-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenHands/extensions.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/learn-from-code-review .claude/skills/learn-from-code-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
learn-from-code-review
GitHub stars
157
Token cost
~1.6k tokens
SKILL.md length
342 words
Files
6
Skills in repo
78
Repo updated
First seen
Licence
MIT

At a glance

Distill code review feedback from GitHub PRs into reusable skills and guidelines.

  • Works in 6 steps: Identify Target Repository → Fetch Review Comments → Filter and Categorize Comments → …
  • Tasks that involve Code review
  • SKILL.md covers Overview, Prerequisites, Workflow and Example Output, plus 1 more section
  • Calls gh; needs GITHUB_TOKEN

What it does

Learn From Code Review is an agent skill from OpenHands/extensions. Distill code review feedback from GitHub PRs into reusable skills and guidelines. This skill should be used when users ask to "learn from code reviews", "distill PR feedback", "improve coding standards", "extract learnings from reviews", or want to generate skills/guidelines from historical review comments.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files (for example `.plugin/plugin.json`, `README.md` and `commands/learn-from-reviews.md`).

It sits in Development, covering Code review and Code quality. It works with GitHub. The repository describes itself as: Public registry for OpenHands extensions. The licence is MIT.

When your agent uses it

  • Tasks that involve Code review
  • Tasks that involve Code quality

Example prompts

  • “learn from code reviews”
  • “distill PR feedback”
  • “improve coding standards”
  • “/learn-from-code-review”

Requirements

  • Python 3
  • A credential in GITHUB_TOKEN

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Identify Target Repository
  2. Fetch Review Comments
  3. Filter and Categorize Comments
  4. Distill Patterns
  5. Generate Output
  6. Create Draft PR (if applicable)

What it can do on your machine

Read from SKILL.md and the folder at commit d008b81. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GITHUB_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Learn From Code Review loads about 1.6k tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 342 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenHands/extensions at commit d008b81, republished under its MIT licence (© OpenHands). 342 words, ~1,574 tokens.

Download SKILL.mdSave it as .claude/skills/learn-from-code-review/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
learn-from-code-review
description
Distill code review feedback from GitHub PRs into reusable skills and guidelines. This skill should be used when users ask to "learn from code reviews", "distill PR feedback", "improve coding standards", "extract learnings from reviews", or want to generate skills/guidelines from historical review comments.
triggers
/learn-from-reviews, learn from code review, distill reviews

Learn from Code Review

Analyze code review comments from GitHub pull requests and distill them into reusable skills or repository guidelines that improve future code quality.

Overview

Code review feedback contains valuable institutional knowledge that often gets buried across hundreds of PRs. This skill extracts meaningful patterns from review comments and transforms them into:

  1. Repository-specific skills - Placed in .openhands/skills/ for domain-specific patterns
  2. AGENTS.md guidelines - Overall repository conventions and best practices

Prerequisites

  • GITHUB_TOKEN environment variable must be set
  • GitHub CLI (gh) should be available

Workflow

Step 1: Identify Target Repository

Determine the repository to analyze:

bash
# Get current repo info
gh repo view --json nameWithOwner -q '.nameWithOwner'

If not in a repository, ask the user which repository to analyze.

Step 2: Fetch Review Comments

Retrieve PR review comments from the repository:

bash
# Fetch merged PRs from the last 30 days (adjustable)
gh pr list --repo {owner}/{repo} \
  --state merged \
  --limit 50 \
  --json number,title,mergedAt

# For each PR, fetch review comments
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments \
  --jq '.[] | {body: .body, path: .path, user: .user.login, created_at: .created_at}'

# Also fetch review-level comments (not tied to specific lines)
gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews \
  --jq '.[] | select(.body != "") | {body: .body, user: .user.login, state: .state}'
Step 3: Filter and Categorize Comments

Apply noise filtering to keep only meaningful feedback:

Exclude:

  • Bot comments (dependabot, copilot, github-actions, etc.)
  • Low-signal responses ("LGTM", "+1", "looks good", "thanks", "nice")
  • Comments shorter than 30 characters
  • Auto-generated comments (CI status, coverage reports)

Categorize remaining comments by:

  • Security concerns
  • Performance patterns
  • Code style/conventions
  • Architecture/design patterns
  • Error handling
  • Testing requirements
  • Documentation standards
Step 4: Distill Patterns

For each category with sufficient examples (3+ similar comments), identify:

  1. The recurring issue - What mistake or oversight keeps appearing
  2. The desired pattern - What reviewers consistently ask for
  3. Example context - Concrete before/after code snippets when available
Step 5: Generate Output

If clear, actionable patterns emerge, generate focused skill files. If no clear patterns emerge, report this to the user—it's fine to produce no output when the codebase already has strong conventions or when review comments don't cluster into recurring themes.

When creating skills, place them in .openhands/skills/{domain-name}/SKILL.md:

yaml
---
name: database-queries
description: Database query patterns and best practices for this repository.
---

# Database Query Guidelines

### Always Use Parameterized Queries
[Pattern description with examples]

### Connection Pool Management
[Pattern description with examples]

Prefer skills over AGENTS.md updates, since AGENTS.md typically already contains general coding guidelines.

Step 6: Create Draft PR (if applicable)

Use the create_pr tool to open a draft PR with the proposed changes. The PR description should include:

  • Number of PRs analyzed
  • Number of comments processed
  • Categories of patterns found
  • List of proposed changes (new skills and/or AGENTS.md updates)

Example Output

Sample Skill: API Error Handling
yaml
---
name: api-error-handling
description: API error handling patterns for this repository.
---

# API Error Handling

## Always Return Structured Errors

❌ Avoid:
```python
return {"error": str(e)}

✅ Prefer:

python
return {
    "error": {
        "code": "VALIDATION_ERROR",
        "message": "Invalid input",
        "details": {"field": "email", "reason": "Invalid format"}
    }
}

Log Before Returning Errors

python
logger.error(f"API error in {endpoint}: {e}", exc_info=True)
return error_response(e)

## Defaults

This workflow analyzes PRs from the past 30 days by default.

## Best Practices

1. **Run periodically** - Schedule monthly or quarterly to capture evolving patterns
2. **Review before merging** - Generated content is a draft; human review is essential
3. **Iterate** - Refine patterns based on team feedback
4. **Avoid duplication** - Check existing AGENTS.md and skills before adding
5. **Cite sources** - Reference PR numbers when documenting patterns

## Error Handling

Handle these common edge cases gracefully:

- **Repository has few PRs**: If fewer than 10 merged PRs exist in the timeframe, inform the user that there may not be enough data to identify patterns. Proceed with analysis but note the limited sample size.
- **No patterns emerge**: When comments don't cluster into recurring themes (common for well-established codebases), report this to the user and suggest either expanding the time range or that the codebase may already have strong conventions.
- **Token lacks repository access**: If the GitHub API returns 403/404, explain that the token may not have access to the repository and suggest checking token permissions.
- **`gh` CLI unavailable**: Fall back to direct GitHub API calls using `curl` with `$GITHUB_TOKEN`, or inform the user that `gh` needs to be installed.

## Limitations

- Only analyzes accessible repositories (requires appropriate permissions)
- Cannot capture verbal feedback from pair programming or meetings
- Patterns may reflect individual reviewer preferences vs. team consensus
- Historical comments may reference outdated code patterns

## Additional Resources

For posting structured code reviews, see the `github-pr-review` skill.
For creating new skills, see the `skill-creator` skill.

© OpenHands, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in skills/learn-from-code-review of OpenHands/extensions.

  • SKILL.md
  • .claude-plugin
  • .codex-plugin
  • .plugin/plugin.json
  • README.md
  • commands/learn-from-reviews.md

Open the folder on GitHubat commit d008b81

Compare with similar skills

Learn From Code Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Learn From Code Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Learn From Code Review this skillOpenHands/extensions157—~1.6kAutomated safety check: PassMIT
Code Reviewsortie-ai/sortie196—~2.9kAutomated safety check: PassMIT
Reviewing Changesbitwarden/ios694—~1.1kAutomated safety check: PassGPL-3.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
WooCommerce Code Reviewwoocommerce/woocommerce11k3 repos~1.1kAutomated safety check: PassCustom licence
GitHub Review Iterationprisma/orm48k—~2.2kAutomated safety check: PassApache-2.0

Similar skills

  • Code Review

    sortie-ai/sortie

    Reviews pull requests in this repository for the defect classes a mechanical checklist misses: documentation that outlived the code it describes, reaction and retry state that leaks or clobbers a…

    196 GitHub stars~2.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Reviewing Changes

    bitwarden/ios

    Official

    Performs comprehensive code reviews for Bitwarden iOS projects, verifying architecture compliance, style guidelines, compilation safety, test coverage, and security requirements.

    694 GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Runs a loop on a GitHub pull request: fetch review state, triage comments into actions, implement them and resolve threads, repeating until nothing actionable is left.

    48k GitHub stars~2.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • PR Finalize Review

    microsoft/garnet

    Official

    Checks that a pull request's title and description match its implementation and reviews the code for Garnet best practices, reporting findings without posting them.

    12k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed

More from OpenHands/extensions

All 78 skills in this repo
  • Agent Readiness Report

    OpenHands/extensions

    Evaluate how well a codebase supports autonomous AI-assisted development.

    157 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Discord

    OpenHands/extensions

    Build and automate Discord integrations (bots, webhooks, slash commands, and REST API workflows).

    157 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • GitHub

    OpenHands/extensions

    Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUBTOKEN environment variable and GitHub CLI.

    157 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • GitHub Issue To PR

    OpenHands/extensions

    Create an automation that implements GitHub issues when a configurable trigger label is applied.

    157 GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed
  • GitHub Repo Monitor

    OpenHands/extensions

    This skill should be used when the user asks to "monitor a GitHub repository", "watch GitHub for issues or PRs", "respond to @OpenHands mentions on GitHub", "set up an OpenHands GitHub integration"…

    157 GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • GitLab Issue To Mr

    OpenHands/extensions

    Create an automation that implements GitLab issues when a configurable trigger label is applied.

    157 GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Learn From Code Review

What does Learn From Code Review do?

Distill code review feedback from GitHub PRs into reusable skills and guidelines. Learn From Code Review is an agent skill from OpenHands/extensions. Distill code review feedback from GitHub PRs into reusable skills and guidelines.

When should I use Learn From Code Review?

Learn From Code Review fits situations like: tasks that involve Code review; tasks that involve Code quality.

How do I install Learn From Code Review in Claude Code?

Run `npx skills add OpenHands/extensions --skill learn-from-code-review -a claude-code`. Or copy the skill folder (skills/learn-from-code-review in OpenHands/extensions) into .claude/skills/learn-from-code-review in your project. Claude Code loads it when a task matches its description.

How do I install Learn From Code Review in Codex?

Run `npx skills add OpenHands/extensions --skill learn-from-code-review -a codex`. Or copy the skill folder (skills/learn-from-code-review in OpenHands/extensions) into .agents/skills/learn-from-code-review in your project. Codex loads it when a task matches its description.

Can I use Learn From Code Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenHands/extensions --skill learn-from-code-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/learn-from-code-review, .gemini/skills/learn-from-code-review, .github/skills/learn-from-code-review and .opencode/skills/learn-from-code-review in your project.

What does Learn From Code Review need to run?

Going by SKILL.md and its folder, Learn From Code Review needs the command-line tools its instructions call (gh) and credentials named GITHUB_TOKEN. Our summary lists: Python 3; A credential in GITHUB_TOKEN.

Does Learn From Code Review access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Learn From Code Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Learn From Code Review use?

Learn From Code Review is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Learn From Code Review use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Learn From Code Review?

Skills that share tags, products or a category with Learn From Code Review: Code Review (sortie-ai/sortie, 196 stars), Reviewing Changes (bitwarden/ios, 694 stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars) and WooCommerce Code Review (woocommerce/woocommerce, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Learn From Code Review?

OpenHands (a GitHub organization) maintains it in OpenHands/extensions, which has 157 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 6, 2026.

Source: OpenHands/extensions on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.