AGENT SKILL

clrun

Run and control interactive CLI sessions for AI agents. Handles TUI prompts (select lists, checkboxes, confirms), persistent shell state, and long-running processes. Use when you need to execute terminal commands, respond to interactive prompts, navigate scaffolding wizards like create-vue or create-vite, or manage dev servers.

License 许可
MIT
最近更新
2026-06-29
Stars
★ 0
Forks
0

01 前言 Front Matter

name
clrun
license
MIT
metadata
{ "author": "cybertheory", "version": "1.0.1" }
description
Run and control interactive CLI sessions for AI agents. Handles TUI prompts (select lists, checkboxes, confirms), persistent shell state, and long-running processes. Use when you need to execute terminal commands, respond to interactive prompts, navigate scaffolding wizards like create-vue or create-vite, or manage dev servers.
compatibility
Requires Node.js >= 18 or Python >= 3.9. Works on macOS and Linux. Node version also supports Windows.

02 资源文件 5

03 SKILL.md 正文

clrun — The Interactive CLI for AI Agents

No more `--yes` flags or command retries. `clrun` gives you full control over interactive terminal sessions with structured YAML responses.

Install

Node.js: ```bash npm install -g clrun ```

Python (uv): ```bash uv tool install clrun-cli ``` (pip: `pip install clrun-cli`)

Core Commands

Action Command
Run a command `clrun <command>`
Send text + Enter `clrun <id> "text"`
Send keystrokes `clrun key <id> down enter`
Toggle checkbox `clrun key <id> space`
Accept default `clrun key <id> enter`
View output `clrun tail <id>`
Check sessions `clrun status`
Kill session `clrun kill <id>`
Interrupt `clrun key <id> ctrl-c`

Two Input Modes

Text input — sends text followed by Enter: ```bash clrun <id> "my-project-name" # Type and press Enter clrun <id> "" # Just press Enter ```

Keystroke input — sends raw keys for TUI navigation: ```bash clrun key <id> down down enter # Select 3rd item in list clrun key <id> space down space enter # Toggle checkboxes 1 and 2 clrun key <id> enter # Accept default ```

Available keys: `up`, `down`, `left`, `right`, `enter`, `tab`, `escape`, `space`, `backspace`, `delete`, `home`, `end`, `pageup`, `pagedown`, `ctrl-c`, `ctrl-d`, `ctrl-z`, `ctrl-l`, `ctrl-a`, `ctrl-e`, `y`, `n`

Identifying Prompt Types

You see Type Action
`◆ Name: │ default` Text input `clrun <id> "value"` or `clrun key <id> enter`
`● Opt1 ○ Opt2 ○ Opt3` Single-select `clrun key <id> down... enter`
`◻ Opt1 ◻ Opt2 ◻ Opt3` Multi-select `clrun key <id> space down... enter`
`● Yes / ○ No` Confirm `clrun key <id> enter` or `right enter`
`(y/n)` Simple confirm `clrun <id> "y"` or `clrun <id> "n"`
`name: (default)` Readline `clrun <id> "value"` or `clrun <id> ""`

Select List Navigation

Count items from the top. First item is highlighted by default. To select item N, send N-1 `down` presses then `enter`.

Multi-Select Pattern

Plan a sequence of `space` (toggle) and `down` (skip) from top to bottom, ending with `enter`:

```bash

Select items 1, 3, and 4 from a list of 5:

clrun key <id> space down down space down space enter ```

Reading Responses

All responses are structured YAML. Key fields:

  • `terminal_id` — store this for all subsequent calls
  • `output` — cleaned terminal output (ANSI stripped)
  • `status` — `running`, `suspended`, `exited`, `killed`, `detached`
  • `hints` — exact commands you can run next
  • `warnings` — detected issues with input or output

Workflow Pattern

  1. START → `clrun <command>` → get terminal_id
  2. OBSERVE → `clrun tail <id>` → read output, identify prompt
  3. INTERACT → `clrun <id> "text"` or `clrun key <id> ...` → respond
  4. REPEAT → steps 2-3 until done
  5. CLEANUP → `clrun kill <id>` → if needed

Shell Variable Quoting

Use single quotes to prevent your shell from expanding `$` variables: ```bash clrun <id> 'echo $MY_VAR' # Correct clrun <id> "echo $MY_VAR" # Wrong — expanded before clrun sees it ```

Session Persistence

  • Environment variables persist within a session
  • Sessions auto-suspend after 5 min idle (env and cwd saved)
  • Sending input to a suspended session auto-restores it

See references/tui-patterns.md for complete real-world examples.

04 同仓库更多 Skills

Blake-John
Blake-John/agent-config

websocket-engineer

当使用 WebSocket 或 Socket.IO 构建实时通信系统时使用。适用于双向消息通信、Redis 水平扩展、在线状态追踪、房间管理。

★ 0
Blake-John
Blake-John/agent-config

security-reviewer

识别安全漏洞,生成带有严重性评级的结构化审计报告,并提供可操作的安全修复建议。在开展安全审计、审查代码漏洞或分析基础设施安全时使用。适用于 SAST 扫描、渗透测试、DevSecOps 实践、云安全审查、依赖审计、密钥扫描或合规检查。生成漏洞报告、优先级建议和合规清单。

开发工程师测试与质量Skill与智能体开发
★ 0
Blake-John
Blake-John/agent-config

secure-code-guardian

用于实现认证/授权、保护用户输入或防御 OWASP Top 10 漏洞 —— 包括自定义安全实现,例如使用 bcrypt/argon2 哈希密码、使用参数化语句清理 SQL 查询、配置 CORS/CSP 头部、使用 Zod 验证输入以及设置 JWT token。适用于认证、授权、输入验证、加密、OWASP Top 10 防护、安全会话管理和安全加固。对于预构建的 OAuth/SSO 集成或独立的安全审计,请考虑使用更专业的 skill。

开发工程师
★ 0
Blake-John
Blake-John/agent-config

rust-engineer

编写、审查和调试符合 Rust 风格的代码,确保内存安全和零成本抽象。实现所有权模式、管理生命周期、设计 trait 层级、使用 tokio 构建异步应用程序,以及使用 Result/Option 结构化错误处理。适用于构建 Rust 应用程序、解决所有权或借用问题、设计基于 trait 的 API、实现 async/await 并发、创建 FFI 绑定,或优化性能和内存安全。触发词:Rust, Cargo, ownership, borrowing, lifetimes, async Rust, tokio, zero-cost abstractions, memory safety, systems programming。

开发工程师
★ 0
Blake-John
Blake-John/agent-config

react-native-expert

使用 React Native 和 Expo 构建、优化和调试跨平台移动应用。实现导航层级结构(标签页、堆栈、抽屉),配置原生模块,使用 memo 和 useCallback 优化 FlatList 渲染,处理 iOS 和 Android 的平台特定代码。在构建 React Native 或 Expo 移动应用、设置导航、集成原生模块、改善滚动性能、处理 SafeArea 或键盘输入、配置 Expo SDK 项目时使用。

前端开发
★ 0
Blake-John
Blake-John/agent-config

react-expert

当你使用 .jsx 或 .tsx 文件构建 React 18+ 应用、Next.js App Router 项目或 create-react-app 时使用。创建组件、实现自定义 hooks、调试渲染问题、将类组件迁移为函数组件、以及实现状态管理。适用于 Server Components、Suspense 边界、useActionState 表单、性能优化或 React 19 特性。

前端开发
★ 0