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

yao-daemon

하는 일

이 스킬은 Yao 플랫폼에서 개발 서버처럼 오래 실행되는 백그라운드 서비스를 관리합니다. 작업하는 동안 서버를 계속 실행해 두어야 하는 개발자를 위한 것입니다.

사용하는 경우

  • ✓개발 서버를 백그라운드에서 시작하고 싶을 때.
  • ✓백그라운드 서비스를 확인하거나 재시작해야 할 때.
  • ✓아직 실행 중인 서비스를 멈추고 싶을 때.

스킬 링크

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

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

사용 방법

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

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

Use this skill to help me: https://github.com/YaoApp/yao/blob/main/tools/skills/yao-daemon/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에서 그대로 가져왔습니다.

Daemon Management

Tools

  • yao_daemon_start — Start a long-running service. Always runs in background; returns daemon_id immediately.
  • yao_daemon_list — List daemons. Supports --status filter and --limit/--offset pagination.
  • yao_daemon_status — Get full details for a daemon (daemon_port, daemon_url, started_at, daemon_restarts).
  • yao_daemon_stop — Stop a running daemon.
  • yao_daemon_restart — Restart a daemon (preserves the same ID, increments daemon_restarts).
  • yao_job_output — Read daemon output (pass daemon_id as job_id).

Parameters

yao_daemon_start

Param Required Default Description
command yes — Shell command to execute
description yes — Concise 5–10 word summary
port no auto-detect Expected listen port; the system verifies the port is ready before reporting it
args no — Additional arguments
working_dir no workspace Working directory

yao_daemon_list

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

yao_daemon_restart / yao_daemon_status / yao_daemon_stop

Param Required Description
daemon_id yes The daemon ID

Response Fields

All responses are JSON. Daemon objects contain:

id, kind, session_id, status, description,
command, command_argv, command_line, pid, pgid, user,
started_at, finished_at, duration_ms, exit_code, signal, detail,
daemon_port, daemon_url, daemon_restarts, seq
  • daemon_port — The verified listen port (0 if not yet detected or not specified).
  • daemon_url — http://localhost:<port> (empty until port is verified as listening by the daemon's own process tree).
  • daemon_restarts — Number of restarts via yao_daemon_restart.
  • started_at — Unix millisecond timestamp of the most recent start.

Port detection behavior:

Both modes start by returning port_detecting with daemon_port: 0 if the port is not confirmed within the initial ~2s settle window. If the port is confirmed within ~2s, start returns running with daemon_port/daemon_url directly.

  • --port N (explicit): Verifies port N is listening AND owned by this daemon's process tree. If not confirmed within 2s, returns status: "port_detecting". Poll yao_daemon_status until status changes to running — either with daemon_port: N and daemon_url (port confirmed), or with daemon_port: 0 and detail: "specified port N not detected within timeout" (60s).
  • No --port (auto-detect): Scans the daemon's process tree for any listening TCP port. If not found within 2s, returns status: "port_detecting". The scan continues in background (60s); if a port is found, status changes to running with daemon_port/daemon_url and a <BackgroundJobReceipt> is delivered. If no port is found after ~60s, status changes to running with daemon_port: 0.

List (paginated)

{ "daemons": [...], "total": 5, "offset": 0, "limit": 20, "has_more": false }

Stop (already terminal)

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

Errors

Structured JSON with code and message:

{ "error": { "code": "not_found", "message": "daemon \"dmn_xxx\" not found" } }

Codes: invalid_argument, not_found, internal.

Usage Rules

  1. Always provide a description.
  2. Specify port when starting a server — the system confirms the port is actually listening before reporting daemon_url.
  3. Daemons run indefinitely — use yao_daemon_stop to terminate.
  4. Use yao_daemon_restart to restart a crashed or misconfigured daemon without losing its ID.
  5. Monitor output with yao_job_output passing the daemon_id as job_id.

BackgroundJobReceipt

When a daemon's port becomes ready, the system delivers a <BackgroundJobReceipt> XML message containing the daemon_url. Use that URL for subsequent HTTP requests to the daemon.

자주 묻는 질문

대화가 막히나요?

아닙니다. 서비스는 항상 백그라운드에서 실행되며, 에이전트는 바로 ID를 받습니다.

재시작하면 ID가 바뀌나요?

아닙니다. 재시작해도 같은 ID를 유지하며 재시작 횟수를 셉니다.

서비스가 출력한 내용은 어떻게 보나요?

에이전트는 별도의 출력 도구로 서비스의 출력을 읽습니다.

상세 정보

작성자의 원본 설명

Daemon process management — start, monitor, restart, stop long-running services. ALWAYS invoke this skill when the user asks to start, check, restart, or stop background services, dev servers, or daemon processes.

repo: YaoApp/yao

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬