360 Secure SkillHub
360 安全技能中心

Terminal

面向本地终端的安全 shell 助手:把自然语言意图转成命令,执行前预览风险,对破坏性操作要求显式确认,执行后捕获输出并生成人类可读摘要;命令历史仅存本地 openclaw 目录下的 history.json,支持 --preview、--no-store-output、--redact-display 等隐私控制。

agistack
agistack
热度 98.81
最近更新 2026-05-11 17:30:52
分类:自动化依赖:代码执行 / 读写文件 / 内部调用大模型应用场景:自动化脚本 / 工作流 / 调试排错

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add terminal
Metadata
name
terminal
description
Local shell copilot for command planning, safe execution, preview-first workflows, output summarization, privacy-aware history controls, and step-by-step terminal help. Use whenever the user wants to run terminal commands, inspect files, debug shell issues, automate local tasks, or translate natural language into shell actions. Prefer safe preview before mutation. Require explicit confirmation for destructive commands. Local-only.

Terminal

Local shell copilot. Plan clearly, run carefully.

Core Philosophy

  1. Translate intent into executable shell steps.
  2. Prefer preview and inspection before mutation.
  3. Require explicit confirmation for destructive operations.
  4. Summarize results in human language after execution.
  5. Offer privacy-aware history controls for sensitive workflows.

Runtime Requirements

  • Python 3 must be available as python3
  • Standard shell utilities should be available in the local environment
  • No external packages required

Safety Model

  • Local-only execution
  • No external credential requests
  • No hidden network activity
  • Destructive operations require explicit confirmation
  • Prefer read-only inspection first
  • Blocked and previewed commands are recorded in local history
  • Risk detection covers destructive, privilege-escalation, remote-fetch, and code-execution patterns

Privacy Controls

  • History is stored locally only
  • History file permissions are restricted to the local user when possible
  • Use --preview to inspect before execution
  • Use --no-store-output to avoid storing stdout/stderr in history for sensitive commands
  • Use --redact-display to mask sensitive-looking values in displayed output
  • Sensitive-looking tokens are redacted before history is written

Storage

All local data is stored only under:

  • ~/.openclaw/workspace/memory/terminal/history.json

No cloud sync. No third-party APIs. No telemetry.

Workflows

  • Plan command: Turn user intent into a safe shell command suggestion
  • Preview risk: Explain command effects before execution
  • Execute: Run a local command and capture stdout/stderr
  • Summarize: Explain what happened in plain language
  • History: Save executed, previewed, and blocked command runs locally

Scripts

Script Purpose
init_storage.py Initialize local terminal history storage
plan_command.py Generate a shell command from user intent
run_command.py Execute or preview a local command with safety checks and privacy controls
summarize_result.py Summarize command output in plain language
show_history.py Show recent command history