Hardcover Bookshelf Skill
/install hardcover-bookshelf
Hardcover Bookshelf
Use this skill to treat Hardcover as a conversational bookshelf assistant.
It is optimized for prompts like:
what's on my reading listi started reading the complete mausi finished reading dunehow many books did i read last year
Required Environment
Require HARDCOVER_TOKEN before making API calls.
Token format is Option A: the env var must contain the full Authorization header value exactly as copied from Hardcover, including the Bearer prefix.
Example:
export HARDCOVER_TOKEN='Bearer eyJ...'
If missing or malformed, stop and ask the user to set it correctly.
Commands
Run these from the skill's root directory. Pass --json for machine-readable output.
npx tsx src/cli.ts list [--limit 20] [--json]
npx tsx src/cli.ts start --title "The Complete Maus" [--json]
npx tsx src/cli.ts finish --title "The Complete Maus" [--json]
npx tsx src/cli.ts count-last-year [--json]
These commands call the local TypeScript client in src/ and centralize auth, schema quirks, and error handling.
Intent mapping
"What's on my reading list?"
Interpret reading list as Want to Read.
Run:
npx tsx src/cli.ts list
Return a clean bullet list and mention the total shown.
"I started reading \x3Cbook>"
Run:
npx tsx src/cli.ts start --title "\x3Cbook>"
Behavior:
- checks currently-reading shelf first for an exact normalized title match
- falls back to Hardcover search
- if ambiguous, the command returns numbered choices; ask the user to choose before mutating
- if already currently reading, it returns the existing entry instead of creating a duplicate
"I finished reading \x3Cbook>"
Run:
npx tsx src/cli.ts finish --title "\x3Cbook>"
Behavior:
- resolves the title the same way as start-reading
- prefers an existing currently-reading entry for that book
- otherwise updates the most recent existing
user_bookfor that book - sets status to Read and uses
last_read_dateas the finish-date field
Note: this is a best-effort implementation based on the live schema tested so far. If Hardcover later exposes a better canonical finish-date field for user books, update the client and references.
"How many books did I read last year?"
Run:
npx tsx src/cli.ts count-last-year
Behavior:
- computes the previous calendar year in UTC
- counts books with
status_id=3andlast_read_dateinside that year - returns the total plus a small verification sample
Safety & ambiguity rules
- Never mutate when title resolution is ambiguous.
- If the command prints multiple choices, ask the user to choose.
- Prefer concise numbered disambiguation.
- Echo the final title and state change after successful writes.
Files
src/client.ts— Hardcover API client and common operationssrc/cli.ts— unified CLI entrypointreferences/schema-quirks.md— live notes on auth, status IDs, and mutation/query quirks
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install hardcover-bookshelf - 安装完成后,直接呼叫该 Skill 的名称或使用
/hardcover-bookshelf触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Hardcover Bookshelf Skill 是什么?
Talk to a user's Hardcover bookshelf via the Hardcover GraphQL API. Use when the user wants to manage reading activity in natural language: start a book, fin... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 170 次。
如何安装 Hardcover Bookshelf Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install hardcover-bookshelf」即可一键安装,无需额外配置。
Hardcover Bookshelf Skill 是免费的吗?
是的,Hardcover Bookshelf Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Hardcover Bookshelf Skill 支持哪些平台?
Hardcover Bookshelf Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Hardcover Bookshelf Skill?
由 diwakergupta(@diwakergupta)开发并维护,当前版本 v0.1.0。