Install
openclaw skills install calibre-catalog-readClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Read-only Calibre catalog lookup (including ID-based read-only lookups like "ID 1021 を確認して") and one-book analysis-comments workflow over a running Content server. Use for any list/search/id viewing even when a specific ID is mentioned. Never for title/authors/tags/series/series_index metadata edits.
openclaw skills install calibre-catalog-readUse this skill for:
list/search/id)export -> analyze -> cache -> comments HTML apply)id/search/list style read-only lookupcalibre-metadata-apply and do not execute edit paths here.Do NOT use this skill for:
calibre-metadata-applycalibre-metadata-apply へのルーティングは明示的な編集動詞がある場合のみ (修正/編集/変更/直す/fix/edit/update/change)calibredb available on PATH in the runtime where scripts are executed.ebook-convert available for text extraction.subagent-spawn-command-builder installed (for spawn payload generation).--with-library format:
http://HOST:PORT/#LIBRARY_IDLIBRARY_ID is unknown, use #- once to list available IDs on the server.HOST:PORT.--with-library can be omitted only when one of these is configured:
CALIBRE_WITH_LIBRARY or CALIBRE_LIBRARY_URL or CALIBRE_CONTENT_SERVER_URLCALIBRE_LIBRARY_ID--with-library URL.CALIBRE_SERVER_HOSTS=host1,host2,...nameserver from /etc/resolv.conf./home/altair/.openclaw/.env
CALIBRE_USERNAME=<user>CALIBRE_PASSWORD=<password>--auth-mode / --auth-scheme.--password-env CALIBRE_PASSWORD (username auto-loads from env)--username <user> explicitly.List books (JSON):
node skills/calibre-catalog-read/scripts/calibredb_read.mjs list \
--with-library "http://192.168.11.20:8080/#Calibreライブラリ" \
--password-env CALIBRE_PASSWORD \
--limit 50
Search books (JSON):
node skills/calibre-catalog-read/scripts/calibredb_read.mjs search \
--with-library "http://192.168.11.20:8080/#Calibreライブラリ" \
--password-env CALIBRE_PASSWORD \
--query 'series:"中公文庫"'
Get one book by id (JSON):
node skills/calibre-catalog-read/scripts/calibredb_read.mjs id \
--with-library "http://192.168.11.20:8080/#Calibreライブラリ" \
--password-env CALIBRE_PASSWORD \
--book-id 3
Run one-book pipeline (analyze + comments HTML apply + cache):
uv run python skills/calibre-catalog-read/scripts/run_analysis_pipeline.py \
--with-library "http://192.168.11.20:8080/#Calibreライブラリ" \
--password-env CALIBRE_PASSWORD \
--book-id 3 --lang ja
Initialize DB schema:
uv run python skills/calibre-catalog-read/scripts/analysis_db.py init \
--db skills/calibre-catalog-read/state/calibre_analysis.sqlite
Check current hash state:
uv run python skills/calibre-catalog-read/scripts/analysis_db.py status \
--db skills/calibre-catalog-read/state/calibre_analysis.sqlite \
--book-id 3 --format EPUB
Use this split to avoid long blocking turns on chat listeners.
book_id.model, thinking, runTimeoutSeconds.Before first subagent run in a session, confirm once:
modelthinking (low/medium/high)runTimeoutSecondsDo not ask on every run. Reuse the confirmed settings for subsequent books in the same session unless the user asks to change them.
Book-reading analysis is a heavy task. Use a subagent with a lightweight model for analysis generation, then return results to main agent for cache/apply steps.
references/subagent-analysis.prompt.mdreferences/subagent-input.schema.jsonreferences/subagent-analysis.schema.jsonscripts/prepare_subagent_input.mjs
Rules:
uv run python.references/subagent-analysis.prompt.md) as mandatory base; do not send ad-hoc relaxed read instructions.reason: low_text_requires_confirmation with prompt_en text.node .../calibredb_read.mjs instead of direct calibredb calls.calibre-server from this skill.
--with-library first.list/search/id) without explicit --with-library and use saved defaults.
.env and resolve CALIBRE_WITH_LIBRARY / CALIBRE_CONTENT_SERVER_URL.missing --with-library / unable to resolve usable --with-library).lang input.run_analysis_pipeline.py is a local script and does not call OpenClaw tools by itself.
Subagent execution must be orchestrated by the agent layer using sessions_spawn.
Required runtime sequence:
subagent_input.json + chunked source_files from extracted text.
node skills/calibre-catalog-read/scripts/prepare_subagent_input.mjs \
--book-id <id> --title "<title>" --lang ja \
--text-path /tmp/book_<id>.txt --out-dir /tmp/calibre_subagent_<id>
subagent-spawn-command-builder to generate the sessions_spawn payload, then calls sessions_spawn.
calibre-read and run-specific analysis task text.source_files and returns analysis JSON (schema-conformant).--analysis-json to run_analysis_pipeline.py for DB/apply.If step 2 is skipped and --analysis-json is not provided, the pipeline returns updated: false, analysis_mode: fallback without writing to DB or Calibre comments. Pass --allow-fallback to force-persist local analysis (testing only).
For Discord/chat, always run as two separate turns.
subagent-spawn-command-builder (--profile calibre-read + run-specific --task).sessions_spawn using that payload.runId) via run_state.mjs upsert.Trigger: completion announce/event for that run.
scripts/handle_completion.mjs (get -> apply -> remove, and fail on error).runId is missing, handler returns stale_or_duplicate and does nothing.Hard rule:
For one-book-at-a-time operation, keep a single JSON state file:
skills/calibre-catalog-read/state/runs.jsonUse runId as the primary key (subagent execution id).
Lifecycle:
runId, book_id, title, status: "running", started_atrunId and run apply.status: "failed" + error and keep record for retry/debug.Rules:
Use helper scripts (avoid ad-hoc env var mistakes):
# Turn A: register running task
node skills/calibre-catalog-read/scripts/run_state.mjs upsert \
--state skills/calibre-catalog-read/state/runs.json \
--run-id <RUN_ID> --book-id <BOOK_ID> --title "<TITLE>"
# Turn B: completion handler (preferred)
node skills/calibre-catalog-read/scripts/handle_completion.mjs \
--state skills/calibre-catalog-read/state/runs.json \
--run-id <RUN_ID> \
--analysis-json /tmp/calibre_<BOOK_ID>/analysis.json \
--with-library "http://HOST:PORT/#LIBRARY_ID" \
--password-env CALIBRE_PASSWORD --lang ja