self-ops
Skill423 starsChanged 4 months agoMITView on GitHub
Runtime self-diagnosis knowledge: database layout, observability APIs, timeout hierarchy, restart procedure, failure replay. Use when the user asks to debug this runtime itself — inspect its database, traces, prompt snapshots, timeouts, service health, or configuration.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- commitSkill
- pipelineSkill
- algorithmic-artSkill
- brand-guidelinesSkill
- canvas-designSkill
- claude-apiSkill
- coding-agentSkill
- creative-writingSkill
- data-analysisSkill
- design-impeccableSkill
- doc-coauthoringSkill
- document-authoringSkill
- docxSkill
- financial-analysisSkill
- frontend-designSkill
- internal-commsSkill
- mcp-builderSkill
- mozi-developmentSkill
- pdfSkill
- pptxSkill
- research-workflowSkill
- skill-authoringSkill
- skill-creatorSkill
- slack-gif-creatorSkill
- theme-factorySkill
- webapp-testingSkill
- web-artifacts-builderSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Every turn has a persistent trace_id in turn_traces.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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~/.moziis the active home — check/api/healthfor the realmozi_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_idinturn_traces; each tool call writes a span intool_spans. - Prompt snapshots are captured per turn into
prompt_snapshots(context slot breakdown, tool set, token budgets) and auto-pruned. - Dashboard APIs:
/api/dashboard/modelsfor 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_idand 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_selftool. NEVER viashell_execwithpnpm mozi stop/start/restart— that kills your own process and leaves the runtime offline. - Runtime service state:
/api/runtime/servicefor 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.
Reading Own Source
- Source code (read-only) lives under the runtime project root; workspace is the read-write area. Never confuse them.
- To change own code: copy the file to workspace, edit there, then apply back
with shell_exec (
cp/git).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

