The reference workflow is available here!Automatically review pull requests, providing feedback on code quality, security, and best practices. Reviews can be triggered in two ways:
- Requesting
openhands-agentas a reviewer - Adding the
review-thislabel to the PR
The reference workflow triggers on either the “review-this” label or when the openhands-agent account is requested as a reviewer. In OpenHands organization repositories, openhands-agent has access, so this works as-is. In your own repositories, requesting openhands-agent will only work if that account is added as a collaborator or is part of a team with access. If you don’t plan to grant access, use the label trigger instead, or change the condition to a reviewer handle that exists in your repo.
Quick Start
Features
- Fast Reviews - Results posted on the PR in only 2 or 3 minutes
- Comprehensive Analysis - Analyzes the changes given the repository context. Covers code quality, security, best practices
- GitHub Integration - Posts comments directly to the PR
- Customizable - Add your own code review guidelines without forking
Security
- Users with write access (maintainers) can trigger reviews by requesting
openhands-agentas a reviewer or adding thereview-thislabel. - Maintainers need to read the PR to make sure it’s safe to run.
Customizing the Code Review
Instead of forking theagent_script.py, you can customize the code review behavior by adding a .agents/skills/code-review.md file to your repository. This is the recommended approach for customization.
How It Works
The PR review agent uses skills from the OpenHands/skills repository by default. When you add a.openhands/skills/code-review.md file to your repository, it overrides the default skill with your custom guidelines.
Example: Custom Code Review Skill
Create.openhands/skills/code-review.md in your repository:
Benefits of Custom Skills
- No forking required: Keep using the official SDK while customizing behavior
- Version controlled: Your review guidelines live in your repository
- Easy updates: SDK updates don’t overwrite your customizations
- Team alignment: Everyone uses the same review standards
See the software-agent-sdk’s own code-review skill for a complete example of a custom code review skill.
Reference Workflow
This example is available on GitHub: examples/03_github_workflows/02_pr_review/
examples/03_github_workflows/02_pr_review/workflow.yml
Action Inputs
| Input | Description | Required | Default |
|---|---|---|---|
llm-model | LLM model to use | Yes | - |
llm-base-url | LLM base URL (optional) | No | '' |
review-style | Review style: ‘standard’ or ‘roasted’ | No | roasted |
sdk-version | Git ref for SDK (tag, branch, or commit SHA) | No | main |
sdk-repo | SDK repository (owner/repo) | No | OpenHands/software-agent-sdk |
llm-api-key | LLM API key | Yes | - |
github-token | GitHub token for API access | Yes | - |

