본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)8.3k · #12476

yao-job

하는 일

이 스킬은 오래 걸리는 명령을 대신 실행합니다. 끝날 때까지 기다리거나 백그라운드에서 실행되게 합니다. 긴 작업을 놓치지 않고 처리하려는 사람을 위한 것입니다.

사용하는 경우

  • ✓명령이 오래 걸려 백그라운드에서 실행하고 싶을 때.
  • ✓백그라운드 작업이 끝났는지 확인하고 싶을 때.
  • ✓작업이 너무 오래 실행되어 중지해야 할 때.

스킬 링크

https://github.com/YaoApp/yao/blob/main/tools/skills/yao-job/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/YaoApp/yao/blob/main/tools/skills/yao-job/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 데이터 내보내기를 백그라운드에서 실행하고, 끝나면 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 명령을 전경에서 실행해 결과를 기다리거나, ID와 함께 백그라운드에서 실행합니다. 그다음 진행 상황을 읽고, 제한 시간 안에서 기다리거나, 요청하면 작업을 중지합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.
자주 묻는 질문

작업을 중지할 수 있나요?

네. 실행 중인 작업을 에이전트가 중지할 수 있습니다.

작업에 시간 제한을 둘 수 있나요?

네. 최대 실행 시간을 정할 수 있으며, 그 시간이 지나면 작업이 중지됩니다.

출력은 어떻게 보나요?

에이전트는 작업의 출력을 읽고, 작업이 끝나면 마지막 몇 줄을 보여 줄 수 있습니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
8.3k
순위
#12476
라이선스
—
업데이트
2026. 10. 19.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬