Docs · Coding Agents · v0.2.1

Read and annotate beside Claude Code, Codex, or fx.

Install the skill once, ask in plain English, and your coding agent drives the live reader through its control socket without ever touching your human highlights.

npx skills addhoja ctlhoja annot2× OSC 52 HandoffView .md

01 · Teach Your Agent

Install the skill and embedded playbooks.

install skill + inspect embedded playbooks
npx skills add crafter-station/hoja # The installed binary also embeds version-matched playbooks:hoja skills listhoja skills get core --fullhoja skills get annotatehoja skills get rex

Because the core, annotate, and rex playbooks are compiled into the Rust binary with include_str!, an agent always reads instructions matching the exact flags installed on your machine. Set HOJA_SKILLS_DIR to add or override custom <name>/SKILL.md files.

02 · Live Control Plane

Peek, search, and push papers without stealing focus.

hoja ctl
hoja ctl ls --json                           # live readers: pid, stack, anchor, active titlehoja ctl peek --text                         # read visible page without moving readerhoja ctl peek --png --output /tmp/live.png   # capture visible page for dense math/figureshoja ctl open 2305.10601                     # push cited paper in background (unseen * badge)hoja ctl open 1706.03762 --focus --page 3    # focus only when human asked to look nowhoja ctl search "ablation" --limit 20 --json # search every open document in the stackhoja ctl goto --page 7                       # jump active document

In Rex, panes opened by hoja rex install export HOJA_ANCHOR so hoja ctl resolves the exact reader paired to your agent pane instead of spawning duplicate splits.

03 · Layered Annotations

Solid human marks, dashed agent marks.

Your highlights live in <hash>.json (writable only by the TUI). Every agent writes into its own <hash>.<agent>.json sidecar with --by <slug>. The CLI rejects --by human, so an agent can never edit or delete your notes.

SignalColorStyle
Key contribution, main claim, headline resultamberhighlight
Limitation, caveat, threat to validityroseunderline
Definition, term introduction, notationminthighlight
Equation, algorithm line, code, hyperparametersskyhighlight
atomic study guide batch
hoja annot ls --active --by humanhoja annot apply --active - --by fx --batch study-1 <<'JSON'[  {"op": "add", "page": 1, "match": "scaled dot-product attention", "color": "mint", "style": "highlight"},  {"op": "add", "page": 5, "rect": [0.12, 0.30, 0.68, 0.42], "color": "sky", "note": "core equation"}]JSONhoja annot clear --active --by fx   # drop agent layer, human marks stay
Exit codes
Batches are all-or-nothing (add --dry-run to validate first). Exit 3 means no_match or no_live_reader (with closest page text printed); exit 4 means ambiguous match (retry with --occurrence K or --all).

04 · Pixel Region Handoff

2× crisp equation crops over OSC 52.

Drag a SNIP box over any equation or figure (or press y / @ to hand off the visible viewport). hoja renders the crop at 2x density in crisp paper ink (capped at 3600 px full-page width), writes region.png, selection.md, and meta.json under ~/.cache/hoja/handoff/<timestamp>-p<N>/, and copies the path via OSC 52 and pbcopy.