openhands
What it does
It guides your agent to run the OpenHands command line tool in headless mode for batch or one-off coding jobs. It is for developers who want a model-agnostic coding agent.
When to use it
- ✓When you want OpenHands specifically to make multi-step file edits and run commands.
- ✓When you want a coding agent that runs on a non-Anthropic or non-OpenAI provider.
- ✓When you want a one-shot coding job run without the interactive text screen.
Skill link
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/openhands/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Have OpenHands update the logging code across the project using a model from another provider, then run the tests.”
5 new skills a week. 1 minute to read.
How it works
The agent installs OpenHands with uv, sets the model and key as environment variables, and runs a one-shot task in the workspace. It does not use the interactive text screen.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
OpenHands CLI
Delegate coding tasks to the OpenHands CLI via the terminal tool. OpenHands is model-agnostic: any LiteLLM-supported provider (OpenAI, Anthropic, OpenRouter, DeepSeek, Ollama, vLLM, etc.).
This skill is the headless-mode wrapper for batch / one-shot delegation. The interactive textual UI is not used from Hermes.
When to Use
- User wants a coding task delegated to OpenHands specifically.
- User wants a coding agent that can run on a non-Anthropic / non-OpenAI provider (DeepSeek, Qwen, Ollama, vLLM, Nous, etc.) — sibling skills
claude-codeandcodexare tied to one vendor. - Multi-step file edits + shell commands inside a workspace.
For Claude-native, prefer claude-code. For OpenAI-native, prefer codex. For Hermes-native subagents, use delegate_task.
Prerequisites
Install upstream (requires Python 3.12+ and
uv):terminal(command="uv tool install openhands --python 3.12")Verify:
openhands --version(currentlyOpenHands CLI 1.16.0/SDK v1.21.0at time of writing).Pick a model and set env vars for
--override-with-envs:export LLM_MODEL=openrouter/openai/gpt-4o-mini # or any LiteLLM slug export LLM_API_KEY=$OPENROUTER_API_KEY export LLM_BASE_URL=https://openrouter.ai/api/v1 # omit for native OpenAILLM_MODELuses LiteLLM's full slug. When the provider is OpenRouter the slug is doubly-prefixed:openrouter/<vendor>/<model>(e.g.openrouter/anthropic/claude-sonnet-4.5). For native Anthropic:anthropic/claude-sonnet-4-5. For native OpenAI:openai/gpt-4o-mini.Suppress the startup banner so JSON output isn't preceded by ASCII art:
export OPENHANDS_SUPPRESS_BANNER=1
How to Run
Always invoke through the terminal tool. Always pass --headless --json --override-with-envs --exit-without-confirmation for automation.
One-shot task
terminal(
command="OPENHANDS_SUPPRESS_BANNER=1 LLM_MODEL=openrouter/openai/gpt-4o-mini LLM_API_KEY=$OPENROUTER_API_KEY LLM_BASE_URL=https://openrouter.ai/api/v1 openhands --headless --json --override-with-envs --exit-without-confirmation -t 'Add error handling to all API calls in src/'",
workdir="/path/to/project",
timeout=600
)
Background for long tasks
terminal(command="<same as above>", workdir="/path/to/project", background=true, notify_on_complete=true)
process(action="poll", session_id="<id>")
process(action="log", session_id="<id>")
Resume a previous conversation
OpenHands prints Conversation ID: <32-hex> and a Hint: openhands --resume <dashed-uuid> line at the end of each run. Use the dashed form to resume:
terminal(
command="OPENHANDS_SUPPRESS_BANNER=1 LLM_MODEL=... openhands --headless --json --override-with-envs --exit-without-confirmation --resume <dashed-uuid> -t 'Now fix the bug you found'",
workdir="/path/to/project"
)
Real Flag List
Verified against openhands --help (CLI 1.16.0). Anything not in this table is not a flag — pass it via env var or settings file.
| Flag | Effect |
|---|---|
--headless |
No UI, requires -t or -f. Auto-approves all actions (no --llm-approve in this mode). |
--json |
JSONL event stream (requires --headless). |
-t TEXT |
Task prompt. |
-f PATH |
Read task from file. |
--resume [ID] |
Resume conversation. No ID → list recent. |
--last |
Resume most recent (with --resume). |
--override-with-envs |
Apply LLM_API_KEY / LLM_BASE_URL / LLM_MODEL env vars. Without this, OpenHands uses ~/.openhands/settings.json and ignores the env. |
--exit-without-confirmation |
Don't show the "are you sure" exit dialog. |
--always-approve / --yolo |
Auto-approve every action (default in --headless). |
--llm-approve |
LLM-based security gate (interactive only — does NOT work in headless). |
--version / -v |
Print version and exit. |
There is no --model, --max-iterations, --workspace, --sandbox, --sandbox-type flag. Model is LLM_MODEL. Workspace is the workdir you pass to the terminal tool. Sandbox / runtime is the RUNTIME and SANDBOX_VOLUMES env vars.
JSON Event Schema
With --json --headless, OpenHands emits JSONL — one JSON object per line, plus a handful of non-JSON status lines (Initializing agent..., Agent is working, Agent finished, the final summary box, Goodbye!, Conversation ID:, Hint:). Filter for
FAQ
What does it need installed?
Python 3.12 or newer, plus the uv tool, which the skill uses to install OpenHands.
Which AI providers does it support?
Any provider that LiteLLM supports, such as OpenAI, Anthropic, OpenRouter, DeepSeek, Ollama, or vLLM.
When should I use a different skill?
The skill suggests the claude-code skill for Claude and the codex skill for OpenAI-native work.
Details
Original description by the author
Delegate coding to OpenHands CLI (model-agnostic, LiteLLM).
Popularity
- GitHub stars
- 260k
- Ranking position
- #445
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
agent-merge-conflict-arbiter
260kSettles a git merge conflict between two agents' branches as a neutral third party, producing one merged result for the repo.
antigravity-cli
260kGuides you through installing, updating, and troubleshooting the Antigravity command line tool, including its plugins, sign-in, and sandbox.
blackbox
260kLets your agent hand a coding task to the Blackbox AI command line tool, which runs several AI models and picks the best result.
dynamic-workflow
260kTeaches your agent to run large batches of similar work as a saved script, so only verified results return to the main conversation.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.