winkterm-remote

winkterm-remote is a skill for Claude Code, Codex from Cznorth/winkterm. It costs 112 tokens per session (5,036 once invoked), scanned A, original, MIT.

A remote-terminal workflow for managing local or SSH connections, opening terminals, running commands, viewing output, taking snapshots, and transferring files. SSH is a secure way to operate another computer over a network.

In plain words
What is it for?
Use it for server maintenance, remote shell commands, SSH file transfers, terminal monitoring, and long tasks that should not be cut off by short connection timeouts.
Why use it?
It lets an agent operate remote machines through a persistent connection suited to long-running commands such as installs, builds, and data exports.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cznorth/winkterm/agent-skill
Any agent
npx skills add Cznorth/winkterm --skill agent-skill
Clone the repo
git clone --depth 1 https://github.com/Cznorth/winkterm

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for winkterm-remote

README.md
[![agentmods](https://agentmods.dev/badge/skills/cznorth/winkterm/agent-skill.svg)](https://agentmods.dev/skills/cznorth/winkterm/agent-skill)
Your own site
<a href="https://agentmods.dev/skills/cznorth/winkterm/agent-skill"><img src="https://agentmods.dev/badge/skills/cznorth/winkterm/agent-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,036 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00112 $0.05036
Opus 5 $0.00056 $0.02518
Sonnet 5 $0.00022 $0.01007
Haiku 4.5 $0.00011 $0.00504

Measured 5d ago against content hash 12ae68db69ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

winkterm-remote scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

细节单独放在 [HTTP_API.md](./HTTP_API.md)(远程 agent 用 `curl ${WINKTERM_BASE_URL}/api/agent/http.md` 取),
agent-skill/SKILL.md · 346 lines

How it starts

The opening of the file, as written. The whole thing — 346 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WinkTerm 远程终端 Skill

远程操作 WinkTerm 后端的终端。后端为每个终端维护一个独立 PTY, 你可以创建本地或 SSH 终端、发命令、读输出、传文件。

如果当前 agent 支持 MCP,优先用 MCP;否则默认用 CLI,几乎不用碰 HTTP:

  • MCP(最省心) —— 配好 winkterm-mcp 后,agent 会看到 winkterm_ssh_runwinkterm_execwinkterm_snapshotwinkterm_call 等工具,不需要手写 shell 命令、 JSON 引号或 token。MCP server 内部复用同一套 WebSocket-first transport,长任务仍然靠 15s 心跳保活,连不上 WS 时自动 HTTP fallback。见下方 MCP.

  • winkterm CLI(默认,几乎总是用它) —— 走 WebSocket 长连接,应用层心跳每 15s 一次, 长命令(安装、build、dump)不会被 nginx 等反向代理的默认 60s 空闲超时切断。 覆盖全部操作。注意:CLI/MCP 的 WebSocket 保活只保证连接不断,不保证当前 agent 能看到 stderr 的实时流式过程;agent 需要可控观察长任务时,应启动后台任务后主动用 run_wait / snapshot 查看进度。见下方 CLI.

  • HTTP 接口(兜底,实在没办法才用) —— 原有 REST/SSE 接口全部保留,CLI 连不上时 auto 模式自动 fallback。只有目标机跑不了 Node、或需要 SSE 流式订阅时才手动碰 HTTP。 细节单独放在 HTTP_API.md(远程 agent 用 curl ${WINKTERM_BASE_URL}/api/agent/http.md 取), 确需 HTTP 时再读,平时不占上下文。

配置

  • Base URL: ${WINKTERM_BASE_URL}(默认 http://localhost:8000
  • 鉴权: 所有请求带 HTTP 头 Authorization: Bearer ${WINKTERM_AGENT_TOKEN}
  • 或在 URL 上加 ?token=<token>(SSE/EventSource 不支持自定义 header 时用)。
  • token 未配置时接口返回 503;token 错误返回 401

Token 自动发现(会话开始就做

会话第一次用本 skill 时,按顺序尝试:

1. 查持久化 memory / 上下文:用户之前可能已经告诉你 token,写到了 memory 文件 / CLAUDE.md / 环境变量。先找一遍:

  • env WINKTERM_AGENT_TOKEN
  • agent memory 系统(Claude Code 等:~/.claude/projects/<...>/memory/
  • 项目级 CLAUDE.md

2. 本地 handshake(只对 WinkTerm 同机的 agent 有效):

curl -s http://localhost:8000/api/agent/handshake
→ {"token":"<bearer-token>","base_url":"http://localhost:8000"}

该端点免鉴权但仅 localhost 可访问(远程 IP 返回 403)。

3. 远程 agent / 全部失败:问用户一次 token,立刻写入 memory(或等价持久化层),后续会话直接复用。 不要每次会话都问用户 —— 一次提供,永久记住。

如果调 API 时收到 401,token 可能已轮换:清掉 memory 里的旧值,重走以上流程。

Skill 自更新(会话开始顺手做

WinkTerm 后端会持续迭代接口。本 skill 文件顶部 frontmatter 有 version 字段, 和服务端 GET /api/agent/skill.md 第二行的 version: N 比对即可判断是否落后。

会话第一次连上 WinkTerm 时:

# 1. 取服务端 skill 版本
curl -s http://localhost:8000/api/agent/skill.md | head -10 | grep '^version:'
# → version: 3

# 2. 取本地 skill 版本(路径因 agent 而异,Claude Code 是 ~/.claude/skills/winkterm-remote/SKILL.md)
head -10 <local-skill-path> | grep '^version:'
# → version: 2

Read the full file on GitHub · 346 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 346 lines · 112 tokens per session scan A 12ae68db69ad

Subscribe to this mod's changes

winkterm-remote is a skill published in the GitHub repository Cznorth/winkterm (20 stars, last pushed 1mo ago), licensed MIT. It adds 112 tokens to every session and 5,036 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

tether

Observe and operate durable workloads and reviewed Mission Control groups through Tether's public surfaces without depending on tmux or Herdr internals.

moneycaringcoder/herdr-tether · 30 tokens

ptywright-testing

Build, run, record, replay, debug, and maintain deterministic terminal, TUI, PTY cassette, and browser-terminal agent regression tests with ptywright. Use when an agent needs to drive CLI/TUI apps, create ptywright scripts, configure ptywright.config., record or replay PTY output, solidify browser terminal agent flows…

kingsword09/ptywright · 93 tokens

deepagents-thread-inspector

Inspect and explain conversations in the local Deep Agents Code SQLite session store. Use as a fallback when LangSmith trace tooling is unavailable, for offline or untraced sessions, or when asked to identify or summarize a local dcode thread, inspect checkpoint metadata, list recent local threads, or parse…

langchain-ai/deepagents · 82 tokens

computer-use

Use Orca's computer-use CLI for OS/window-level inspection and input in visible local app windows. Use when a task must read or operate a native app or an external browser window (for example, Chrome, Edge, or Safari) or an app webview. Do not use for Orca's embedded browser or page-only browser automation. Use…

stablyai/orca · 99 tokens

orca-emulator-android

Control an Android emulator / device from inside Orca using the orca CLI. Use for listing/booting AVDs, taps, swipes, typing, hardware buttons (incl. Back and Recents), rotation, app install/launch, runtime permissions, the accessibility tree, and logcat — driving a real adb-connected device or emulator.…

stablyai/orca · 104 tokens

analyze-market

Perform a market analysis for a product category or segment. Trigger on: market analysis, market size, TAM SAM SOM, market opportunity, industry analysis.

langchain-ai/deepagents · 34 tokens