Skip to content

Instantly share code, notes, and snippets.

@intellectronica
Last active May 18, 2026 18:07
Show Gist options
  • Select an option

  • Save intellectronica/5238b50b7d1d6ecf7b7b5b46ebb13a69 to your computer and use it in GitHub Desktop.

Select an option

Save intellectronica/5238b50b7d1d6ecf7b7b5b46ebb13a69 to your computer and use it in GitHub Desktop.
Remote Hermes ACP skill – talk to your Hermes agent from Codex/Claude/Copilot/Warp/etc....
name hermes
description Send commands, questions, and work requests to a user-configured remote Hermes ACP agent over SSH, then return the complete acpx/Hermes output without summarizing. Use this skill whenever the user asks to talk to, ask, delegate to, or run work through their remote Hermes agent or always-on remote agent. Configure hostnames, session names, paths, and behavior with environment variables such as $REMOTE_HERMES_HOST and $REMOTE_HERMES_SESSION_NAME.
compatibility Requires network access to $REMOTE_HERMES_HOST, SSH authentication for that host, Node/npm with npx or a global acpx install, and a working Hermes ACP command on the remote host.

Remote Hermes ACP

Use this skill to communicate with a user-configured remote Hermes agent through ACP over SSH.

All installation-specific values should come from environment variables. Do not bake in a person's name, host name, machine name, repository path, or private local convention.

Configuration

Set these environment variables before using the skill:

export REMOTE_HERMES_HOST="user-or-host-alias"
export REMOTE_HERMES_SESSION_NAME="remote-hermes"

Optional customization:

export REMOTE_HERMES_REMOTE_PATH='$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin'
export REMOTE_HERMES_ACP_COMMAND="hermes acp"
export REMOTE_HERMES_TIMEOUT="600"
export REMOTE_HERMES_APPROVAL_FLAG="--approve-all"
export REMOTE_HERMES_OUTPUT_FORMAT="text"

Defaults when variables are unset:

  • $REMOTE_HERMES_REMOTE_PATH: $HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  • $REMOTE_HERMES_ACP_COMMAND: hermes acp
  • $REMOTE_HERMES_TIMEOUT: 600
  • $REMOTE_HERMES_APPROVAL_FLAG: --approve-all
  • $REMOTE_HERMES_OUTPUT_FORMAT: text
  • $REMOTE_HERMES_SESSION_NAME: remote-hermes

Core Behavior

  • Treat the remote Hermes agent as the worker and source of truth for the requested task.
  • Preserve the user's request as much as possible. Do not rewrite it into a different task unless a small framing sentence is needed.
  • Do not add local assumptions, plans, or implementation details unless the user asked for them.
  • Use $REMOTE_HERMES_APPROVAL_FLAG on every acpx invocation. The default is --approve-all for unattended remote work.
  • Prefer rich streamed feedback. Use the default text output or $REMOTE_HERMES_OUTPUT_FORMAT=text; do not use quiet unless the user asks for terse output.
  • Return the complete Hermes/acpx output. Do not summarize, condense, excerpt, reinterpret, or replace it with a digest.
  • If a request is ambiguous but still actionable, pass it to the remote Hermes agent and let that agent clarify or proceed.
  • Re-prompt the user only when the request is impossible to route safely or meaningfully, such as no actual task text, contradictory destination, or a missing required file/path that cannot be inferred.

Agent Command

Build the ACP agent command from environment variables:

REMOTE_HERMES_AGENT_COMMAND="ssh -T ${REMOTE_HERMES_HOST:?Set REMOTE_HERMES_HOST} 'PATH=\"${REMOTE_HERMES_REMOTE_PATH:-\$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin}:\$PATH\" exec ${REMOTE_HERMES_ACP_COMMAND:-hermes acp}'"

Why this shape:

  • ssh -T disables pseudo-terminal allocation so stdout can carry ACP JSON-RPC cleanly.
  • $REMOTE_HERMES_REMOTE_PATH includes the remote locations where Hermes may be installed.
  • exec $REMOTE_HERMES_ACP_COMMAND replaces the remote shell process with Hermes' ACP server.
  • Hermes should log to stderr in ACP mode, leaving stdout for protocol traffic.

If SSH authentication fails, do not fall back to a password prompt inside ACP. Report the SSH/auth problem and suggest verifying SSH to $REMOTE_HERMES_HOST outside the ACP stream.

Standard Invocation

For one-shot requests, use exec:

REMOTE_HERMES_AGENT_COMMAND="ssh -T ${REMOTE_HERMES_HOST:?Set REMOTE_HERMES_HOST} 'PATH=\"${REMOTE_HERMES_REMOTE_PATH:-\$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin}:\$PATH\" exec ${REMOTE_HERMES_ACP_COMMAND:-hermes acp}'"

npx -y acpx \
  "${REMOTE_HERMES_APPROVAL_FLAG:---approve-all}" \
  --format "${REMOTE_HERMES_OUTPUT_FORMAT:-text}" \
  --timeout "${REMOTE_HERMES_TIMEOUT:-600}" \
  --agent "$REMOTE_HERMES_AGENT_COMMAND" \
  exec "USER_REQUEST_HERE"

For multi-line requests, avoid shell quoting problems by using stdin:

REMOTE_HERMES_AGENT_COMMAND="ssh -T ${REMOTE_HERMES_HOST:?Set REMOTE_HERMES_HOST} 'PATH=\"${REMOTE_HERMES_REMOTE_PATH:-\$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin}:\$PATH\" exec ${REMOTE_HERMES_ACP_COMMAND:-hermes acp}'"

printf '%s\n' "USER_REQUEST_HERE" | npx -y acpx \
  "${REMOTE_HERMES_APPROVAL_FLAG:---approve-all}" \
  --format "${REMOTE_HERMES_OUTPUT_FORMAT:-text}" \
  --timeout "${REMOTE_HERMES_TIMEOUT:-600}" \
  --agent "$REMOTE_HERMES_AGENT_COMMAND" \
  exec --file -

For long-running or conversational work, create or use a named persistent session:

REMOTE_HERMES_AGENT_COMMAND="ssh -T ${REMOTE_HERMES_HOST:?Set REMOTE_HERMES_HOST} 'PATH=\"${REMOTE_HERMES_REMOTE_PATH:-\$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin}:\$PATH\" exec ${REMOTE_HERMES_ACP_COMMAND:-hermes acp}'"

npx -y acpx \
  "${REMOTE_HERMES_APPROVAL_FLAG:---approve-all}" \
  --format "${REMOTE_HERMES_OUTPUT_FORMAT:-text}" \
  --timeout "${REMOTE_HERMES_TIMEOUT:-600}" \
  --agent "$REMOTE_HERMES_AGENT_COMMAND" \
  sessions ensure --name "${REMOTE_HERMES_SESSION_NAME:-remote-hermes}"

Then send follow-ups:

REMOTE_HERMES_AGENT_COMMAND="ssh -T ${REMOTE_HERMES_HOST:?Set REMOTE_HERMES_HOST} 'PATH=\"${REMOTE_HERMES_REMOTE_PATH:-\$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin}:\$PATH\" exec ${REMOTE_HERMES_ACP_COMMAND:-hermes acp}'"

npx -y acpx \
  "${REMOTE_HERMES_APPROVAL_FLAG:---approve-all}" \
  --format "${REMOTE_HERMES_OUTPUT_FORMAT:-text}" \
  --timeout "${REMOTE_HERMES_TIMEOUT:-600}" \
  --agent "$REMOTE_HERMES_AGENT_COMMAND" \
  -s "${REMOTE_HERMES_SESSION_NAME:-remote-hermes}" \
  "USER_REQUEST_HERE"

Use a more specific $REMOTE_HERMES_SESSION_NAME when the task has its own thread of continuity, such as repo-audit, travel-planning, or incident-review.

Request Framing

Default to sending the user's words directly:

Summarize today's remote-agent cron failures and propose fixes.

If context is helpful, add only a short prefix:

The user asks: Summarize today's remote-agent cron failures and propose fixes.

For commands, keep the command explicit and let the remote Hermes agent decide how to run it:

Run `brew outdated` on the remote host and tell me which upgrades look risky.

For repo or file tasks, include exact paths when available:

In `$REMOTE_REPO_PATH`, inspect the failing tests and fix them if the cause is obvious.

Output Handling

The remote Hermes output is the artifact the user asked for. Relay it completely.

  • Always return the complete stdout/stderr content produced by npx -y acpx for the remote run.
  • Do not summarize the remote agent's answer, even if it is long.
  • Do not say only "it succeeded" when the command produced more output.
  • Do not omit tool activity, command output, errors, changed files, final status, or intermediate progress that appeared in the acpx output.
  • Do not paraphrase. Preserve the remote agent's wording and structure as much as the chat interface permits.
  • If a short local preface is useful, keep it to one line, label it clearly as local context, and then paste the complete remote output.
  • If acpx exits nonzero, return the complete stdout/stderr that is available, plus the numeric exit status.
  • If the chat interface or transport truly cannot carry the full output, say so explicitly, save the full output to a local file under the current workspace, and give the user the file path. Do this only as a last resort after preserving as much output inline as possible.

Troubleshooting

Run these checks if the route fails:

npx -y acpx --version
nc -vz -G 5 "${REMOTE_HERMES_HOST:?Set REMOTE_HERMES_HOST}" 22
ssh "${REMOTE_HERMES_HOST:?Set REMOTE_HERMES_HOST}" "PATH=\"${REMOTE_HERMES_REMOTE_PATH:-\$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin}:\$PATH\"; command -v hermes; ${REMOTE_HERMES_ACP_COMMAND:-hermes acp} --check"

Common failures:

  • npx: command not found: Node/npm is unavailable locally.
  • SSH hangs, exits with key-signing errors, or reports too many authentication failures: unlock or approve the SSH key outside the ACP run, then retry ssh "$REMOTE_HERMES_HOST" 'echo ok' before using this skill.
  • hermes: command not found: Hermes is not on the remote non-interactive $PATH; update $REMOTE_HERMES_REMOTE_PATH or set $REMOTE_HERMES_ACP_COMMAND to the full command path.
  • ACP JSON parse errors: the remote login shell is printing banners or startup text to stdout. Remove those prints or ensure they go to stderr.
  • Permission prompts appear: confirm $REMOTE_HERMES_APPROVAL_FLAG is present before the agent command and request.

References

  • Hermes ACP mode: hermes acp, hermes-acp, or python -m acp_adapter start Hermes as an ACP stdio server.
  • ACP mode uses the same Hermes configuration as CLI, including the remote host's Hermes environment, config, skills, and state database.
  • acpx --agent <command> runs any custom ACP server over stdio.
  • acpx --approve-all auto-approves every ACP permission request without prompting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment