Skip to content
FunCoding

Search

Search docs, Skills and MCP

yao-daemon

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.

AI 与智能体8.1ktools/skills/yao-daemon/SKILL.md

Install

Send this to Claude Code, Codex or Cursor. The agent checks the Skill for safety first and installs it only after you confirm.

读取 https://funcoding.ai/skills/yaoapp/yao/yao-daemon/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

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

ParamRequiredDefaultDescription
commandyes—Shell command to execute
descriptionyes—Concise 5–10 word summary
portnoauto-detectExpected listen port; the system verifies the port is ready before reporting it
argsno—Additional arguments
working_dirnoworkspaceWorking directory

yao_daemon_list

ParamDefaultDescription
statusallFilter: running, stopping, completed, failed, cancelled, port_detecting, all
limit20Max items per page
offset0Skip first N items

yao_daemon_restart / yao_daemon_status / yao_daemon_stop

ParamRequiredDescription
daemon_idyesThe 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.

Similar Skills

algorithmic-art
anthropics/skills180k

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

AI & agents

academy-guide
anthropics/skills180k

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

AI & agents

mcp-builder
anthropics/skills180k

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

AI & agents

template-skill
anthropics/skills180k

template-skill

Replace with description of the skill and when Claude should use it.

AI & agents

internal-comms
anthropics/skills180k

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

AI & agents

brand-guidelines
anthropics/skills180k

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

AI & agents