Langsung ke konten
Skillpedia
Pemrograman umum11k Β· #11812

hive.terminal-tools-foundations

Fungsinya

Skill ini menjelaskan cara AI menjalankan perintah, membaca dan mengedit berkas, serta mencari di folder di komputer Anda. Skill ini ditujukan untuk orang yang ingin AI mereka mengerjakan tugas langsung di folder proyek.

Kapan dipakai

  • βœ“Saat AI perlu menjalankan perintah, seperti build atau tes, di komputer Anda.
  • βœ“Saat Anda ingin AI mencari teks atau nama berkas di sebuah proyek.
  • βœ“Saat sebuah tugas membutuhkan berkas diedit di folder proyek.

Link skill

https://github.com/aden-hive/hive/blob/main/core/framework/skills/_preset_skills/terminal-tools-foundations/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/aden-hive/hive/blob/main/core/framework/skills/_preset_skills/terminal-tools-foundations/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œJalankan tes di folder proyek saya dan beri tahu saya mana yang gagal.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

AI menjalankan perintah di shell yang sesuai dengan sistem Anda, seperti Git Bash atau PowerShell, lalu membaca hasilnya. AI juga bisa mencari berkas dan membuat perubahan di folder kerja Anda.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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_file before edit_file when the coding tools are enabled; it records file state for the stale-edit guard. Otherwise use a command appropriate to shell_kind.
  • Editing files β†’ prefer edit_file when enabled. Replacement mode requires a unique match unless replace_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) and terminal_glob (find files by name)
  • Browser / web pages β†’ call browser_setup, read the browser skill, then run hive-browser <command> --json through terminal_exec.
  • Web search β†’ check the inventory for web_search and 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

Pertanyaan umum

Shell apa yang dipakai di Windows?

Memilih Git Bash terlebih dahulu, lalu PowerShell, lalu cmd, dan memeriksa jenis shell pada setiap hasil.

Bisakah bekerja di luar folder proyek saya?

Bisa. Jalur absolut yang eksplisit menggantikan folder proyek default.

Apakah berkas diperiksa sebelum diedit?

Ya. AI membaca berkas terlebih dahulu dan memakai langkah edit yang membutuhkan kecocokan unik, kecuali diminta sebaliknya.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
11k
Peringkat
#11812
Lisensi
Apache-2.0
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa