微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

Cursor Tui

Cursor Tui · v1.0.0
安全 unknown 级 作者 waldyrious 公开目录收录
1.2k 下载 1 安装 3.6k 收藏 1 浏览

简介

Cursor Tui

原始描述

Spawn and relay Cursor Agent's CLI (`agent` binary) as an interactive passthrough. Use when the user wants to run Cursor Agent in a directory, ask it questio...

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/cursor-tui/
其它 Agent解压到它自己的 skills 目录,目录名用 cursor-tui

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

技能正文


name: cursor-tui description: Spawn and relay Cursor Agent's CLI (agent binary) as an interactive passthrough. Use when the user wants to run Cursor Agent in a directory, ask it questions, or send follow-up prompts — acting as a transparent bridge between the user and the agent session. metadata: {"openclaw":{"requires":{"bins":["cursor","cursor-agent"]}}}

Cursor CLI Passthrough

Spawn Cursor's agent in a PTY background session and relay its output and the user's inputs as a silent passthrough.

Spawning

{ "tool": "exec", "command": "agent", "pty": true, "background": true, "workdir": "<project-dir>", "yieldMs": 3000 }
  • Always set workdir to the project directory the user wants to work in (not the OpenClaw workspace).
  • If the user doesn't specify a directory, ask before spawning.
  • Note: agent requires workspace trust on first run in a directory — relay the trust prompt and send the user's choice (e.g. a, w, or q) via process send-keys.

Relaying output

After spawning or sending input, poll for output:

{ "tool": "process", "action": "poll", "sessionId": "<id>", "timeout": 15000 }
  • Strip ANSI escape codes mentally when summarizing, but relay the content faithfully.
  • Do not wrap output in code blocks or quote formatting.
  • Do not add preamble like "Cursor Agent's response:" or postamble like "What would you like to ask it?"
  • After relaying the agent's response, append a single prompt line: cursor @ <workdir>

Sending user input

For single-line prompts:

{ "tool": "process", "action": "submit", "sessionId": "<id>", "data": "<text>" }

For multi-line prompts:

{ "tool": "process", "action": "paste", "sessionId": "<id>", "text": "<text>" }

Then submit with Enter:

{ "tool": "process", "action": "send-keys", "sessionId": "<id>", "keys": ["Enter"] }

For other special keys (arrow keys, Escape, etc.):

{ "tool": "process", "action": "send-keys", "sessionId": "<id>", "keys": ["ArrowUp"] }

Use @filename or @directory/ in interactive prompts to add more context.

Ending the session

Send /quit or Ctrl+D (double-press):

{ "tool": "process", "action": "submit", "sessionId": "<id>", "data": "/quit" }

Notes

  • agent is Cursor's CLI binary. cursor-agent is a backward-compatible alias.
  • The binary must be on PATH. If not found, check TOOLS.md for custom binary paths.
  • One session at a time is typical; use process list to check for orphaned sessions.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill