yao-daemon
できること
このスキルは、Yaoプラットフォーム上で開発サーバーなど、長時間動くバックグラウンドのサービスを管理します。作業中にサーバーを動かし続ける必要がある開発者向けです。
使う場面
- ✓開発サーバーをバックグラウンドで起動したいとき。
- ✓バックグラウンドのサービスを確認、または再起動する必要があるとき。
- ✓まだ実行中のサービスを停止したいとき。
スキルのリンク
https://github.com/YaoApp/yao/blob/main/tools/skills/yao-daemon/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“開発サーバーをバックグラウンドで起動し、準備ができたらそのアドレスを教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、サービスをバックグラウンドで起動し、IDで追跡します。ポートの準備ができたら、そのポート番号を報告します。状態の確認、出力の読み取り、再起動、停止ができます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Daemon Management
Tools
yao_daemon_start— Start a long-running service. Always runs in background; returnsdaemon_idimmediately.yao_daemon_list— List daemons. Supports--statusfilter and--limit/--offsetpagination.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, incrementsdaemon_restarts).yao_job_output— Read daemon output (passdaemon_idasjob_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 viayao_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 within2s, returns60s).status: "port_detecting". Pollyao_daemon_statusuntil status changes torunning— either withdaemon_port: Nanddaemon_url(port confirmed), or withdaemon_port: 0anddetail: "specified port N not detected within timeout"(- No
--port(auto-detect): Scans the daemon's process tree for any listening TCP port. If not found within2s, returns60s); if a port is found, status changes tostatus: "port_detecting". The scan continues in background (runningwithdaemon_port/daemon_urland a<BackgroundJobReceipt>is delivered. If no port is found after ~60s, status changes torunningwithdaemon_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
- Always provide a
description. - Specify
portwhen starting a server — the system confirms the port is actually listening before reportingdaemon_url. - Daemons run indefinitely — use
yao_daemon_stopto terminate. - Use
yao_daemon_restartto restart a crashed or misconfigured daemon without losing its ID. - Monitor output with
yao_job_outputpassing thedaemon_idasjob_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
コメント
- …
このリポジトリの他のスキル
yao-agent
8.3kYaoホスト上のエージェントを一覧表示し、コードの確認、取得、デプロイ、モデルのコネクタ確認を支援します。
yao-audio
8.3kエージェントが、会議の録音などの音声ファイルを文字に起こすよう支援します。言語を指定しない場合は、自動で言語を判別します。
yao-board
8.3kYaoプラットフォーム上のカンバンボードとタスクの状況を、エージェントが確認できるよう支援します。推測ではなく、実際のプロジェクトの進捗を報告します。
yao-decision
8.3kサポートチケットの振り分け、コンテンツの評価、緊急のメッセージの発見などを、信頼度付きで構造化された判断として、エージェントが行うよう支援します。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。