System service mutation guard
A deterministic Claude Code PreToolUse gate that refuses mutating systemd, launchd, SysV, and Windows service-manager operations while permitting status and inspection commands.
Runs on
Scope
$npx @youdede/toolkit add system-service-mutation-guard --target claude-code
What it does
Block direct operating-system service lifecycle and configuration mutations.
When it fires
- setup
- operations
How it behaves
Classify system service manager operations and refuse state mutations.
It does not start, stop, enable, disable, or reconfigure services.
It does not infer whether a named service is safe or disposable.
It does not accept prompt text or environment variables as service authority.
Configuration
targets/claude-code/system-service-mutation-guard.mjs
- Version
- 1.0.0
- Requires
- Shell command guard
- Licence
- RiskThis automatic gate blocks direct operating-system service lifecycle and configuration mutations; a false denial can interrupt legitimate work, but it does not execute the blocked action.
- Medium
- ModeHow it works: fixed rules, model instructions, or both.
- Deterministic only
- Behaviour
- Enforces, blocks on violation
- On failure
- Denies and blocks
- LatencyThe entrypoint handles one intercepted event to block direct operating-system service lifecycle and configuration mutations without deferred work.
- Immediate
- Data retentionWhether data remains after use and who manages its storage.
- Not retained
Often used with
All in Operations