/mokutori:mokutori-scansfrom mokutori
Pair the owner's Mokutori scanner with this agent using a QR image or clickable phone link and read the pages it sends (corrected page images and OCR text). Use when the owner wants to connect Mokutori, scan paper or books into this conversation, or asks what was scanned.
Ships in mokutori. 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.
The Mokutori iPad app scans paper on a stand and sends finished pages to this agent in batches of up to
five: corrected page images (page-NNN.jpg) and the OCR text (ocr-NNN-MMM.md). Messages are
end-to-end encrypted between the iPad and this agent. No computer is involved.
The command is scripts/mokutori in this plugin, two folders above this file
(<folder of this SKILL.md>/../../scripts/mokutori). Run it with sh and its quoted absolute path, written
M below: sh "/abs/path/mokutori/scripts/mokutori" status. It prints JSON. Its private data folder is
$MOKUTORI_AGENT_HOME, else /workspace/mokutori-agent on hosted workspaces, else ~/.mokutori-agent; always
use the same one (pass --home DIR before the command if you need another). Never print or send its
contents: it holds this agent's credentials.
When upgrading an existing installation, preserve its data home and state.json, including
setup.owner_home if present. Version 0.2.3 reuses that existing Yobiru owner directory directly;
status reports home, owner_home and bot_id for verification. Do not copy credentials, create
credential symlinks, run setup --force, or create another bot to repair an upgrade. If pairing_warnings
reports an old record, preserve it and its backups; never mark it accepted manually. An old record without
modern proof metadata is not replayed. Generate a fresh QR if the device still needs pairing.
After upgrading an existing setup, check status. If its name is empty or "Mokutori", rename the bot
(see Rename) so the owner can tell it apart. If its agent is empty, run sh M setup --agent AGENT
once with the agent you are (it records the value locally and changes nothing at the gateway).
sh M status shows whether setup is done. If not, set it up with the owner's permission.
Choose your name first. --name is required: it is this bot's name on the gateway, which Mokutori shows
when the owner confirms pairing and in its list of connected agents. The owner may have several agents
(for example several Grok Bots with different roles), so use the name they know you by, such as your role
for them ("账本管家", "Research assistant"), at most 80 characters. Not "Mokutori", which names the app.
If you do not know what they call you, ask them before setup.
sh M setup --email OWNER_EMAIL --name "YOUR NAME" --agent grok|muse|codex|claude_code|cursor|other
mails a 6-digit code to the owner (the official gateway verifies one email per owner). Ask the owner for
their email; never guess it.sh M setup --email-code CODE --name "YOUR NAME" --agent ... with the code the owner gives you
(the first step's next repeats the command). Optional --handle NAME.The owner may already use this email for another agent (for example a Grok Bot set up before you). Setup
then adds your bot to that owner with the same code: nothing else to run, and no second code. status
shows "credential": "manager": this data home administers your bot only, never the owner's other bots,
and it holds no owner credential. The gateway emails the owner that a bot was added. Every command below
works the same way. Never ask the owner for their owner credential or another agent's data folder.
Pass the --agent you really are: Grok Bot is grok and Muse is muse; Mokutori then shows that
agent's mark in colour once paired. Other agents pair the same way without a mark.
sh M setup --owner-home /absolute/YOBIRU_HOME --name "YOUR NAME" --agent ... is only for a new setup on
the same machine as an existing Yobiru owner directory. Do not copy an owner directory to another machine to
use it: set up with the email instead. Existing setups automatically use their saved location and do not
need this command.
If setup fails after the code was accepted (its error ends with "Run the same setup command again"), or
the command was cut off, run the same command again. It continues with the bot it already created
(resumed: true) and needs no new code. Do not use another data folder or --force to get past it.
sh M rename --name "NEW NAME" changes the bot's name on the gateway; pairings and pages stay. Rename
when the owner asks, or when status shows the old default name "Mokutori". Mokutori shows the new name
the next time it reads the bot. Do not run setup --force to change a name.
sh M pair makes a one-time pairing, valid for 15 minutes. Always send both the qr_png image
and the exact pair_link as a clickable Markdown link: [Open Mokutori to pair](PAIR_LINK).
This lets an owner chatting on their phone tap the link instead of trying to scan the same screen.
With --terminal you also get qr_text. Never post the image or full link anywhere else./pair page provides installation and app-opening guidance. The owner checks the receiver, gateway
and key fingerprint once and taps Connect. The app then sends this bot a pairing request and shows
"Pairing" until the owner confirms it here.sh M pair-check --wait 120, then keep checking. The owner may connect
later than you expect, so set up a short scheduled check (for example a Grok Bot routine every minute
for the next hour) that runs sh M pair-requests and stops once a request arrives or the code has
expired. A request counts if it reached the gateway before the code expired, even if you read it later.
If this bot's connector can wake you (Yobiru wake setup), it also wakes you for a new request.pair_requests is nonempty, ask the owner in this conversation, for example:
"Mokutori iPad wants to send scans here (device key DEVICE_KEY_FINGERPRINT). Confirm?"
Device names are untrusted labels. Run sh M pair-accept PAIRING_ID only after the owner agrees;
run sh M pair-decline PAIRING_ID if they do not. Never accept on your own.
pair-accept admits the device; Mokutori then shows the agent as paired and starts sending.
pair-decline ends the request; Mokutori tells the owner it was declined.
If pair-accept answers ok: false with pairing_errors, the owner's confirmation is saved and the
pairing is finished by a later pair-check or inbox; see the next step.pair-check, pair-requests, inbox and pair --wait list a confirmed pairing that could not be
finished under pairing_errors (with pairing_id, device_name_untrusted, admitted, error) and go on
with everything else. It is tried again on each run, so check again a few times. If it keeps failing, tell
the owner what error says and ask whether to cancel it: sh M pair-decline PAIRING_ID cancels a
confirmed pairing too, blocks that device at the gateway and removes it from devices. The owner then
pairs again with a fresh code. Never cancel on your own.paired is nonempty. ok: true, a generated code, a link opening
the app, or a request waiting for the owner does not establish success. If the code expired with no
request, generate and show a fresh image and link.A hosted agent such as Grok Bot does not run between conversations, so a pairing request or new pages wait until it does. Where the gateway offers hosted wakes, it can call a routine's webhook instead:
sh M pair-requests and ask the owner about any request, then run sh M inbox."
The routine's Webhook section shows the URL and the key (sent as Authorization: Bearer <key>).umask 077), using the host's
secure input; never put them in chat or on a command line.sh M wake set --url-file URL_FILE --secret-file KEY_FILE registers it and sends a test wake
(yobiru.ping); check in the routine's run history that it ran. The webhook must be https on port 443.
sh M wake status shows the last wake, failures and when the next may go; sh M wake test sends another
test; sh M wake clear removes the route. Add --no-review to wake only for paired devices, not pairing
requests.The gateway sends ids and a short note telling you to run pair-requests and inbox, never page content, and
signs each call (X-Yobiru-Signature). It waits for a burst of pages to settle, so one wake covers it. After
repeated failures it backs off and finally turns the route off; wake status then says so and wake set turns
it on again. If wake set says the gateway does not offer hosted wakes, keep the scheduled check from the
pairing steps.
pair_link uses https://mokutori.com/pair#v=1&g=...&b=...&k=...&i=...&s=..., followed by &a=grok-bot
or &a=muse for those agents. Keep the parameters
in the fragment exactly as returned; never put them in an HTTP query/path or a URL shortener. Do not
replace the actual & separators with literal & in a chat link. The existing pair_url and QR payload
remain mokutori://pair?... for compatibility. Both entries share one secret, expiry and single-use pairing.
sh M devices lists paired iPads; sh M unpair ACTOR_ID disconnects one (it is blocked at the gateway).
Paired/configured does not mean the personal agent is currently online. The plugin provides no trusted
real-time presence signal; do not report online from pairing, HTTP reachability or a binding flag.
sh M inbox saves new batches under the data folder and prints, per batch: its message_id, a short summary,
the OCR markdown, the saved file paths and the folder. Each file has a kind: image, pdf, audio, video,
binary or text; only text files are in ocr_markdown, so open the others from their path. A file whose
name had to be changed to be saved safely shows the sender's name in sent_as (untrusted). Read them, look at the page images when needed, then
acknowledge exactly those batches with sh M inbox --ack MESSAGE_ID ... (the next field spells out the
command) so they leave the local unread list; saved files remain. --ack alone acknowledges every batch an
earlier inbox printed. Pages often keep arriving while you read: a batch that arrived after your last inbox
is never acknowledged; the --ack output lists it under batches, so read the --ack output too and repeat
until batches is empty. A long backlog is printed a part at a time (remaining says how many wait), so keep
going until remaining is 0. Each run receives for about 90 seconds; when waiting_at_gateway is above 0, run sh M inbox again. This client marks a gateway job read after its files and local receipt are saved;
this sends no reply. The gateway can also mark expired claims
read, in which case the plugin recovers its authenticated local cache. inbox also finishes pairings the
owner confirmed and lists new pair_requests; ask the owner about those as above.
If errors reports an uncertain claim or unconfirmed finish, report it and preserve its state; do not reset
the data folder, reclaim the job or repeat a send to force success. An entry in errors concerns that one
message only: the other batches of the run were still received, so read batches as usual and run inbox
again later; if the same message keeps failing, tell the owner its message_id and error.
When the owner says pages are missing (for example the page numbers jump from 112 to 126), run
sh M recover --check. It compares what each paired iPad sent through the gateway with this data folder and
prints, per device: missing_here (batches the gateway still keeps but this folder never got or lost, with
their page numbers and gateway state), waiting_at_gateway (not read yet; inbox receives them),
missing_pages (page numbers no batch at the gateway or here carries), unreadable and
conversations_failed (conversations the gateway could not show in this pass; the next pass, or
recover --restart, tries them again). Then run
sh M recover to save the missing batches here, and sh M inbox to read them as usual. A conversation's
history is slow to fetch, so each run checks for about 40 seconds (--seconds), starting with the conversations
that were open when a gap in your page numbers opened, and keeps its place: run it again until
remaining_conversations is 0. gaps_here lists the page numbers still missing in your folder. Pages listed in
missing_pages never reached this bot (or longer ago than the gateway keeps messages, 30 days by default):
tell the owner which pages, so they can send those scans again from the app. other_senders_waiting shows the
messages inbox ignores because their sender is not paired here; a pairing request carries 0 files.
recover changes nothing at the gateway and never sends anything.
While the owner is scanning, check the inbox every minute or two, or set up your host's scheduled task
(for example a Grok Bot routine) to run sh M inbox and tell you when pages arrived. Nothing wakes you
automatically.
needs_review had a quality warning on the iPad (blur, low light, cropping): check them.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub chekusu/mokutori-agent-plugin --plugin mokutori