hive.terminal-tools-foundations
What it does
This skill explains how an AI runs commands, reads and edits files and searches folders on your computer. It is for people who want their AI to do hands-on work in a project folder.
When to use it
- βWhen your AI needs to run a command, such as a build or a test, on your computer.
- βWhen you want the AI to search a project for text or file names.
- βWhen a task needs files edited in a project folder.
Skill link
https://github.com/aden-hive/hive/blob/main/core/framework/skills/_preset_skills/terminal-tools-foundations/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βRun the tests in my project folder and tell me which ones fail.β
5 new skills a week. 1 minute to read.
How it works
The AI runs commands in a shell that suits your system, such as Git Bash or PowerShell, and reads the result. It can also search files and make edits in the folder you are working in.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
terminal-tools β foundations
These tools provide command execution, background jobs, log streaming, filesystem search, and optional PTY sessions. POSIX uses bash for shell commands; Windows selects Git Bash, PowerShell, then cmd. Inspect shell_kind in results.
Tool preference (read first)
Use search_tools(query="inventory") before describing capabilities. It reports this session's loaded, searchable, disabled, and configured-but-unavailable tools. Load searchable tools by exact name. An absent schema alone does not prove a capability is missing; configuration does not prove credentials or connectivity work. Terminal tools and coding file tools default to the injected session workdir; an explicit absolute path overrides it.
- Reading files β use
read_filebeforeedit_filewhen the coding tools are enabled; it records file state for the stale-edit guard. Otherwise use a command appropriate toshell_kind. - Editing files β prefer
edit_filewhen enabled. Replacement mode requires a unique match unlessreplace_all=true; patch mode validates all operations before writing. Inspect its changed-file summary and diff. Re-read files after external changes. Terminal editing remains available when coding tools are disabled. - Writing files β heredoc:
terminal_exec("cat > PATH <<'EOF' ... EOF") - Searching β
terminal_rg(content / regex grep) andterminal_glob(find files by name) - Browser / web pages β call
browser_setup, read the browser skill, then runhive-browser <command> --jsonthroughterminal_exec. - Web search β check the inventory for
web_searchand load it if available; verify required credentials. Do not invent a callable tool name. - System operations (process exec, jobs, PTYs) β terminal-tools. This is its territory.
The standard envelope
Every spawn-style call (terminal_exec, the auto-promoted job state) returns this shape:
{
"exit_code": 0, // null when auto-backgrounded or pre-spawn error
"stdout": "...", // decoded, truncated to max_output_kb (default 256 KB)
"stderr": "...",
"stdout_truncated_bytes": 0, // > 0 means more is in output_handle
"stderr_truncated_bytes": 0,
"runtime_ms": 42,
"pid": 12345,
"output_handle": null, // "out_<hex>" when truncated β paginate with terminal_output_get
"timed_out": false,
"semantic_status": "ok", // "ok" | "signal" | "error" β read THIS, not just exit_code
"semantic_message": null, // e.g. "No matches found" for grep exit 1
"warning": null, // e.g. "may force-remove files" for rm -rf
"auto_backgrounded": false,
"job_id": null, // set when auto_backgrounded=true
"shell_kind": "bash" // interpreter that ran it: "bash" | "powershell" | "cmd" | "direct"
}
Auto-promotion (the core mental model)
The agent loop first waits up to five seconds for terminal_exec. A slower call returns a bg_* handle; redeem it with collect_result. The terminal's own promotion threshold defaults to 30 seconds. Past that threshold it transfers the process to its job manager and returns:
{ "auto_backgrounded": true, "exit_code": null, "job_id": "job_<hex>", ... }
When you see auto_backgrounded: true, pivot to polling. The job is still running:
terminal_job_logs(job_id, since_offset=0, wait_until_exit=true, wait_timeout_sec=30)
β blocks server-side until the job exits or the timeout, returns logs + status
You're not failing β you're freed up to do other work while the long task runs.
collect_result does not redeem job_id: after collecting a promoted call, use terminal_job_logs until status is exited. Track separate stdout/stderr offsets; use terminal_job_manage(action="signal_term", job_id=...) to cancel. Poll waits are capped at 45 seconds and do not extend execution deadlines. Job retrieval/management ship with basic exec; explicit job creation and PTYs require the advanced category.
timeout_sec defaults to 60 seconds from command start, including time after promotion. Expiry terminates the owned process tree; final logs report timed_out=true. A deadline at or before promotion kills inline. Set timeout_sec=0 for unlimited execution with promotion enabled. To keep execution foreground, set auto_background_after_sec=0 and a finite timeout of at most 220 seconds (or less if the caller has a smaller b
FAQ
Which shell does it use on Windows?
It picks Git Bash first, then PowerShell, then cmd, and inspects the shell kind in each result.
Can it work outside my project folder?
Yes. An explicit absolute path overrides the default project folder.
Does it check files before editing them?
Yes. It reads a file first and uses an edit step that needs a unique match unless told otherwise.
Details
Original description by the author
Required when terminal_* tools are available. Explains foreground execution, outer collect_result handles, promoted job IDs and their retrieval/cancellation, deadlines, output retention, platform shell selection, and structured editing when enabled.
repo: aden-hive/hive
Popularity
- GitHub stars
- 11k
- Ranking position
- #11812
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
browser-edge-cases
11kHelps your agent fix browser automation that fails on tricky sites such as LinkedIn, X or pages with heavy scripts.
hive.browser-automation
11kTeaches your agent to control your own Chrome browser with the hive-browser tool, using screenshots and clicks.
hive.colony-progress-tracker
11kHelps your agent claim tasks and record its steps and checks in a shared database, so work is tracked as it goes.
hive.context-preservation
11kHelps your agent save key facts from long tool results into notes before older details are removed from its memory.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.