360 Secure SkillHub
360 安全技能中心

Terminal Command Execution

面向终端命令执行的任务型 Skill:先澄清目标与范围,做预检(工作目录、二进制、当前状态),增量执行最小命令并逐步验证,按错误类别逐个修复,最后汇报执行内容与状态;默认避免破坏性命令,特权或破坏性操作需先征求用户批准。

分类:自动化
big-fox
big-fox
热度 54.25
最近更新 2026-05-11 17:28:41

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add big-fox/terminal-command-execution
兼容性
通用兼容
联网要求
联网要求未确认
数据出网
数据不出本机
Metadata
name
terminal-command-execution
description
Execute terminal commands safely and reliably with clear pre-checks, output validation, and recovery steps. Use when users ask to run shell/CLI commands, inspect system state, manage files, install dependencies, start services, debug command failures, or automate command-line workflows.

Terminal Command Execution

Overview

Use this skill to run terminal commands with minimal risk and predictable outcomes. Prefer fast inspection, explicit intent checks, and verification after each state-changing step.

Workflow

  1. Clarify goal and scope.
  • Infer the exact command target from context (path, service, tool, environment).
  • If request is ambiguous and risky, ask one concise clarifying question.
  1. Pre-flight checks.
  • Confirm working directory and required binaries.
  • Inspect current state before changing it (for example ls, git status, process/listen state).
  • Prefer non-destructive probes first.
  1. Execute commands incrementally.
  • Run the smallest command that advances the task.
  • For multi-step tasks, validate each step before continuing.
  • Use reproducible commands and avoid interactive flows when non-interactive options exist.
  1. Handle failures systematically.
  • Read stderr first and identify root cause class: permission, path, missing dependency, syntax, network, or runtime state.
  • Apply one fix at a time, then re-run only the affected command.
  • If privileged/destructive action is required, request user approval before proceeding.
  1. Verify outcomes.
  • Check exit status and observable state changes.
  • For installs, verify with a version/health command.
  • For edits, verify resulting files and behavior.
  1. Report clearly.
  • Summarize what ran, what changed, and current status.
  • Include exact next command only when additional user action is required.

Safety Rules

  • Avoid destructive commands by default (rm -rf, force resets, broad chmod/chown) unless explicitly requested.
  • Never assume network, permissions, or package managers are available; test first.
  • Prefer scoped operations (specific files/paths/services) over global changes.
  • Keep secrets out of command output and logs.

Command Patterns

  • Discovery: pwd, ls -la, rg --files, which <tool>
  • Validation: <tool> --version, health/status commands, targeted smoke tests
  • Diagnostics: inspect logs/errors first, then adjust one variable at a time