self-ops

A guide for diagnosing and operating the coding-agent runtime itself, including its database, logs, traces, timeouts, and services.

In plain words
What is it for?
Use it to inspect runtime data, health, configuration, prompt snapshots, service failures, observability traces, or replayable errors.
Why use it?
It provides the locations, APIs, and checks needed to find runtime failures and verify what happened instead of guessing.

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/spytensor/openmozi/self-ops
Any agent
npx skills add spytensor/openmozi --skill self-ops
Clone the repo
git clone --depth 1 https://github.com/spytensor/openmozi

Made for: Claude Code, Codex.

Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 748 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00056 $0.00748
Opus 5 $0.00028 $0.00374
Sonnet 5 $0.00011 $0.00150
Haiku 4.5 $0.00006 $0.00075

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

Security

Grade A, and why

self-ops 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 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.

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.

skills/self-ops/SKILL.md · 68 lines

How it starts

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

Runtime Self-Ops

Knowledge for diagnosing and operating this runtime. Verify claims with tools before reporting — never say "database is empty" without querying it.

Database

  • Location: ~/.mozi/data/mozi.db (SQLite, WAL mode). But do not assume ~/.mozi is the active home — check /api/health for the real mozi_home.
  • Inspect: shell_exec('sqlite3 ~/.mozi/data/mozi.db ".tables"').
  • Key tables: skill_versions, agent_registry, memory_facts, conversations, tasks, event_log, turn_traces, tool_spans, prompt_snapshots, system_state.
  • Startup sequence: config load → DB init → migrations → bootstrap → workspace skills → channels. Schema evolution must stay additive for legacy DBs.

Observability

  • Every turn has a persistent trace_id in turn_traces; each tool call writes a span in tool_spans.
  • Prompt snapshots are captured per turn into prompt_snapshots (context slot breakdown, tool set, token budgets) and auto-pruned.
  • Dashboard APIs: /api/dashboard/models for model dimensions; /api/dashboard/slo?period=day|week|month&tenantId=...&model=... for success rate, latency, failure categories, cost, and recent traces/spans.
  • The failure replay harness can export a fixture by trace_id and generate a regression test skeleton.
  • Anchor reliability explanations to concrete trace IDs and span failures, not generic summaries.

Timeout Hierarchy

Timeouts are nested; inner fires before outer:

  • Tool SLA: per-tool execution timeout (default 60s, tel.tools).
  • LLM call: single inference timeout (tools.loops.llm_call_timeout_ms, default 300s). For CLI-pipe providers this covers the full agent turn.
  • Turn timeout: end-to-end loop runtime per turn (tools.loops.max_elapsed_ms, default 600s), checked between iterations.
  • Channel timeout: channel-level guard (e.g. telegram.interactive_turn_timeout_ms, default 600s).

Process Management

  • Restart ONLY via the restart_self tool. NEVER via shell_exec with pnpm mozi stop/start/restart — that kills your own process and leaves the runtime offline.
  • Runtime service state: /api/runtime/service for installed/enabled/active status. Do not infer always-on behavior from the presence of a plist/unit path.
  • Token budgets are model-aware and auto-compact at watermarks; oversized output requests are clamped before dispatch.

Read the full file on GitHub · 68 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 · 68 lines · 56 tokens per session scan A f5b924c4837c

Subscribe to this mod's changes

self-ops is a skill published in the GitHub repository spytensor/openmozi (210 stars, last pushed 26d ago), licensed MIT. It adds 56 tokens to every session and 748 once invoked, about $0.0003 per session on Opus 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

lobu-operator

Contribute safely to the Lobu monorepo: worktrees, package rules, red-to-green fixes, validation gates, SDK-first operations, PRs, and rollout checks.

lobu-ai/lobu · 41 tokens

company-agent-infrastructure

Use when designing or building internal/company AI agents that need shared context across company systems, durable organizational memory across sessions or agents, user-scoped permissions, approvals, audit, or governed actions. Also use when deciding whether ordinary MCP tools, RAG, or local agent memory are enough…

lobu-ai/lobu · 70 tokens

lobu-builder

Use when working inside a Lobu project generated by @lobu/cli or any repository centered on lobu.config.ts, AGENTS.md, agent prompt files, local skills, and evals. This skill helps a coding agent inspect the right files, make Lobu-native changes, keep the stack runnable, and validate semantics with chat tests and…

lobu-ai/lobu · 76 tokens

crm-ops

How to operate the Lobu funnel CRM — create and enrich leads, log interactions, advance funnel stages, open and update pilots, and produce the weekly digest. Use whenever the task touches the pipeline.

lobu-ai/lobu · 44 tokens

deliveroo-order

Turn collected lunch orders into a clean per-person order list for a human to place on Deliveroo. Use in step 2 of the lunch run, after orders are collected. The live menu is fetched automatically by the lobu-team-lunch-finalize reaction (via the Owletto Chrome extension) — this skill never places an order or touches…

lobu-ai/lobu · 75 tokens

self-motivation-corruption-system

系统性压力,机制驱动,持续输出.

linkerlin/PUAX · 18 tokens