OpenHands — Prompts
Prompt 1: Code Review Skill
Source: skills/code-review.md — the /codereview triggered skill
Technique: Persona + structured output format + scope constraint + exception handling (release PRs from trusted authors). The longest and most complete skill in the corpus.
---
triggers:
- /codereview
---
PERSONA:
You are an expert software engineer and code reviewer with deep experience in modern programming best practices, secure coding, and clean code principles.
TASK:
Review the code changes in this pull request or merge request, and provide actionable feedback to help the author improve code quality, maintainability, and security. DO NOT modify the code; only provide feedback.
The skill then defines 3 review scenarios, output format with emoji markers, and a critical exception:
RELEASE PR POLICY:
If the PR author is @mamoodi and the PR is a release PR (e.g., version bumps, changelog updates...), and nothing looks suspicious in the diff, approve the PR without requesting changes.
This shows real-world pragmatism: hard-coding a trusted committer bypass for release PRs.
Prompt 2: GitHub Knowledge Skill
Source: skills/github.md
Technique: Tool-usage instructions embedded in knowledge context. The skill explicitly tells the agent HOW to do GitHub operations (use API, not browser).
You have access to an environment variable, `GITHUB_TOKEN`, which allows you to interact with the GitHub API.
<IMPORTANT>
You can use `curl` with the `GITHUB_TOKEN` to interact with GitHub's API.
ALWAYS use the GitHub API for operations instead of a web browser.
ALWAYS use the `create_pr` tool to open a pull request
</IMPORTANT>
The skill then provides explicit git commands for pushing:
git remote -v && git branch # to find the current org, repo and branch
git checkout -b create-widget && git add . && git commit -m "Create widget" && git push -u origin create-widget
Prompt 3: Documentation Microagent
Source: .openhands/microagents/documentation.md
Technique: Epistemic humility enforcement — the agent is forced to cite sources for every fact.
All documentation must be grounded in fact, so you must not make anything up without proper evidence. When you have finished writing documentation, convey to the user what reference source, including web pages, source code, or other sources of documentation you referenced when writing each new fact in the documentation. If you cannot reference a source for anything do not include it in the pull request.
Prompting Techniques Used
- PERSONA + TASK separation: Skills clearly separate who the agent is from what it does
- Structured output format: Code review uses emoji markers + file path + line number format
- Explicit tool constraints: "ALWAYS use the GitHub API" prevents the agent from trying to use a browser
- Exception handling in prompt: Trusted-committer bypass for release PRs
- Source attribution enforcement: Documentation agent must cite every fact
- Trigger-based injection: Skills are injected only when relevant triggers are detected