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.
72
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
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.| 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 |
| Param | Default | Description |
|---|---|---|
status | all | Filter: running, stopping, completed, failed, cancelled, all |
limit | 20 | Max items per page |
offset | 0 | Skip first N items |
| Param | Required | Description |
|---|---|---|
job_id | yes | Job or daemon ID |
offset | no | Byte offset to read from (0 = beginning) |
Output read behavior:
offset in a single read (no limit parameter).lossy=true in the response.size = total bytes the process has produced; offset = earliest readable byte position.size=20000000, offset≈10000000, lossy=true — the first ~10 MB was discarded.| Param | Required | Default | Description |
|---|---|---|---|
job_id | yes | — | Job ID |
timeout_ms | no | 60000 | Timeout in milliseconds |
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, seqReturns the job object plus output_tail (≤4KB tail of stdout+stderr):
{ "id": "job_...", "status": "completed", "exit_code": 0, ..., "output_tail": "hello world\n" }{ "jobs": [...], "total": 130, "offset": 0, "limit": 20, "has_more": true }{ "job": { ... }, "timed_out": false }{ "job": { ... }, "detail": "already in terminal state (failed); no action taken" }Structured JSON with code and message:
{ "error": { "code": "invalid_argument", "message": "job_id is required" } }Codes: invalid_argument, not_found, internal.
background true (not bare --background) for commands expected to run longer than 30 seconds.description.yao_job_output to check progress.yao_job_wait to block until a background job completes rather than polling.When a background job finishes, the system delivers a <BackgroundJobReceipt> XML message. Upon receiving it:
status, exit_code, cause, and output_tail.status=failed, investigate and take corrective action.status=completed, acknowledge and continue the task.YaoApp/yao
22a7a2c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.