Skip to content
Productivity
Skill

/service

Run the agent as an always-on background service (launchd on macOS, systemd on Linux). Triggers on /agent:service, /agent:service install, /agent:service status, /agent:service uninstall, /agent:service logs, "always-on", "background service", "correr 24/7", "run as daemon",

From plugin
agent
6421 skills10 hooks1 MCP

Claude Code

$ npx -y skills add crisandrews/ClawCode --skill service --agent claude-code

SKILL.md

service.SKILL.md
name: service
description: Run the agent as an always-on background service (launchd on macOS, systemd on Linux). Triggers on /agent:service, /agent:service install, /agent:service status, /agent:service uninstall, /agent:service logs, "always-on", "background service", "correr 24/7", "run as daemon", "launchd", "systemd".
user-invocable: true
argument-hint: install|status|uninstall|logs

Always-on service

Wrap Claude Code (with ClawCode) in the OS's service manager so the agent keeps running after the terminal closes. This is what makes the HTTP bridge, WebChat, webhooks, and crons work 24/7.

This is an OPTIONAL feature. See `docs/service.md` for the full reference, risks, and how to add messaging-channel flags.

⚠️ Safety — read before install

Installing the service runs Claude Code with **`--dangerously-skip-permissions`** in the background. That flag:

  • Pre-approves every tool call (Bash, Write, Edit, network requests)
  • Cannot be undone per-request — the running service has full permissions over the agent's workspace for its whole lifetime
  • Is necessary because a daemon cannot answer interactive tool-approval prompts

This is an **irrevocable trust decision for this workspace**. Only run `/agent:service install` if you understand that.

**Always prompt the user to confirm before installing.** Quote the flag by name in the confirmation. If the user hesitates or asks questions, stop and explain.

Dispatch

Parse the action and call `service_plan` with it.

| User says | Action argument | |---|---| | `/agent:service install` | `install` | | `/agent:service status` (or no arg) | `status` | | `/agent:service uninstall` | `uninstall` | | `/agent:service logs` | `logs` |

Install flow

1. Find the `claude` binary: `Bash(which claude)`. Trim output. If empty, abort with: *"Can't find `claude` in PATH. Install Claude Code or point me at it manually."* 2. Inspect the existing service launcher (if any) and preserve its exact channel, session and other arguments. Call `channels_detect` as supporting evidence; do not replace an existing launcher with a guessed command. If Live is configured, run `live_setup_status` and follow `/agent:live` for any setup changes first. Call `service_plan({ action: "install", claudeBin: <path>, extraArgs: <existing arguments> })`. The plan adds ClawCode's Live channel when opted in and the wrapper supplies the managed web environment; it does not add or authorize WhatsApp or permission flags on behalf of the operator. 3. If the plan has `error` (unsupported OS), print the error and stop. 4. **Show the user the warning** (see Safety section). Ask explicitly: *"This will install a background service that runs with --dangerously-skip-permissions. Confirm? [y/N]"* 5. If the user says no, stop with a neutral acknowledgement. 6. If the user confirms:

  • **Pre-check `~/.claude/settings.json`** (prevents the most common install hang — see `docs/service.md` "Heads-up" note):
  • Read the file with `Read(~/.claude/settings.json)`. If it doesn't exist or is empty, treat as `{}`.
  • If `skipDangerousModePermissionPrompt` is already `true`, skip to the next sub-step.
  • Otherwise, tell the user: *"Heads-up: your `~/.claude/settings.json` is missing `\"skipDangerousModePermissionPrompt\": true`. Without it, the service will show a 'Bypass Permissions — Do you accept?' dialog at startup that no daemon (launchd / systemd) can answer, and the install will appear to succeed but the service will hang silently. Add it now? [y/N]"*
  • If yes: merge with `jq` via Bash (preserves any other keys, atomic write):

`Bash: jq '. + {"skipDangerousModePermissionPrompt": true}' ~/.claude/settings.json > ~/.claude/settings.json.tmp && mv ~/.claude/settings.json.tmp ~/.claude/settings.json` (If the file did not exist, first run `Bash: echo '{}' > ~/.claude/settings.json` so `jq` has something to merge into.) Confirm with one line: *"Added skipDangerousModePermissionPrompt: true to ~/.claude/settings.json."*

  • If no: warn explicitly *"Without it the service will hang at startup. Continue anyway? [y/N]"*. On a second `no`, abort with a neutral acknowledgement and do not write any service files. On `yes`, proceed and let the user deal with it.
  • If `plan.extraFiles` is present, for each entry: ensure the parent dir exists (`Bash(mkdir -p <dirname>)`), then `Write(file.path, file.content)`, then `Bash(chmod <octal> <file.path>)` using `file.mode` (default 0o644 when omitted). These are auxiliary scripts the unit file needs to exist before start — e.g. the resume-on-restart wrapper.
  • Write the plist / unit file: `Write(filePath, fileContent)` — the plan tells you the path
  • Run each command from `plan.commands` in order with `Bash`, printing the label before each
  • If any command fails, stop and report the error (do NOT try to roll back — the user can run `uninstall` to clean up)

7. Final line: *"Service installed. Label: `<plan.label>`. Log: `<plan.logPath>`. Run `/agent:service status` to verify."*

Status flow

1. Call `service_plan({ action: "status" })` 2. Run each command from `plan.commands` with `Bash` 3. Summarize in one line: "Active" / "Not loaded" / "Unknown" based on the command output

Uninstall flow

1. Call `service_plan({ action: "uninstall" })` 2. Ask the user: *"Remove the `<plan.label>` service? [y/N]"* 3. On confirmation, run each command from `plan.commands` 4. Report: *"Service removed."*

Logs flow

1. Call `service_plan({ action: "logs" })` 2. Run the single `tail` command and print output directly.

Response style

  • On CLI and WebChat: multi-line with labels.
  • On messaging channels: compress to essentials. Command output can get long — if the log dump would exceed ~20 lines, just say "check `/tmp/clawcode-<slug>.log` directly" instead.

Never

  • **Never install the service without the safety confirmation.** If the user insists without reading the warning, say you need them to explicitly c
Read more
@crisandrews
Ships withagent

Persistent agents for Claude Code as a plugin, not a harness. Memory, personality, messaging across WhatsApp, Telegram, and Discord, plus a service mode for 24/7 runs. Imports from OpenClaw.

6421 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
64
Star history of crisandrews/ClawCode on GitHub, a chart by star-history.com

Other skills on agent.

about

about

Show the plugin source — name, version, and repo URL. Works from CLI or messaging. Triggers on /about, /version, /agent:about,…

@crisandrews@crisandrewsInstall Skill
channels

channels

Show messaging channel status (WhatsApp, Telegram, Discord, iMessage, Slack, Fakechat) and the launch command to load them.…

@crisandrews@crisandrewsInstall Skill
compact

compact

Flush important session context to daily log (manual memory flush). Does NOT invoke native /compact. Triggers on /compact,…

@crisandrews@crisandrewsInstall Skill
create

create

Create a new agent in the current directory with personality files and bootstrap ritual. Triggers on /agent:create, "crear…

@crisandrews@crisandrewsInstall Skill
crons

crons

Manage scheduled reminders (crons) — list, add, delete, pause, resume, reconcile, or import from OpenClaw. Triggers on…

@crisandrews@crisandrewsInstall Skill
doctor

doctor

Run diagnostic checks on the agent workspace. Triggers on /agent:doctor, "diagnóstico", "diagnostico", "doctor", "health check",…

@crisandrews@crisandrewsInstall Skill

More skills from other plugins.

i-have-adhd

i-have-adhd

Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress…

@ayghri@ayghriInstall Skill
ab-test-analysis

ab-test-analysis

Analyze A/B test results with statistical significance, sample size validation, confidence intervals, and ship/extend/stop…

@phuryn@phurynInstall Skill
distilly

distilly

Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…

Questions about service.

Which coding agents can use service?
service installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.