yao-job
What it does
This skill runs longer commands for you, either waiting for them to finish or letting them run in the background. It is for people who need long tasks handled without losing track of them.
When to use it
- βWhen a command will take a long time and you want it run in the background.
- βWhen you want to check whether a background job has finished.
- βWhen a job is running too long and needs to be stopped.
Skill link
https://github.com/YaoApp/yao/blob/main/tools/skills/yao-job/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 this data export in the background and tell me when it finishes.β
5 new skills a week. 1 minute to read.
How it works
The agent starts the command either in the foreground, waiting for the result, or in the background with an ID. It then reads progress, waits with a time limit, or stops the job when you ask.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Background Jobs
Tools
yao_job_startβ Start a command.background false(default) blocks until done and returnsoutput_tail;background truereturnsjob_idimmediately.yao_job_listβ List jobs. Supports--statusfilter and--limit/--offsetpagination.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
offsetin a single read (nolimitparameter). - Ring buffer caps at 10 MB; older content beyond this is discarded.
- When content has been discarded,
lossy=truein 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
- Use
background true(not bare--background) for commands expected to run longer than 30 seconds. - Always provide a
description. - Foreground is default β the result and output come back in one call.
- Monitor background output with
yao_job_outputto check progress. - Use
yao_job_waitto 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:
- Review the
status,exit_code,cause, andoutput_tail. - If
status=failed, investigate and take corrective action. - If
status=completed, acknowledge and continue the task.
FAQ
Can a job be stopped?
Yes. A running job can be stopped by the agent.
Can a job time out?
Yes. You can set a maximum duration, after which the job is stopped.
How do I see the output?
The agent reads the job's output and can show the last lines when the job finishes.
Details
Original description by the author
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
Popularity
- GitHub stars
- 8.3k
- Ranking position
- #12476
- License
- β
- Updated
- 10/19/2026
Comments
- β¦
More skills from this repository
yao-agent
8.3kHelps your agent list the agents on a Yao host, look up or download agent code, deploy changes, and check the list of model connectors.
yao-audio
8.3kHelps your agent turn speech in audio files, such as meeting recordings, into written text, detecting the language when you do not name it.
yao-board
8.3kHelps your agent check kanban boards and task status on the Yao platform, so it reports real project progress instead of guessing.
yao-daemon
8.3kHelps your agent start, check, restart, and stop long-running background services, such as development servers, and read what they print.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.