service

A service manager that runs the agent continuously in the background using launchd on macOS or systemd on Linux.

In plain words
What is it for?
It is for installing, checking, viewing logs for, or removing an always-on agent service. Installation runs the agent with all tool actions pre-approved.
Why use it?
It keeps the agent running after the terminal closes so web connections, incoming webhooks, and scheduled jobs can continue operating.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/crisandrews/clawcode/service
Any agent
npx skills add crisandrews/ClawCode --skill service
Clone the repo
git clone --depth 1 https://github.com/crisandrews/ClawCode

Made for: Claude Code, Codex.

Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,517 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00084 $0.01517
Opus 5 $0.00042 $0.00758
Sonnet 5 $0.00017 $0.00303
Haiku 4.5 $0.00008 $0.00152

Measured 2d ago against content hash 586d368946c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

service scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- **Pre-check `~/.claude/settings.json`** (prevents the most common install hang — see `docs/service.md` "Heads-up" note):
skills/service/SKILL.md · 93 lines

How it starts

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

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. Call service_plan({ action: "install", claudeBin: <path> })
  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."

Read the full file on GitHub · 93 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. 2d ago First seen · 93 lines · 84 tokens per session scan B 586d368946c9

Subscribe to this mod's changes

service is a skill published in the GitHub repository crisandrews/ClawCode (62 stars, last pushed 2d ago), licensed MIT. It adds 84 tokens to every session and 1,517 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

proof-checker

Rigorous mathematical proof verification and fixing workflow. Reads a LaTeX proof, identifies gaps via cross-model review (external reviewer backend, ultra reasoning), fixes each gap with full derivations, re-reviews, and generates an audit report. Use when user says "检查证明", "verify proof", "proof check", "审证明"…

wanshuiyin/Auto-claude-code-research-in-sleep · 87 tokens

citation-audit

Zero-context verification that every bibliographic entry in the paper is real, correctly attributed, and used in a context the cited paper actually supports — catching hallucinated authors, wrong years, fabricated venues, version mismatches, and wrong-context citations. Use when user says "审查引用", "check citations"…

wanshuiyin/Auto-claude-code-research-in-sleep · 86 tokens

idea-creator

Generate and rank research ideas given a broad direction. Use when user says "找idea", "brainstorm ideas", "generate research ideas", "what can we work on", or wants to explore a research area for publishable directions.

wanshuiyin/Auto-claude-code-research-in-sleep · 51 tokens

paper-illustration

Generate publication-quality AI illustrations for academic papers using Gemini image generation. Creates architecture diagrams, method illustrations with Claude-supervised iterative refinement loop. Use when user says "生成图表", "画架构图", "AI绘图", "paper illustration", "generate diagram", or needs visual figures for papers.

wanshuiyin/Auto-claude-code-research-in-sleep · 67 tokens

idea-discovery

Workflow 1: Full idea discovery pipeline to go from a broad research direction to validated, pilot-tested ideas. Use when user says "找idea全流程", "idea discovery pipeline", "从零开始找方向", or wants the complete idea exploration workflow.

wanshuiyin/Auto-claude-code-research-in-sleep · 56 tokens

paper-illustration-image2

Generate publication-quality academic illustrations through a local Codex app-server bridge that uses Codex native image generation. This is a separate experimental alternative to paper-illustration, intended for Claude Code users who want a GPT-image-style renderer without modifying the original skill.

wanshuiyin/Auto-claude-code-research-in-sleep · 59 tokens