openhands/extensions/learn-from-code-review
Claude Code and agent skill by openhands/extensions
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install openhands/extensions/learn-from-code-reviewSKILL.md
The same SKILL.md was published earlier as openhands/extensions/learn-from-code-review.
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:
- Repository-specific skills - Placed in
.openhands/skills/for domain-specific patterns - AGENTS.md guidelines - Overall repository conventions and best practices
Prerequisites
GITHUB_TOKENenvironment variable must be set- GitHub CLI (
gh) should be available
Workflow
Step 1: Identify Target Repository
Determine the repository to analyze:
If not in a repository, ask the user which repository to analyze.
Step 2: Fetch Review Comments
Retrieve PR review comments from the repository:
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:
- The recurring issue - What mistake or oversight keeps appearing
- The desired pattern - What reviewers consistently ask for
- 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:
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
return {"error": str(e)}
return { "error": { "code": "VALIDATION_ERROR", "message": "Invalid input", "details": {"field": "email", "reason": "Invalid format"} } }
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
- Run periodically - Schedule monthly or quarterly to capture evolving patterns
- Review before merging - Generated content is a draft; human review is essential
- Iterate - Refine patterns based on team feedback
- Avoid duplication - Check existing AGENTS.md and skills before adding
- 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
curlwith$GITHUB_TOKEN, or inform the user thatghneeds 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.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/learn-from-code-review/SKILL.md
Popularity
- Repository stars
- 150
- Repository forks
- 91
- Repository npm downloads, 7 days
- 8,622
- 7-day trend score
- 46
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 22 Sep 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/openhands/extensions/learn-from-code-review)