Skip to content

Agent Skill and capability overview ​

xops-agent teaches Skill-capable AI assistants (such as Claude Code, Codex, and Cursor) how to operate XOps CLI. After reading the skill instructions, the assistant runs xops commands directly in its own command environment and inspects the results.

Skill and MCP are independent workflows—using the Skill does not require running xops mcp serve or registering MCP tools.

Quick installation and usage ​

First install XOps in the assistant's command environment and prepare SSH configuration, trusted host keys, and accessible credentials. Then install the Skill:

bash
npx skills add https://github.com/wentf9/xops-cli --skill xops-agent

For manual installation, copy the complete skills/xops-agent/ directory into your client's skill directory, keeping SKILL.md and references/ intact (updating files in this repository checkout does not automatically update copies installed elsewhere).

Once installed, you can ask the assistant to handle tasks in plain language:

  • “Use xops-agent to check disk usage on all hosts tagged web and list any failed nodes.”
  • “Read web-01's application config, change the port, and verify the updated file.”
  • “Distribute the local assets directory to hosts tagged web without overwriting existing files.”
  • “Forward remote port 3000 through web-01, verify the web page, then close the tunnel.”
  • “Turn these deployment steps into a Playbook and preview targets and step order with --dry-run first.”

On-demand reference files inside the Skill:

FileContents
references/inventory.mdHosts, identities, tags, credentials, and offline-store maintenance
references/execution.mdSingle-host/batch commands, scripts, Playbooks, and interactive terminals
references/files.mdReading/writing files, directory operations, SCP/SFTP, and transfer verification
references/networking.mdTunnel process management and network connectivity

CLI capability overview ​

AreaCLI entry pointsTypical Skill workflow
Initialization & OpenSSH importinitCheck existing config; initialize or import ~/.ssh/config when needed
Hosts, identities, aliases & tagshost, identityQuery nodes, bulk-import CSV, add/edit/delete records, and manage tags
Credentials & offline vaultscredential, identity credentialCheck store health, configure credentials, and run requested migrations, rotations, recovery, or cleanup
SSH connections & elevationssh, exec --sudoSelect identity, port, and ProxyJump; allocate a terminal or escalate via sudo/su
Single-host & batch commandsexecSelect targets by host, tag, or host file, bound concurrency, and inspect per-host output
File reading, writing & directoriesexec, batch sftpRead bounded content, write/append, list, create, copy, move, and remove
File & directory transfersscp, sftpUpload, download, relay between hosts, distribute by tag, set overwrite policy, and verify
SSH tunnels & proxiesssh -L/-R/-D -NTrack tunnel processes/sessions, verify listeners and target services, stop, and confirm release
Declarative orchestrationplayCombine shell, script, copy, ensure, and template steps; preview with --dry-run before running
Interactive terminal UItuiVisual terminal management, SSH sessions, and real-time monitoring
Service administration & discoverymcp serve/recover, version, help, completionManage MCP services when explicitly requested or inspect CLI help

Note: host import --template exports a blank CSV template rather than your existing inventory. See the command reference and xops <command> --help for full options.

Execution semantics and operational boundaries ​

  • Native passthrough default (server): Ordinary commands are sent directly to the remote SSH shell without an implicit bash -l -c wrapper. Write command syntax for the target's actual shell (Windows hosts no longer require Bash just for default commands).
  • Explicit interpreters and inheritance: Global config, nodes, Playbook settings.execution, and steps all accept execution. Explicit bash, sh, zsh, fish, powershell, pwsh, or cmd adapters require a compatible launch_dialect describing the remote outer shell (not the assistant's local OS). --no-login retains its non-login Bash compatibility meaning.
  • Scripts and on-demand probing: Local scripts require a supported interpreter and known launch dialect (allowlisted sh/bash/zsh/fish shebangs select the interpreter but do not prove a POSIX outer dialect; scripts without a reliable interpreter or with a UTF-8 BOM fail before execution). Playbook script/ensure steps without a shebang and SFTP exec with a nonempty cwd probe unspecified execution settings on demand and cache the result per connection; explicit interpreters (including server) are never overridden (saved server/cmd derives a temporary CMD adapter for SFTP cwd, while other explicit server settings reject a nonempty cwd).
  • Entry-point combinations & flags: Explicit CLI execution flags on exec (--interpreter, --launch-dialect, --login-shell) combine with --shell (scripts), --sudo, --stream, and --out-dir (scripts and elevation support bash/sh/zsh/fish); explicit execution flags on ssh are supported across Linux, macOS, and Windows by validating host I/O capabilities. host add and host import support --interpreter, --launch-dialect, and --probe/--no-probe during enrollment.
  • Local environment & paths: Local file paths and listener ports belong to the machine running xops (a container or remote sandbox is not the user's desktop). Interactive and batch SFTP both parse single/double quotes and backslash escapes—paths with spaces can be enclosed in quotes or backslash-escaped.

Mapping MCP tools to CLI commands ​

When operating through the Skill, the assistant runs the CLI commands in the right column directly:

MCP toolEquivalent CLI workflow
nodesxops host list (optionally with --tag)
terminal (session: "once")xops exec --host NODE -c COMMAND (optionally with --sudo); directory operations also use target-native commands via exec
terminal (named persistent session)No direct equivalent; each CLI exec is independent, use the interactive xops ssh terminal when needed
file (read/write/patch/stat)Target-native read/write commands via exec, or batch sftp; use scp for large or binary files
guiNo CLI equivalent
Stdio transfer (push/pull)Upload/download files and directories with xops scp or batch sftp
HTTP transfer (prepare_push/prepare_pull/status/cancel)Transfer directly with xops scp, check the exit status and destination file, and cancel by stopping the owned process
Stdio tunnel (create/list/status/stop)xops ssh -L/-R -N (CLI also supports -D SOCKS5; manage lifecycle via the owned process/session)

Lifecycle and authorization differences: The CLI does not create MCP transfer IDs, tunnel IDs, or TTLs, and there is no xops tunnel list command; killing a transfer process does not roll back bytes already written. Skill-driven CLI commands follow the assistant's own command-execution authorization—clarify targets, overwrite scope, or network exposure first whenever they are ambiguous.

MIT License