← Back to Skills Marketplace
pikaqiuyaya

Command Output Display

by pikaqiuyaya · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
177
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install command-output-display
Description
展示完整终端命令及其全部输出,包括正常、错误、长输出、交互和后台运行,格式清晰易读,便于理解和调试。
README (SKILL.md)

Command Output Display - 命令输出展示技能

核心原则

用户应该能像坐在你旁边看你操作终端一样,看到每一个命令和它的完整输出!

📋 展示规范

1. 命令执行前

格式:

$ \x3Ccommand>

说明:

  • 使用 $ 前缀表示要执行的命令
  • 如果是多行命令,完整展示
  • 如果有注释,用 # 标注

示例:

$ systemctl --user status openclaw-gateway-boss.service --no-pager
$ cat > /tmp/test.json \x3C\x3C 'EOF'
{
  "config": "value"
}
EOF

2. 命令执行后

格式:

# 输出:
\x3Ccommand output here>

说明:

  • 使用 # 输出: 标记输出开始
  • 完整展示 stdout 和 stderr
  • 保持原始格式(包括颜色代码如果有的话)
  • 不要截断重要信息

示例:

# 输出:
● openclaw-gateway-boss.service - OpenClaw Gateway - Boss (爪爪机器人)
   Loaded: loaded (/home/admin/.config/systemd/user/openclaw-gateway-boss.service; enabled)
   Active: active (running) since Thu 2026-03-12 16:04:48 CST
 Main PID: 5820 (MainThread)

3. 错误输出

格式:

# 输出(错误):
\x3Cerror output>

# 错误信息:
- 退出码:\x3Cexit code>
- 详细说明:\x3Cdetails>

示例:

# 输出(错误):
Job for openclaw-gateway-boss.service failed because the control process exited with error code.

# 错误信息:
- 退出码:1
- 服务状态:failed
- 可能原因:配置文件不存在

🎯 完整流程示例

示例 1: 服务管理

📝 目标:检查 boss 网关服务状态

执行命令:
```bash
$ systemctl --user status openclaw-gateway-boss.service --no-pager -n 10

输出:

● openclaw-gateway-boss.service - OpenClaw Gateway - Boss (爪爪机器人) Loaded: loaded (/home/admin/.config/systemd/user/openclaw-gateway-boss.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2026-03-12 16:04:48 CST; 6s ago Main PID: 5820 (MainThread) CGroup: /user.slice/user-1000.slice/[email protected]/openclaw-gateway-boss.service └─5820 /usr/bin/node /opt/openclaw/dist/index.js gateway

Mar 12 16:04:48 iZbp14orusdl51yeoyqk9yZ systemd[992]: Started OpenClaw Gateway - Boss (爪爪机器人).

✅ 服务运行正常


### 示例 2: 文件操作

📝 目标:创建配置文件

执行命令:

$ cat > /home/admin/.openclaw/openclaw-boss.json \x3C\x3C 'EOF'
{
  "gateway": {
    "port": 19922,
    "mode": "local"
  }
}
EOF

输出:

(无输出表示成功)

验证文件:

$ ls -lh /home/admin/.openclaw/openclaw-boss.json

输出:

-rw-r--r-- 1 admin admin 6.0K Mar 12 17:50 /home/admin/.openclaw/openclaw-boss.json

✅ 文件创建成功,大小 6KB


### 示例 3: 多步骤操作

📝 任务:配置新网关

━━━━━━━━━━━━━━━━━━━━━━━━━━━ 步骤 1/4: 创建目录 ━━━━━━━━━━━━━━━━━━━━━━━━━━━

执行命令:

$ mkdir -p /home/admin/.openclaw/agents/boss

输出:

(无输出)

✅ 完成

━━━━━━━━━━━━━━━━━━━━━━━━━━━ 步骤 2/4: 复制 agent 配置 ━━━━━━━━━━━━━━━━━━━━━━━━━━━

执行命令:

$ cp -r /home/admin/.openclaw/agents/main/* /home/admin/.openclaw/agents/boss/

输出:

(无输出)

✅ 完成

━━━━━━━━━━━━━━━━━━━━━━━━━━━ 步骤 3/4: 创建配置文件 ━━━━━━━━━━━━━━━━━━━━━━━━━━━

[展示文件内容...]

✅ 配置文件已创建

━━━━━━━━━━━━━━━━━━━━━━━━━━━ 步骤 4/4: 验证结构 ━━━━━━━━━━━━━━━━━━━━━━━━━━━

执行命令:

$ tree -L 2 /home/admin/.openclaw/agents/boss/

输出:

/home/admin/.openclaw/agents/boss/ ├── agent │ └── agent.json └── sessions └── sessions.json

✅ 目录结构正确

━━━━━━━━━━━━━━━━━━━━━━━━━━━ 总结:所有步骤完成! ━━━━━━━━━━━━━━━━━━━━━━━━━━━


### 示例 4: 调试问题

⚠️ 服务启动失败,正在调试...

📝 步骤 1: 查看服务状态

执行命令:

$ systemctl --user status openclaw-gateway-boss.service --no-pager

输出:

● openclaw-gateway-boss.service - OpenClaw Gateway - Boss Loaded: loaded Active: failed (Result: exit-code) Main PID: 1234 (code=exited, status=1/FAILURE)

❌ 服务启动失败


📝 步骤 2: 查看详细日志

执行命令:

$ journalctl --user -u openclaw-gateway-boss.service -n 20 --no-pager

输出:

Mar 12 16:05:14 node[1234]: error: unknown option '--config' Mar 12 16:05:14 systemd[992]: openclaw-gateway-boss.service: Failed with result 'exit-code'.

🔍 发现问题:命令行参数 --config 不被支持


📝 步骤 3: 检查正确的参数

执行命令:

$ node /opt/openclaw/dist/index.js gateway --help

输出:

Usage: gateway [options]

Options: --port \x3Cport> Gateway port (default: 10041) --verbose Enable verbose logging --help Show help

✅ 应该使用 --port 而不是 --config


## 🛠️ 特殊情况处理

### 1. 长输出

如果输出很长(超过 50 行):
```bash
# 输出(前 50 行):
[显示前 50 行]

... (共 234 行,需要看完整输出吗?)

2. 二进制输出

如果命令产生二进制输出或乱码:

# 输出:
[二进制数据,已跳过]

# 文件信息:
-rwxr-xr-x 1 admin admin 1.2M Mar 12 17:50 binary_file

3. 交互式命令

如果需要用户交互:

⚠️ 这个命令需要交互输入:
```bash
$ openclaw channels login

输出:

? 选择渠道类型:
❯ WhatsApp
  Telegram
  Discord

需要你在终端亲自操作,我没法代劳。要我继续其他步骤吗?


### 4. 后台命令

如果命令在后台运行:

📝 启动后台服务...

执行命令:

$ systemctl --user start openclaw-gateway.service &

输出:

[后台运行中...]

等待 3 秒后检查状态:

$ systemctl --user is-active openclaw-gateway.service

输出:

active

✅ 服务已在后台启动


## 📊 输出解读

不要只展示输出,还要帮助解读:

```bash
# 输出:
tcp        0      0 0.0.0.0:19922    0.0.0.0:*    LISTEN    5820/openclaw-gatew

# 解读:
- 端口 19922 正在监听
- 进程 ID: 5820
- 绑定地址:0.0.0.0 (所有接口)
✅ 网关已成功启动

✅ 检查清单

执行命令后,确保:

  • 展示了完整的命令
  • 展示了完整的输出
  • 包含了错误信息(如果有)
  • 提供了解读或总结
  • 格式清晰易读

目标: 让用户感觉就像坐在你旁边,看着你在终端上操作一样!

Usage Guidance
This skill is a presentation guideline and is internally coherent, but it instructs the agent to show complete command outputs (including file contents, logs, and errors). Before installing or allowing autonomous use, consider: 1) only enable it for trusted agents or require user invocation rather than autonomous runs; 2) avoid running it in environments containing secrets or sensitive config (e.g., /home/*, systemd logs, database dumps); 3) test it in a disposable or sandbox environment first; 4) if you expect the agent to execute commands, restrict which commands it may run (deny ones that cat config files, read secrets, or dump credentials). If the skill had code files, an install step, or requested credentials, that would change the assessment.
Capability Analysis
Type: OpenClaw Skill Name: command-output-display Version: 1.0.0 The skill bundle 'command-output-display' provides formatting guidelines and instructions for an AI agent to transparently display terminal command execution and output to the user. It includes examples for service management, file operations, and debugging using standard system utilities (e.g., systemctl, journalctl, ls) in SKILL.md. No malicious intent, data exfiltration, or harmful instructions were identified.
Capability Assessment
Purpose & Capability
Name/description and SKILL.md are consistent: the skill's goal is to display executed commands and their complete outputs. There are no unrelated required binaries, environment variables, or install steps.
Instruction Scope
The instructions explicitly require showing full stdout/stderr, preserving colors, printing long outputs, binary output markers, and examples that read or create files (e.g., /home/admin/.openclaw/*), view journalctl logs, and run systemctl. That behavior is coherent with the stated purpose (full output display) but it also means the skill's usage can reveal sensitive files, credentials, or system state if the agent executes commands that access them.
Install Mechanism
No install spec and no code files — instruction-only — so nothing is written to disk or fetched during install.
Credentials
The skill requests no env vars or credentials (proportional). However SKILL.md references absolute user paths and system commands that can access sensitive configuration and logs. While not a mismatch, this increases the risk of sensitive-output disclosure when commands are executed.
Persistence & Privilege
always:false and no special privileges requested. The skill can be invoked autonomously by the agent (disable-model-invocation:false), which is the platform default; combined with the instruction to display full outputs this makes accidental or automated disclosure possible if the agent runs privileged commands.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install command-output-display
  3. After installation, invoke the skill by name or use /command-output-display
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of the Command Output Display skill. - Provides a clear and standardized way to display terminal commands and their outputs step-by-step. - Shows every executed command with its full output, including errors and interpretations. - Handles special cases: long outputs, binary/garbled output, interactive and background commands. - Includes process walkthroughs (setup, troubleshooting) with explanations and actionable summaries. - Ensures outputs are readable and informative—mimics the experience of observing terminal usage live.
Metadata
Slug command-output-display
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Command Output Display?

展示完整终端命令及其全部输出,包括正常、错误、长输出、交互和后台运行,格式清晰易读,便于理解和调试。 It is an AI Agent Skill for Claude Code / OpenClaw, with 177 downloads so far.

How do I install Command Output Display?

Run "/install command-output-display" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Command Output Display free?

Yes, Command Output Display is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Command Output Display support?

Command Output Display is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Command Output Display?

It is built and maintained by pikaqiuyaya (@pikaqiuyaya); the current version is v1.0.0.

💬 Comments