Skill metadata
Reference: full SKILL.md
The following is the complete skill definition that Mibyan loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
OpenHands CLI
Delegate coding tasks to the OpenHands CLI via theterminal 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 Mibyan.
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.
claude-code. For OpenAI-native, prefer codex. For Mibyan-native subagents, use delegate_task.
Prerequisites
-
Install upstream (requires Python 3.12+ and
uv):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:LLM_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:
How to Run
Always invoke through theterminal tool. Always pass --headless --json --override-with-envs --exit-without-confirmation for automation.
One-shot task
Background for long tasks
Resume a previous conversation
OpenHands printsConversation ID: <32-hex> and a Hint: openhands --resume <dashed-uuid> line at the end of each run. Use the dashed form to resume:
Real Flag List
Verified againstopenhands --help (CLI 1.16.0). Anything not in this table is not a flag — pass it via env var or settings file.
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 lines starting with {.
Top-level kind field discriminates events:
MessageEvent— user / agent text turn.sourceisuseroragent.ActionEvent— agent picked a tool. Readtool_name(file_editor,terminal,finish) andaction.kind(FileEditorAction,TerminalAction,FinishAction).ObservationEvent— tool result.observation.is_erroris the success flag.sourceisenvironment.FinishActioninside anActionEventcarries the agent’s final message inaction.message.
{.
Pitfalls
- LiteLLM warnings on every invocation. The CLI prints
bedrock-runtimeandsagemaker-runtimewarnings to stderr becausebotocoreisn’t installed. Plus an Authlib deprecation. These are noise, not failures. Pipe stderr to/dev/nullor filter it out before showing the user. - Banner spam. Without
OPENHANDS_SUPPRESS_BANNER=1, every run starts with a multi-line+--+ASCII box advertising the SDK. Always export it. --override-with-envsis mandatory for automation. Without it, OpenHands ignoresLLM_API_KEY/LLM_BASE_URL/LLM_MODELand falls back to~/.openhands/settings.json. On a fresh install this file doesn’t exist and the CLI hangs waiting for first-run setup.- Model slug is LiteLLM’s, not the provider’s.
openrouter/openai/gpt-4o-miniworks;openai/gpt-4o-miniwhile pointed at OpenRouter does not.anthropic/claude-sonnet-4-5(hyphen) is native Anthropic;openrouter/anthropic/claude-sonnet-4.5(dot) is via OpenRouter. Get it wrong → cryptic LiteLLM 400. pip install openhands-aiis the wrong package. That’s the legacy V0 SDK. The new CLI isuv tool install openhands --python 3.12. There is no maintained conda package.- Resume ID format is fiddly. The CLI ends with
Conversation ID: f46573d9cfdb45e492ca189bde40019b(no dashes) and then aHint: openhands --resume f46573d9-cfdb-45e4-92ca-189bde40019b(with dashes). Use the dashed form. - Headless ignores
--llm-approve. If you pass it, you get an argparse error. Headless mode hardcodes always-approve. - No Windows support upstream. The OpenHands docs require WSL on Windows. This skill is gated
[linux, macos]accordingly. ~/.openhands/conversations/<id>/accumulates. Each run persists a trajectory. Clean it up if running batches.- Heavy install (~200 packages). Use
uv tool install(isolated venv) to avoid dependency conflicts with the active project.
Verification
FinishAction whose action.message mentions OPENHANDS_OK, the install is working.
Related
- OpenHands GitHub
- OpenHands CLI command reference
- Sibling skills:
claude-code(Anthropic-only),codex(OpenAI-only),opencode(multi-provider via OpenCode),mibyan-agent(Mibyan subagents viadelegate_task).

