跳到正文
Skillpedia
部署与云(DevOps)5.1k · #15172

omh-terminal

它能做什么

该技能为 AI 智能体运行终端命令时增加安全步骤。适合允许智能体使用命令行的开发者。

适用场景

  • ✓当智能体需要在特定项目文件夹中运行 shell 命令时。
  • ✓当某个命令可能改动文件或影响外部系统,需要先确认时。
  • ✓当你希望测试运行的结果只根据实际执行的内容来报告时。

技能链接

https://github.com/rlaope/oh-my-hermes/blob/main/agent-skills/omh-terminal/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/rlaope/oh-my-hermes/blob/main/agent-skills/omh-terminal/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在项目终端中运行 npm test,并总结输出结果。在运行任何有风险的内容之前,请先问我。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体设定工作文件夹、环境和超时时间,然后在执行不可逆的命令之前与你确认。它只根据命令实际返回的结果来报告。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Command Operator

This is an OMH command-operator workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

Why This Exists

command-operator exists because a host's own approval gate flags only some commands and can approve one with nobody asked: it fixes the working directory, environment, timeout, and stop condition, confirms every irreversible or externally visible command in chat whether or not the host flags it, records the host's own approval answer beside that confirmation, and reports results only from what the run returned.

Do Not Use When

  • An ordinary read-only or test command with a known working directory and nothing to gate; run it with the native terminal tool.
  • The user pasted a failed command's output and asks for the cause; use omh-build-failure-triage, or omh-agent-debug when the agent itself is stuck.
  • The user wants a command blocked for the agent from now on; use omh-security-safety-review, which prepares a proposed deny-glob list for the user to apply.

Examples

Good example:

  • Prompt: command-operator run npm test in the project terminal and summarize the output.
  • Expected behavior: Produce prepare_command_operator_card with required context, wrapper actions, and not-evidence boundaries.
  • Why: The prompt names a real workflow surface that Hermes can orchestrate without hiding execution.

Bad example:

  • Prompt: command-operator run rm -rf without cwd, confirmation, or observation gates.
  • Expected behavior: Report the missing observed evidence or authority instead of claiming the external step happened.
  • Why: Prepared OMH guidance is not platform, runtime, connector, file, memory, or delivery evidence.

Completion Checklist

  • Command text, working directory, environment assumptions, timeout, safety level, and stop condition are explicit.
  • Destructive, credential, network, filesystem mutation, install, deploy, and production commands are confirmed in chat before the run, or marked missing and not run; a native approval note is recorded beside that confirmation, never in place of it.
  • With nobody to answer the confirmation (a scheduled job, a one-shot run, a webhook run), an irreversible or externally visible action is not run: it is handed to a person's turn and its confirmation is recorded as missing.
  • Exit codes, stdout/stderr, test results, package-manager effects, and filesystem mutations are reported only from observed command evidence.

Recovery Notes

  • If command text or working directory is missing, ask for the smallest missing scope needed before preparing the command task.
  • If the command is irreversible or externally visible, require an explicit confirmation gate in chat before the run, whether or not the host flags it: deleting or overwriting user data, discarding history or force-pushing, deleting a remote branch, dropping, deleting from, truncating, or flushing a database, a credentialed or networked mutation, device actuation, an install, a deploy, a production change, or an external send.
  • On Hermes, record the terminal result's approval note beside that confirmation as additional evidence, never in place of it: a note that the command "was approved by the user" is the person's answer to Hermes' own prompt for that command, while "auto-approved by smart approval" or no note at all is not a person's consent, and a pending_approval status means the command has not run and will not run on its own (Hermes stores it without running it, and /approve resumes only a run that is still waiting on an approval), so it is never re-run or reworded and goes to a person's turn.
  • On Hermes, a cron job, a one-shot -q run, or a webhook run denies a flagged command by default (approvals.cron_mode, approvals.single_query_mode, approvals.unattended_mode): record the block as the gate's outcome and hand the command to a person's turn, never rephrase it to get past the gate. Nobody can answer the chat confirmation in those runs either, so an irreversible or externally visible command that Hermes does not flag is not run: it is handed to a person's turn and its confirmation is recorded as missing.
  • If the user supplied failed command output and asks for root cause, route to build-failure-triage or agent-debug instead of preparing a fresh command.

When to Use

Use when Hermes should prepare or supervise terminal/CLI command execution without claiming the command ran or succeeded.

Strong 
常见问题

它会阻止所有命令吗?

不会。普通的只读命令或测试命令可以通过常规终端工具运行。

我能阻止智能体运行某些命令吗?

该技能会建议一份拟议的阻止列表,你可以自行应用。

谁来批准有风险的命令?

你来批准。在运行有风险的命令之前,该技能会在聊天中请求你的确认。

详情

作者的原始描述

[omh] Shell command or test-suite execution: policy overlay for terminal commands - add cwd, environment, safety, and result-evidence gates after preferring native shell tools for ordinary CLI, package-manager, and test runs. Use when the user says: command-operator, command operator, terminal command, terminal task, shell command, shell task, cli command, command execution.

repo: rlaope/oh-my-hermes

热度

GitHub 星标
5.1k
排名
#15172
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能