no-mistakes: Skill for Claude Code

.agents/skills/daemon-runtime/SKILL.md

daemon-runtime is a skill for Claude Code from kunchenguid/no-mistakes. It costs 30 tokens per session (2,520 once invoked), scanned A, original, MIT.

Instructions for changing a background daemon's startup, single-instance ownership, shutdown, logging, event subscriptions, or lifecycle commands. A daemon is a background process that keeps running to provide a service.

In plain words
What is it for?
Use it when modifying daemon locks, process startup and readiness, stale-run recovery, IPC health checks, detached children, shutdown behaviour, or related regression tests.
Why use it?
It prevents multiple daemons from controlling the same home directory and helps startup, recovery, health checks, timeouts, and shutdown report failures correctly.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: installed under .agents/ (shared by several agents); mentions OpenCode.

This is kunchenguid/no-mistakes's own configuration. It tells Claude Code how to work on no-mistakes itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything no-mistakes configures →

About the project

no-mistakes is a local Git proxy that validates changes in an isolated worktree before forwarding a push to the real remote and opening a pull request. It is for developers and coding agents that want automated checks, safe fixes, CI repair, and human review before changes are published.

kunchenguid/no-mistakes · 8,945 stars · on GitHub · kunchenguid.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to kunchenguid/no-mistakes. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kunchenguid/no-mistakes/main/.agents/skills/daemon-runtime/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/kunchenguid/no-mistakes

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for daemon-runtime

README.md
[![agentmods](https://agentmods.dev/badge/skills/kunchenguid/no-mistakes/daemon-runtime/github.svg)](https://agentmods.dev/skills/kunchenguid/no-mistakes/daemon-runtime)
Your own site
<a href="https://agentmods.dev/skills/kunchenguid/no-mistakes/daemon-runtime"><img src="https://agentmods.dev/badge/skills/kunchenguid/no-mistakes/daemon-runtime/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for daemon-runtime

Your own site · 80×15
<a href="https://agentmods.dev/skills/kunchenguid/no-mistakes/daemon-runtime"><img src="https://agentmods.dev/badge/skills/kunchenguid/no-mistakes/daemon-runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,520 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.02520
Opus 5.5 $0.00012 $0.01008
Sonnet 5.5 $0.00006 $0.00504
Haiku 4.5 $0.00003 $0.00252

Measured 11d ago against content hash 32c11150ef12, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

daemon-runtime scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/daemon-runtime/SKILL.md · 44 lines

How it starts

The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Daemon Singleton Lock (internal/daemon/lock.go)

  • Only one live daemon may own an NM_HOME: an exclusive OS file lock on <NM_HOME>/daemon.lock is acquired as the very first action in RunWithOptions, strictly before stale-run recovery and socket bind, and held for the process lifetime. The kernel releases it on any process death, so a held lock always means a live holder and no staleness heuristic is needed. Without it, a second daemon stole the socket and ran global crash recovery against the live daemon's runs and worktrees.
  • Process launch is not readiness: the PID record is published after the singleton lock and before exclusive recovery, while startup succeeds only after a real IPC health response. The 45s production budget covers cold environment setup and recovery; early exits fail promptly, timeout cleanup reaps detached children before fallback or rollback, and managed plus detached failures retain both causes. Regressions: TestStartDetachedDaemonDetectsChildExitPromptly, TestStartDetachedDaemonTimeoutKillsAndReapsChild, TestStartPreservesManagedAndDetachedFallbackErrors, TestColdDetachedStartupProductionGateCardinality.
  • A successful stop means the daemon process is gone, not merely that IPC health has disappeared, because only process exit releases the singleton lock. Capture the daemon instance before requesting shutdown, and close the shutdown client before waiting because the daemon drains in-flight handlers during exit. See waitForDaemonStop and stopDetachedDaemon; regressions: e2e TestDaemonStopLeavesNoDaemonProcessOwningTheRoot, TestDaemonRestartReplacesTheDaemonWithExactlyOneOwner.
  • Independent layers: internal/ipc listen() dials the socket before unlinking it and refuses to steal a live one; client probes bound the dial with daemon_connect_timeout and fail fast on a dead or wedged socket instead of starting a replacement daemon (EnsureDaemon surfaces the error with a daemon start recovery hint; the health RPC itself is bounded separately by ipc.DefaultDialTimeout). Exception: a refused socket whose PID file names a gone or start-time-mismatched daemon is cleared and reported not running by clearDeadDaemonArtifacts, which inspects the PID before taking the singleton lock and holds it only for the PID-file re-check and removal; acquireSingletonLock retries for singletonLockRetry (250ms) so that short hold never makes a starting daemon exit, while a live daemon still fails it. update snapshots whether daemon artifacts existed before its first probe and restarts the daemon even after that probe cleared them.
  • Daemon execution is explicit-only (no-mistakes daemon run --root); never let inherited environment reinterpret probes like --version or status as daemon workers.
  • Startup worktree cleanup is DB-aware: never remove a worktree whose run row is pending or running; startRun inserts the run row before creating the worktree, so a no-row directory is safe to remove immediately. That no-row rule holds only inside <NM_HOME>/worktrees, which is discovered by walking because no-mistakes owns it; a configured worktree root is the operator's directory, so cleanup and eject there act on exactly the recorded run worktrees and never enumerate anything else.
  • The user-facing model lives in docs/src/content/docs/concepts/daemon.md; the lock rationale lives in the internal/daemon/lock.go and daemon.go comments. Regressions: TestAcquireSingletonLock_*, TestRunWithResources_SecondDaemonForSameRootFailsWithoutStealingSocket, TestRunWithOptions_RequiresSingletonLockBeforeRecovery, TestRecoverOnStartup_DoesNotDeleteActiveRunWorktree, TestServe_SecondListenerForLiveSocketDoesNotStealIt, TestDialConnectTimeoutFailsFastAndNamesSocket, TestIsRunningFailsFastWhenSocketAcceptsButDoesNotRespond, TestIsRunningSurfacesExistingDeadSocket, TestIsRunningRefusedSocketWithGoneDaemonIsNotRunning, TestIsRunningRefusedSocketWithLiveOrUnverifiableDaemonStillRefuses, TestIsRunningStaleProbeDoesNotBlockAStartingDaemon, TestIsRunningStaleProbeKeepsArtifactsOfADaemonThatJustStarted, TestDaemonRunRootFromArgs_EnvDoesNotForceDaemonModeForProbes, TestValidateDaemonPIDFallback_RefusesToKillOwnProcess.

Read the full file on GitHub · 44 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago Changed 32c11150ef12
  2. 16d ago Changed 0e5438b3ccb5
  3. 29d ago Changed · +7 lines · +7 tokens per session 477fad9b488b
  4. 1mo ago Changed 613d0df787d9
  5. 1mo ago First seen · 37 lines · 23 tokens per session scan A d60dbf5d2f96

Subscribe to this mod's changes

daemon-runtime is a skill published in the GitHub repository kunchenguid/no-mistakes (8,945 stars, last pushed today), licensed MIT. It adds 30 tokens to every session and 2,520 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

agui-dotnet-protobuf

Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…

ag-ui-protocol/ag-ui · 162 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

fastapi-router-py

Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.

microsoft/skills · 46 tokens

dev-runtime

How the Node side of a dev stack runs without haven, and the backend host: pnpm dev (UI built once, backend reloading), pnpm dev:hmr (adds the Vite ui lane), tools/dev-runtime (api + worker in one Node process), backend reload on a file change, the debounce (quiet window + max wait), ports derived from PORT. Use when…

langwatch/langwatch · 172 tokens

migrate-segw-to-rap

Reverse-engineer a SEGW-built OData V2 service (MPC/DPC/MPCEXT/DPCEXT) into a modern RAP V4 service — tables, CDS views (interface + projection), behavior definitions, draft entities, service definition + binding. Use when asked to "migrate this SEGW service to RAP", "convert OData V2 to V4 RAP", "modernize this…

arc-mcp/arc-1 · 106 tokens