calibre-catalog-read
简介
calibre-catalog-read
原始描述
Calibre catalog lookup, viewing, and delegated one-book analysis.
通过你的 Agent 添加
安装目录:calibre-catalog-read/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: "calibre-catalog-read"
description: "Calibre catalog lookup, viewing, and delegated one-book analysis."
metadata: {"openclaw":{"requires":{"bins":["node","uv","calibredb","ebook-convert"],"env":["CALIBRE_PASSWORD"]},"optionalEnv":["CALIBRE_USERNAME"],"primaryEnv":"CALIBRE_PASSWORD","localWrites":["skills/calibre-catalog-read/state/runs.json","skills/calibre-catalog-read/state/calibre_analysis.sqlite","skills/calibre-catalog-read/state/cache/**"],"modifiesRemoteData":["calibre:comments-metadata"]}}
calibre-catalog-read
Use for Calibre read-only catalog work and the one-book analysis/comments workflow.
Routing
Use this skill for:
- list/search/id catalog lookup.
- ID viewing:
ID 1021 を確認して,1021番の詳細,show/view/check book 1021. - Natural book conversation where a lightweight library lookup helps.
- One-book analysis only when the user clearly asks to read/analyze a book.
Do not use for metadata edits. If the user asks to change title/authors/series/series_index/tags/publisher/pubdate/languages, route to calibre-metadata-apply.
ID alone is not edit intent. 確認/見せて/教えて/詳細/check/show/view means read-only. calibre-metadata-apply requires explicit edit verbs such as 修正/編集/変更/直す/fix/edit/update/change.
Local Facts
Read the workspace AGENTS.md ## Tools section for Content server URL, library id, auth policy, and reading script.
Connection bootstrap:
- Do not ask the user for
--with-libraryfirst. - First try scripts without explicit
--with-library; they auto-load.envand saved defaults. - Ask for URL only if resolution fails (
missing --with-libraryor unable to resolve usable library). - Non-SSL auth is Digest; do not pass auth-mode/auth-scheme flags.
- Never start
calibre-serverfrom chat. - Do not assume localhost/127.0.0.1; the workspace
AGENTS.md## Toolssection has the reachable server.
Requirements: calibredb, ebook-convert, node, and uv.
Commands
Prefer wrapper scripts over direct calibredb in agent/chat.
List: node skills/calibre-catalog-read/scripts/calibredb_read.mjs list --password-env CALIBRE_PASSWORD --limit 50
Search: node skills/calibre-catalog-read/scripts/calibredb_read.mjs search --password-env CALIBRE_PASSWORD --query 'series:"中公文庫"'
Get by id: node skills/calibre-catalog-read/scripts/calibredb_read.mjs id --password-env CALIBRE_PASSWORD --book-id 3
One-book pipeline with prepared analysis JSON: uv run python skills/calibre-catalog-read/scripts/run_analysis_pipeline.py --password-env CALIBRE_PASSWORD --book-id 3 --lang ja --analysis-json /tmp/calibre_3/analysis.json
Prepare subagent input: node skills/calibre-catalog-read/scripts/prepare_subagent_input.mjs --book-id 3 --lang ja --out-dir /tmp/calibre_3
Run state: node skills/calibre-catalog-read/scripts/run_state.mjs upsert --run-id <RUN_ID> --book-id 3 --title "..." --state running node skills/calibre-catalog-read/scripts/handle_completion.mjs --run-id <RUN_ID> --analysis-json /tmp/analysis.json
One-Book Analysis Flow
Delegate only full-book reading. Main remains the control plane.
- Confirm target
book_id. - Prepare input with
scripts/prepare_subagent_input.mjs. - Build a self-contained task from
references/subagent-analysis.prompt.mdand the generatedsubagent_input.jsonpath. - Call OpenClaw
sessions_spawnwith the live tool schema:runtime: "subagent"agentId: "calibre-reader"mode: "run"context: "isolated"lightContext: true- omit
modelandthinking; the target agent profile owns them.
- Save the returned run/session identifiers with
scripts/run_state.mjs upsert. - Use
sessions_yieldwhen completion belongs in a later turn. Do not poll session or subagent lists. - On completion, validate the raw JSON against
references/subagent-analysis.schema.json, then runscripts/handle_completion.mjs.
Use Swarm only for an explicitly requested independent multi-book batch. Keep one book per child and preserve the same input/output contract.
Hard rules:
- One book per child run.
- Main owns user-facing replies and Calibre comments apply.
- Child reads prepared input and emits analysis JSON only; it must not apply metadata or message the user.
- Use
references/subagent-analysis.prompt.md; do not send relaxed ad-hoc instructions. - Input schema:
references/subagent-input.schema.json; output schema:references/subagent-analysis.schema.json. - Exclude manga/comic-centric books from this text pipeline.
- If extracted text is too short, stop and ask for confirmation.
- Keep
state/runs.jsonto active/failed records only. - At completion, missing runId means stale/duplicate; do not apply blindly.
Cache And Language
Cache DB is skills/calibre-catalog-read/state/calibre_analysis.sqlite. Treat cache as acceleration, not authority; final user-visible analysis must reflect the current target and completed run.
Language policy:
- Do not hardcode user-language prose in pipeline scripts.
- Generate user-visible analysis from child output, controlled by user settings and the
langinput. - Local fallback analysis is generic/minimal; prefer output following the prompt template.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。