self-ops

self-ops is a skill for Claude Code from spytensor/openmozi. It costs 56 tokens per session (748 once invoked), scanned A, original, MIT.

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 Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to inspect runtime data, health, configuration, prompt snapshots, service failures, observability traces, or replayable errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spytensor/openmozi/self-ops
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.

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.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for self-ops

README.md
[![agentmods](https://agentmods.dev/badge/skills/spytensor/openmozi/self-ops/github.svg)](https://agentmods.dev/skills/spytensor/openmozi/self-ops)
Your own site
<a href="https://agentmods.dev/skills/spytensor/openmozi/self-ops"><img src="https://agentmods.dev/badge/skills/spytensor/openmozi/self-ops/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for self-ops

Your own site · 80×15
<a href="https://agentmods.dev/skills/spytensor/openmozi/self-ops"><img src="https://agentmods.dev/badge/skills/spytensor/openmozi/self-ops.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 58
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.1 $0.00056 $0.00748
Opus 5.5 $0.00022 $0.00299
Sonnet 5.5 $0.00011 $0.00150
Haiku 4.5 $0.00006 $0.00075

Measured 1mo ago against content hash f5b924c4837c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (484 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 748 once invoked, about $0.0002 per session on Opus 5.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.