daemon-status
Skill4 starsChanged 7 months agoMITView on GitHub
Show the cookiedclaw daemon's current state — running/stopped, last restart, workspace path, supervised CC child status (pid, uptime, restart count, live MCP sessions), recent journalctl tail. Use when the user asks "is cookiedclaw running?", "what's the daemon doing?", or wants a quick health check before debugging.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcCursor rule
- daemon-restartSkill
- debugSkill
- fal-setupSkill
- install-skillSkill
- setupSkill
- supermemory-setupSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 79
If runtime.state is backoff or live_sessions is 0 with state=running, that's a hint the watchdog is about to fire — surface it.
- Very specific: line 81
If the unit doesn't exist (is-active returns "inactive" + is-enabled returns "disabled"), tell the user the daemon isn't set up — point at …
- Very specific: line 83
If /health returns a connection refused, the gateway process isn't bound (or crashed mid-boot).
- Very specific: line 85
If the unit is failed or activating (auto-restart), surface the journal tail prominently — that's where the cause shows up.
- Very specific: line 94
Before /cookiedclaw:daemon-restart if you're unsure restart is even needed
- Very specific: line 95
After /cookiedclaw:install-skill from a fresh session to confirm the new skill landed (next session does this, not the dying one)
- Distinctive: line 97
Do not auto-call this every time — only when the user asks or the agent has reason to suspect a problem.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Daemon status
Quick health check on the cookiedclaw daemon. Use this before assuming things are healthy — it gives a one-glance summary so you can decide whether to restart, check logs, or just answer "yep, all good".
What to gather
There's only one systemd unit now (cookiedclaw-gateway.service) — the gateway supervises its own CC child internally. Run these in parallel where possible:
# Is the unit running right now?
systemctl --user is-active cookiedclaw-gateway
# Is it enabled to start at boot?
systemctl --user is-enabled cookiedclaw-gateway
# When did it last (re)start, what's the pid, etc — combined call.
systemctl --user show cookiedclaw-gateway --property=ActiveEnterTimestamp,MainPID,Restarts,SubState,Environment
# Supervised child + live MCP session count, served by the gateway.
# Port comes from the unit's GATEWAY_PORT env (default 47390).
curl -fsS http://127.0.0.1:47390/health
# Last 25 log lines for context.
journalctl --user -u cookiedclaw-gateway --no-pager -n 25The Environment=WORKSPACE=… line in systemctl show output is set by the unit (see setup Step 4h). Parse it out for display.
The /health JSON looks like:
{
"status": "ok",
"bot_polling": true,
"version": "0.1.2",
"runtime": {
"enabled": true,
"state": "running",
"pid": 12345,
"uptime_s": 1834,
"restarts": 2,
"live_sessions": 1
}
}runtime.state values: off (supervisor disabled), starting (child spawned, no MCP session yet), running (child up, ≥1 MCP session), backoff (child died, waiting before respawn), stopping (gateway shutting down).
How to present
Format the answer as a compact summary, not a wall of raw output:
🟢 cookiedclaw daemon
unit: cookiedclaw-gateway · active (running)
enabled: enabled
workspace: /home/p5ina/cookiedclaw
gateway pid: 12345
last start: 2026-04-28 12:08:43 (32m ago)
supervised CC:
state: running
pid: 12678
uptime: 30m 22s
restarts: 2
sessions: 1 live MCP session
last 15 log lines:
…If runtime.state is backoff or live_sessions is 0 with state=running, that's a hint the watchdog is about to fire — surface it.
If the unit doesn't exist (is-active returns "inactive" + is-enabled returns "disabled"), tell the user the daemon isn't set up — point at /cookiedclaw:setup.
If /health returns a connection refused, the gateway process isn't bound (or crashed mid-boot). Surface the journal tail.
If the unit is failed or activating (auto-restart), surface the journal tail prominently — that's where the cause shows up. Don't try to diagnose; show the data and let the user decide.
Legacy unit cleanup
Older installs had a second cookiedclaw.service unit that the gateway has since absorbed. If you see it active alongside cookiedclaw-gateway, mention it — the user should re-run /cookiedclaw:setup to clean it up (the wizard's Step 4c removes the legacy unit on re-run).
When to call this
- User asks any "is it running?" / "are you alive?" / "что с демоном?" question
- Before
/cookiedclaw:daemon-restartif you're unsure restart is even needed - After
/cookiedclaw:install-skillfrom a fresh session to confirm the new skill landed (next session does this, not the dying one)
Do not auto-call this every time — only when the user asks or the agent has reason to suspect a problem.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

