本文へスキップ
Skillpedia
一般的なプログラミング260k · #445

openhands

できること

このスキルは、バッチや1回限りのコーディングの作業のために、ヘッドレスモードでOpenHandsのコマンドラインツールを動かす手順を、エージェントに示します。モデルに依存しないコーディングエージェントがほしい開発者のためのものです。

使う場面

  • ✓複数のステップにわたるファイル編集とコマンド実行を、特にOpenHandsにさせたいとき。
  • ✓AnthropicでもOpenAIでもない別のプロバイダーで動くコーディングエージェントがほしいとき。
  • ✓対話的なテキスト画面を使わず、1回限りのコーディングの作業を実行したいとき。

スキルのリンク

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/openhands/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/openhands/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“別のプロバイダーのモデルを使って、プロジェクト全体のログ処理のコードを更新し、その後テストを実行してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、uvでOpenHandsをインストールし、モデルとキーを環境変数として設定して、ワークスペースで1回限りのタスクを実行します。対話的なテキスト画面は使いません。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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-code and codex are 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

  1. Install upstream (requires Python 3.12+ and uv):

    terminal(command="uv tool install openhands --python 3.12")
    

    Verify: openhands --version (currently OpenHands CLI 1.16.0 / SDK v1.21.0 at time of writing).

  2. 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 OpenAI
    

    LLM_MODEL uses 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.

  3. 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

よくある質問

何をインストールしておく必要がありますか?

Python 3.12以降と、スキルがOpenHandsのインストールに使うuvツールが必要です。

どのAIプロバイダーに対応していますか?

LiteLLMが対応する任意のプロバイダーで、OpenAI、Anthropic、OpenRouter、DeepSeek、Ollama、vLLMなどがあります。

別のスキルを使うべきなのはいつですか?

Claudeにはclaude-codeスキル、OpenAIネイティブの作業にはcodexスキルを提案します。

詳細

作者による元の説明

Delegate coding to OpenHands CLI (model-agnostic, LiteLLM).

repo: NousResearch/hermes-agent

人気

GitHubのスター
260k
ランキング
#445
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル