aden-hive/hive✦ 精选0°

hive.terminal-tools-foundations

仓库创建 2026年1月12日最近提交 1 个月前SkillHot 收录 20 天前
▸ 精选理由

为安全可靠地远程执行命令与管理长跑任务提供统一模式。

▸ 风险提示

执行任意 shell 命令具有高风险,需注意权限控制与命令审查

这个 Skill 做什么

介绍与代理可用的前后台终端执行、作业与输出封装的标准契约与使用模式。

把终端执行、后台作业和输出读取的约定讲清楚:terminal_exec 的前台/后台差别(超时后自动后台)、如何用 terminal_job_logs 轮询 job_id、以及输出信封(exit_code、stdout、output_handle)和分页取回方式。适合每次要用 shell_* 系列工具、做长时间命令或持久 PTY 操作前先看一遍。特别提醒哪些命令具有破坏性、优先用高层文件工具,以及 macOS 上 bash 的兼容策略。

▸ 展开 SKILL.md 英文原文

Required reading whenever any shell_* tool is available. Teaches the foreground/background dichotomy (terminal_exec auto-promotes past 30s, returns a job_id you poll with terminal_job_logs), the standard envelope shape (exit_code, stdout, stdout_truncated_bytes, output_handle, semantic_status, warning, auto_backgrounded, job_id), output handle pagination via terminal_output_get, when to read semantic_status instead of raw exit_code (grep/rg/find/diff/test exit 1 is NOT an error), the destructive-warning surface (rm -rf, git push --force, DROP TABLE), tool preference (use files-tools / gcu-tools / hive_tools before raw shell), and the bash-only-on-macOS policy. Skipping this leads to "tool returned no output" surprises, orphaned jobs, and panic over benign grep exit codes.

开发编程终端Shell作业控制通用
1.1w
Stars
5.7k
Forks
18
仓库内 Skill
+132
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/aden-hive/hive/main/core/framework/skills/_preset_skills/terminal-tools-foundations/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/aden-hive/hive/main/core/framework/skills/_preset_skills/terminal-tools-foundations/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# terminal-tools — foundations

These tools give you a real terminal: foreground exec with smart envelopes, background jobs with offset-based log streaming, persistent PTY shells, and filesystem search. Bash-only on POSIX.

## Tool preference (read first)

Before reaching for terminal-tools, check whether a higher-level tool already covers the task. Shell is for system operations the other servers don't reach.

- **Reading files** → `files-tools.read_file` (handles size, paging, line-numbered output) — NOT `terminal_exec("cat ...")`
- **Editing files** → `files-tools.edit_file` (atomic patch with diff verification) — NOT `terminal_exec("sed -i ...")`
- **Writing files** → `files-tools.write_
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有