/claw-mo:claw-mo-managefrom claw-mo
Manage mo markdown viewer — check status, add/remove patterns and groups, refresh, stop servers, reset. Use when checking mo status, modifying watch patterns, or troubleshooting.
Ships in claw-mo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Interactive management hub for mo markdown viewer. Shows current state and lets the user choose what to do — including a safe "refresh" that re-scans the filesystem without destroying the session.
For config schema, HTTP API, --restart vs --clear semantics, and CLI wrappers (--unwatch, --close): read ${CLAUDE_PLUGIN_ROOT}/references/shared.md
Check prerequisite first: command -v mo >/dev/null 2>&1. If missing, tell the user to install and stop.
Then in parallel:
mo --status --json — all running servers${CLAUDE_PLUGIN_DATA}/config.json — all configured projectsgit rev-parse --show-toplevelFor the current project, extract the live group→patterns mapping from the JSON output and compare it against saved config. Mark the session out of sync if they differ.
mo server status
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
● project-a :6342 running docs(12) plans(3) default(2)
● project-b :6367 running specs(5)
○ project-c :6315 stopped
Current project: project-a (:6342)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Match config entries to running servers for accurate status (● / ○). Also list any running servers found by mo --status --json that aren't in config (user may have started them manually).
If the current project's configured mapping and live mapping differ, show an explicit warning:
⚠ current project is out of sync
configured: {docs: [docs/**/*.md], default: [*.md]}
live: {docs: [/abs/path/docs/*.md], default: [/abs/path/*.md]}
what this means:
- the running mo session is not watching the same patterns as saved config
- the next `/claw-mo-up` will clear this runtime and rebuild it from saved config
recommended actions:
- if saved config is correct → Server control → Reset session (or just run /claw-mo-up)
- if saved config is outdated → Modify patterns/groups (add/remove), or re-run /claw-mo-setup
Use AskUserQuestion with a two-step approach to stay within the 4-option limit:
First question — category:
Options:
1. Modify patterns/groups (add, remove, rename)
2. Files (add, remove from view)
3. Server control (refresh, stop, reset, restart)
If "Modify patterns/groups" → second question:
Options:
1. Add pattern to a group
2. Remove pattern from a group
3. Add new group
4. Remove group
If "Files" → second question:
Options:
1. Add a file to a group (ad-hoc, like /claw-mo-open)
2. Close a file currently open in mo
If "Server control" → second question:
Options:
1. Refresh (re-scan filesystem, keep session) — runs `mo --restart`
2. Reset current session (clear saved state + restart empty, then rebuild from config)
3. Stop a server
4. Toggle autosync for this project (PostToolUse hook)
If the session is out of sync and the user chose "Modify patterns/groups", recommend Reset first so later changes apply on top of a known-good runtime.
All runtime mutations should use the mo CLI when there is a CLI equivalent (-w/--unwatch/--close/--restart). Fall back to the HTTP API only when no CLI path exists. Config file updates happen after the runtime mutation succeeds.
Add pattern:
mo --no-open -w "$PATTERN" -t "$GROUP" -p $PORT
Remove pattern:
mo --unwatch "$PATTERN" -t "$GROUP" -p $PORT
--statusAdd group:
Ask group name and one initial pattern → start it via mo -w ... -t name -p $PORT if running → update config
Remove group:
Show groups, ask which → mo --unwatch for every pattern in that group (group disappears when it has no files or patterns) → update config (remove group key)
Add file (ad-hoc):
Delegate to /claw-mo-open logic (HTTP API POST to /_/api/groups/$GROUP/files). Warn this is runtime-only unless persisted.
Close a file:
curl -s "http://localhost:$PORT/_/api/groups" → list files in each groupmo --close "$(realpath file)" -t "$GROUP" -p $PORTRefresh (re-scan):
mo --restart -p $PORT (no prompt, safe)mo --status --json and report new file counts/claw-mo-up uses by default.Reset session:
printf 'y\n' | mo --clear -p $PORT/claw-mo-up)Stop a server:
mo --status --json) with their ports and projectsmo --shutdown -p $PORT/claw-mo-up can restart it laterToggle autosync:
autosync field (default true if absent)Autosync is ON — .md writes by Claude are added to mo automatically.After each action, show the updated dashboard and ask if they want another action. Exit when done.
mo --restart over --clear for rescans — restart preserves session; clear destroys the backup. The old "just clear everything" reflex wipes state that didn't need wiping.--clear prompts for confirmation — pipe printf 'y\n'. --restart, --shutdown, --close, --unwatch do not prompt./claw-mo-up will discard your runtime edits on the next invocation.mo --restart runs./claw-mo-up can restart it later.mo --unwatch accepts both relative globs and absolute paths (the form --status shows). Either works.Write|Edit|MultiEdit — no need to restart mo or reload Claude. The hook re-reads config.json every invocation, so the toggle is effectively live.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub leejuoh/claude-code-zero --plugin claw-mo5 skills in this plugin
/claw-mo-downStop the mo markdown viewer server for the current project. Use when the user says claw-mo-down, wants to stop mo, shut down doc viewer, or kill mo server./claw-mo-openOpen a specific markdown file, directory, or piped content in mo. Use when the user wants to quickly view one markdown file, add a file to mo, pipe markdown to the viewer, or preview a specific document./claw-mo-setupConfigure mo markdown viewer for the current project. Use when the user wants to set up doc watching, configure mo patterns, initialize claw-mo for a project, or set up markdown viewer groups./claw-mo-upStart or reopen the mo markdown viewer for the current project. Use when mo is already configured and the user wants to view docs, start mo, open documentation viewer, or preview markdown.Other plugins' skills for the same job