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 skill file to your repository. This is the recommended approach for customization.
How It Works
The PR review agent uses skills from the OpenHands/extensions repository by default. You can add your project-specific guidelines alongside the default skill by creating a custom skill file.Skill paths: Place skills in
.agents/skills/ (recommended). The legacy path .openhands/skills/ is also supported. See Skill Loading Precedence for details.Example: Custom Code Review Skill
Create.agents/skills/custom-codereview-guide.md in your repository:
Note: These rules supplement the default
code-review skill, not replace it.Migrating from override to supplement: If you previously created a skill with
name: code-review to override the default, rename it (e.g., to my-project-review) to receive guidelines from both skills instead.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
- Composable: Add project-specific rules alongside default guidelines
See the software-agent-sdk’s own custom-codereview-guide skill for a complete example.
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 | - |

