zeronews-manage-client-service
Manage the ZeroNews client as a native OS service with `zeronews service`—install, start, stop, restart, status, uninstall. Use after configure or when expose fails because the client is not running. After browser login changes config while the service is already running, restart or reload so tunnels see the new binding.
How do I install this agent skill?
npx skills add https://github.com/sixtea/zeronews-skills --skill zeronews-manage-client-serviceIs this agent skill safe to install?
- Gen Agent Trust Hubwarn
The skill enables the management of the ZeroNews client as a native OS service, which involves establishing persistence on the system. It requires elevated privileges (sudo or Administrator) for installation and explicitly instructs the agent to execute commands outside of sandboxed environments. Additionally, it processes external CLI output and user-defined variables without explicit sanitization, creating a surface for indirect prompt injection.
- Socketpass
No alerts
- Snykfail
Risk: CRITICAL · 2 issues
What does this agent skill do?
Manage Client Service
Local execution (mandatory)
All zeronews CLI, install scripts, Docker, browser login, and local port discovery must run on the user's computer, not in an Agent sandbox or remote-only workspace.
- Shell from the IDE: disable sandbox (full local permissions); 不要沙箱中执行,都在用户本地电脑中执行。
- With MCP: run
zeronews-mcplocally; use MCP tools instead of sandbox CLI against workdir. - If the agent cannot run on the user's machine, say so—do not fake install/login/expose.
Full rules: LOCAL-EXECUTION.md.
Use the built-in service management commands instead of trying to script your own daemon wrapper.
MCP mapping: service_install, service_start, service_stop, service_restart, service_status, service_uninstall → Step 2 commands below. Uninstall is destructive — confirm first (MCP same rule).
What this skill does
- installs the client as a system service
- starts and stops the service
- restarts the service
- checks service status
- uninstalls the service when explicitly requested
Workflow
Step 1: Ask intent and detect privileges
Ask all questions upfront:
- What action is needed: install, start, stop, restart, status, or uninstall?
- Which workdir should the service use?
Silently inspect whether the session is already elevated:
- Linux / macOS:
id -u→0means root - Windows: Administrator shell check per
../zeronews-configure-client/references/PRIVILEGE-EXECUTION.md
If not elevated and the action requires it on Linux/Windows, tell the user to rerun with sudo or an Administrator shell.
On macOS when start / install and client not running:
- Follow MACOS-AGENT-SERVICE.md:
--user→ foreground — nosudo -n/ admin osascript unless user explicitly asked for system service (then print Terminalsudo …steps). status/reload: unwrap only — no osascript.service --user stop|uninstall: unwrap only.
Step 2: Use the existing service commands
Examples for a non-root session (health without sudo):
env -u NODE_OPTIONS -u PYTHONPATH -u CODEBUDDY_BROKERED_FS_HOOK_ENABLED -u TOYBOX_SANDBOX_SOCK \
zeronews --workdir {WORKDIR} status --json
System service install/start (Agent default path: do not run — user runs in Terminal):
sudo zeronews --workdir {WORKDIR} service install
sudo zeronews --workdir {WORKDIR} service start
macOS user service (no elevation):
zeronews --workdir {WORKDIR} service --user install
zeronews --workdir {WORKDIR} service --user start
If id -u is already 0, omit sudo:
zeronews --workdir {WORKDIR} service install
zeronews --workdir {WORKDIR} service start
zeronews --workdir {WORKDIR} service status
Step 3: Respect OS differences
- Linux uses
systemd - macOS uses
launchd— Agent path:service --user, then foreground (MACOS-AGENT-SERVICE); system LaunchDaemon only via user Terminal - Windows uses the Windows Service Manager
Do not paper over platform-specific privilege or file-path errors.
macOS Agent path
Use MACOS-AGENT-SERVICE tier order for install/start. Do not raw launchctl. Do not osascript for status/reload/stop/uninstall.
Uninstall / reset on macOS (both sides): sudo zeronews --workdir "$WORKDIR" service uninstall or sudo zeronews --workdir "$WORKDIR" reset.
Step 4: After configure / login (cross-skill)
Out of scope: zeronews-install-client Step 1b binary upgrade — no service restart / stop / start (see UPGRADE-ON-INSTALL.md). Install Step 4 owns first service install/start after login: true — do not duplicate in the same task.
When zeronews-configure-client or zeronews-install-client completes browser login and a system service is already installed and running, run reload with unwrap first (no elevation). Use service --user restart with unwrap only if reload failed; do not osascript restart unless combined with install/start in same policy. Skipping reload leaves expose flows stale.
If no service is installed, foreground zeronews start is enough.
Safety rules
- before any command that would use
sudo, check whether the session is already root; if so, run withoutsudo - do not install a service unless the user explicitly asked for service mode
- do not uninstall a service unless the user explicitly asked for removal
- do not claim service install succeeded without checking the command result
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/sixtea/zeronews-skills/zeronews-manage-client-service">View zeronews-manage-client-service on skillZs</a>