Skip to content

Conversation

@xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Jan 22, 2026

Summary

Simplify the PR review prompt by moving GitHub API instructions to the new /github-pr-review skill in the public skills registry.

Changes

examples/03_github_workflows/02_pr_review/prompt.py

  • Before: 315 lines with detailed gh api commands, curl examples, priority labels, line number tips, multi-line comment syntax, etc.
  • After: 38 lines with just the skill triggers (/codereview, /github-pr-review) and PR context

How It Works

The /github-pr-review skill (OpenHands/skills#25) contains all the detailed instructions:

  • How to post reviews with inline comments using gh api
  • Priority labels (🔴 Critical, 🟠 Important, 🟡 Suggestion, 🟢 Nit)
  • Multi-line comment syntax with start_line/line
  • GitHub suggestion syntax for one-click apply
  • Line number finding tips
  • curl fallback

When the agent sees /github-pr-review in the prompt, the SDK automatically injects the full skill content.

Benefits

  1. Cleaner code: SDK examples focus on the example logic, not GitHub API details
  2. Single source of truth: GitHub API instructions maintained in one place (skills registry)
  3. Independent updates: Can update the skill without SDK releases
  4. Reusability: Other workflows/examples can use the same skill

Dependencies

This PR depends on OpenHands/skills#25 being merged first.


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:6af0c03-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-6af0c03-python \
  ghcr.io/openhands/agent-server:6af0c03-python

All tags pushed for this build

ghcr.io/openhands/agent-server:6af0c03-golang-amd64
ghcr.io/openhands/agent-server:6af0c03-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:6af0c03-golang-arm64
ghcr.io/openhands/agent-server:6af0c03-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:6af0c03-java-amd64
ghcr.io/openhands/agent-server:6af0c03-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:6af0c03-java-arm64
ghcr.io/openhands/agent-server:6af0c03-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:6af0c03-python-amd64
ghcr.io/openhands/agent-server:6af0c03-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:6af0c03-python-arm64
ghcr.io/openhands/agent-server:6af0c03-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:6af0c03-golang
ghcr.io/openhands/agent-server:6af0c03-java
ghcr.io/openhands/agent-server:6af0c03-python

About Multi-Architecture Support

  • Each variant tag (e.g., 6af0c03-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 6af0c03-python-amd64) are also available if needed

@openhands-ai
Copy link

openhands-ai bot commented Jan 22, 2026

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Pre-commit checks

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #1792 at branch `refactor-pr-review-to-use-skills`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@xingyaoww xingyaoww force-pushed the refactor-pr-review-to-use-skills branch from 210494a to 223f849 Compare January 22, 2026 18:41
Move GitHub API instructions for posting PR reviews to the public skills
registry (OpenHands/skills#25) and simplify the prompt.

Changes:
- prompt.py: Remove 300 lines of gh api/curl examples, priority labels,
  line number tips, etc. Now just includes /github-pr-review trigger

The /github-pr-review skill in the public registry contains:
- How to post reviews with inline comments using gh api
- Priority labels (🔴🟠🟡🟢)
- Multi-line comment syntax
- GitHub suggestion syntax
- Line number finding tips
- curl fallback

This keeps the SDK examples clean while the detailed instructions
are maintained in the skills registry where they can be updated
independently.

Related: OpenHands/skills#25

Co-authored-by: openhands <openhands@all-hands.dev>
@xingyaoww xingyaoww force-pushed the refactor-pr-review-to-use-skills branch from 223f849 to 1309069 Compare January 22, 2026 18:42
@xingyaoww xingyaoww changed the title Refactor PR review to use /github-pr-review skill Simplify PR review prompt to use /github-pr-review skill Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants