workflow-long-running-processes
Skill1 starsChanged 6 months agoMITView on GitHub
How to handle servers, daemons, watchers — anything that runs indefinitely.
In this repository33 other files it gives its agents.
- skill-process-gotchasSkill
- workflow-cache-disciplineSkill
- workflow-codegraphSkill
- workflow-conductorSkill
- workflow-context-condenserSkill
- workflow-context-hygieneSkill
- workflow-criticSkill
- workflow-deadline-disciplineSkill
- workflow-deep-researchSkill
- workflow-done-definitionSkill
- workflow-edit-formatSkill
- workflow-effort-routingSkill
- workflow-escalateSkill
- workflow-execute-from-planSkill
- workflow-filesystem-offloadSkill
- workflow-learn-frameworkSkill
- workflow-lspSkill
- workflow-memory-curationSkill
- workflow-plan-contractSkill
- workflow-plan-firstSkill
- workflow-planSkill
- workflow-quality-barSkill
- workflow-repomapSkill
- workflow-retrieve-before-actSkill
- workflow-spec-drivenSkill
- workflow-stuck-detect-resetSkill
- workflow-stuckSkill
- workflow-subagent-isolationSkill
- workflow-subtask-loopSkill
- workflow-task-finishSkill
- workflow-task-startSkill
- workflow-tool-selectionSkill
- workflow-verify-enhancedSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
When starting a Flask/FastAPI/uvicorn/node/webpack/any server or watcher:
- Very specific: line 15
Start it backgrounded (append & or use the background-process tool) and capture the PID.
- Distinctive: line 16
DO NOT poll it to completion.
- Distinctive: line 17
Wait 2-3 seconds for startup, then TEST IT ONCE:
- Very specific: line 19
check the port is listening → ss -ltn | grep <port>
- Very specific: line 27
If the watchdog is unavailable, fall back to the single-probe rule above: one curl -m 5, and if it responds, the subtask is DONE.
- Distinctive: line 29
NEVER wait more than ~10 seconds, and NEVER call check_stall in a loop.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
<!-- TRIGGERS WHEN: How to handle servers, daemons, watchers — anything that runs indefinitely. -->A running server is SUCCESS, not a hang. Never poll a process that never ends.
The per-tool wall-clock timeout is short (native terminal.timeout ≈ 120s) precisely so a blocked
poll cannot hang forever. That backstop is only safe if you follow the backgrounded +
check_stall-once pattern — never block synchronously on a process that may not return.
When starting a Flask/FastAPI/uvicorn/node/webpack/any server or watcher:
- Start it backgrounded (append
&or use the background-process tool) and capture the PID. - DO NOT poll it to completion. It will NEVER complete — that is its job. Polling it = infinite hang.
- Wait 2-3 seconds for startup, then TEST IT ONCE:
- HTTP server →
curl -s -m 5 http://localhost:<port>/<known-route>(use -m 5 timeout!) - check the port is listening →
ss -ltn | grep <port>
- HTTP server →
- Then call the watchdog EXACTLY ONCE to classify it (do not loop):
mcp_hermes_max_watchdog_check_stall(tool_name="<server>", elapsed_s=<since start>, expecting_heartbeat=true, last_heartbeat_age_s=<since last log line/probe>).waiting: true→ it is serving/heartbeating. That is SUCCESS — leave it running, record the PID (kill <pid>later), move on. NEVER kill a heartbeating process (the false-kill trap).hung: true→ it is silent past its budget and really is stuck. Kill it and try another approach (go toworkflow-stuck-detect-reset).
- If the watchdog is unavailable, fall back to the single-probe rule above: one
curl -m 5, and if it responds, the subtask is DONE. - NEVER wait more than ~10 seconds, and NEVER call check_stall in a loop.
- Any command with no natural exit (tail -f, watch, serve, dev) → same rule: start, test once, classify once, move on. A truly long but finite job (big build, full test suite) → background it too and check_stall once, rather than risking the 120s terminal timeout mid-run.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

