Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)8.3k Β· #12476

yao-job

Fungsinya

Skill ini menjalankan perintah yang lebih panjang untuk Anda, baik dengan menunggu sampai selesai maupun membiarkannya berjalan di latar belakang. Skill ini untuk orang yang memerlukan tugas panjang yang tetap terpantau.

Kapan dipakai

  • βœ“Saat sebuah perintah akan memakan waktu lama dan Anda ingin ia dijalankan di latar belakang.
  • βœ“Saat Anda ingin memeriksa apakah pekerjaan latar belakang sudah selesai.
  • βœ“Saat sebuah pekerjaan berjalan terlalu lama dan perlu dihentikan.

Link skill

https://github.com/YaoApp/yao/blob/main/tools/skills/yao-job/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/YaoApp/yao/blob/main/tools/skills/yao-job/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 ekspor data ini di latar belakang dan beri tahu saya saat selesai.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent memulai perintah baik di latar depan, menunggu hasilnya, atau di latar belakang dengan ID. Setelah itu agent membaca kemajuan, menunggu dengan batas waktu, atau menghentikan pekerjaan saat Anda memintanya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Background Jobs

Tools

  • yao_job_start β€” Start a command. background false (default) blocks until done and returns output_tail; background true returns job_id immediately.
  • yao_job_list β€” List jobs. Supports --status filter and --limit/--offset pagination.
  • yao_job_get β€” Get full details for a job (or daemon by ID).
  • yao_job_output β€” Read process output (works for both job and daemon IDs).
  • yao_job_wait β€” Block until a background job finishes or timeout expires. Jobs only, not daemons.
  • yao_job_stop β€” Kill a running job.

Parameters

yao_job_start

Param Required Default Description
command yes β€” Shell command to execute
description yes β€” Concise 5–10 word summary
background no false true returns immediately; false blocks until done
args no β€” Additional arguments (rarely needed; prefer inline in command)
working_dir no workspace Working directory
max_duration_ms no β€” Kill the job after this many milliseconds

yao_job_list

Param Default Description
status all Filter: running, stopping, completed, failed, cancelled, all
limit 20 Max items per page
offset 0 Skip first N items

yao_job_output

Param Required Description
job_id yes Job or daemon ID
offset no Byte offset to read from (0 = beginning)

Output read behavior:

  • Returns all available content from offset in a single read (no limit parameter).
  • Ring buffer caps at 10 MB; older content beyond this is discarded.
  • When content has been discarded, lossy=true in the response.
  • size = total bytes the process has produced; offset = earliest readable byte position.
  • Example: a 20 MB output has size=20000000, offsetβ‰ˆ10000000, lossy=true β€” the first ~10 MB was discarded.

yao_job_wait

Param Required Default Description
job_id yes β€” Job ID
timeout_ms no 60000 Timeout in milliseconds

Response Fields

All responses are JSON. Job objects contain:

id, kind, session_id, status, description, background,
command, command_argv, command_line, pid, pgid, user,
started_at, finished_at, duration_ms, exit_code, signal, detail, seq

Foreground start (background=false)

Returns the job object plus output_tail (≀4KB tail of stdout+stderr):

{ "id": "job_...", "status": "completed", "exit_code": 0, ..., "output_tail": "hello world\n" }

List (paginated)

{ "jobs": [...], "total": 130, "offset": 0, "limit": 20, "has_more": true }

Wait

{ "job": { ... }, "timed_out": false }

Stop (already terminal)

{ "job": { ... }, "detail": "already in terminal state (failed); no action taken" }

Errors

Structured JSON with code and message:

{ "error": { "code": "invalid_argument", "message": "job_id is required" } }

Codes: invalid_argument, not_found, internal.

Usage Rules

  1. Use background true (not bare --background) for commands expected to run longer than 30 seconds.
  2. Always provide a description.
  3. Foreground is default β€” the result and output come back in one call.
  4. Monitor background output with yao_job_output to check progress.
  5. Use yao_job_wait to block until a background job completes rather than polling.

BackgroundJobReceipt

When a background job finishes, the system delivers a <BackgroundJobReceipt> XML message. Upon receiving it:

  1. Review the status, exit_code, cause, and output_tail.
  2. If status=failed, investigate and take corrective action.
  3. If status=completed, acknowledge and continue the task.
Pertanyaan umum

Apakah pekerjaan bisa dihentikan?

Bisa. Pekerjaan yang sedang berjalan dapat dihentikan oleh agent.

Apakah pekerjaan bisa kehabisan waktu?

Bisa. Anda dapat menetapkan durasi maksimum, setelah itu pekerjaan dihentikan.

Bagaimana saya melihat keluarannya?

Agent membaca keluaran pekerjaan dan dapat menampilkan beberapa baris terakhir saat pekerjaan selesai.

Detail

Deskripsi asli dari pembuat

Background job management β€” start, monitor, wait, stop long-running commands. ALWAYS invoke this skill when the user asks to run background tasks, check job status, read job output, or manage long-running commands.

repo: YaoApp/yao

Popularitas

Bintang GitHub
8.3k
Peringkat
#12476
Lisensi
β€”
Diperbarui
19/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa