← 返回 Skills 市场
diwakergupta

Hardcover Bookshelf Skill

作者 diwakergupta · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
170
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hardcover-bookshelf
功能描述
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...
使用说明 (SKILL.md)

Hardcover Bookshelf

Use this skill to treat Hardcover as a conversational bookshelf assistant.

It is optimized for prompts like:

  • what's on my reading list
  • i started reading the complete maus
  • i finished reading dune
  • how 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_book for that book
  • sets status to Read and uses last_read_date as 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=3 and last_read_date inside 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 operations
  • src/cli.ts — unified CLI entrypoint
  • references/schema-quirks.md — live notes on auth, status IDs, and mutation/query quirks
安全使用建议
This skill appears to do exactly what it claims: it runs a local TypeScript client that calls Hardcover's GraphQL API. Before installing, consider: (1) HARDCOVER_TOKEN is the only secret required — supply only the Hardcover API token and understand it grants the skill permission to read and change your Hardcover shelves (start/finish/create entries). (2) The skill runs local code (no remote downloads), so inspect src/client.ts if you want to verify behavior; its network calls go only to https://api.hardcover.app/v1/graphql. (3) The CLI docs and package.json use npx/tsx; the code's usage() message mentions bun — a minor docs inconsistency only. (4) If you are concerned about autonomous actions, remember the skill can be invoked by the agent to perform mutations; only provide the token to trusted skills and revoke it from your Hardcover account if you stop using the skill.
功能分析
Type: OpenClaw Skill Name: hardcover-bookshelf Version: 0.1.0 The skill is a legitimate integration for the Hardcover.app GraphQL API, allowing users to manage their reading lists and track book progress. The code in `src/client.ts` and `src/cli.ts` implements standard API interactions, using the `HARDCOVER_TOKEN` environment variable for authentication as described in the documentation. All network requests are directed to the official Hardcover endpoint (api.hardcover.app), and there is no evidence of data exfiltration, malicious command execution, or harmful prompt injection instructions.
能力评估
Purpose & Capability
Name, README, SKILL.md, and the bundled TypeScript client all implement Hardcover GraphQL calls to list, start, finish, and count books. The single required env var (HARDCOVER_TOKEN) is the service API token and is proportional to the stated purpose.
Instruction Scope
Runtime instructions only direct the agent to run the local CLI (npx tsx src/cli.ts ...) and require HARDCOVER_TOKEN. The code only reads that env var and calls the official Hardcover endpoint; it does not instruct reading unrelated system files or exfiltrating data to third-party endpoints.
Install Mechanism
No remote downloads or arbitrary installers are used — the skill bundles TypeScript source and relies on Node/tsx. The registry install spec only lists node; SKILL.md and package.json expect running npm / npx/tsx for local execution. Minor inconsistency: the CLI's usage() prints 'bun run ...' while the rest of docs/commands use 'npx tsx' (likely harmless but inconsistent).
Credentials
Only HARDCOVER_TOKEN is required and correctly documented (including the 'Bearer ' prefix). That single credential directly maps to Hardcover API access. Note: possession of this token grants read/write access to the user's Hardcover account (can list and mutate user_books), which is expected for this skill.
Persistence & Privilege
Skill is not always-on and does not request elevated privileges or modify other skill/system configs. It can be invoked autonomously (platform default), which would allow it to perform API mutations if given the token — this is expected for a skill that performs write operations.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install hardcover-bookshelf
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /hardcover-bookshelf 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of hardcover-bookshelf skill. - Allows conversational management of a user's Hardcover bookshelf and reading activity via the Hardcover GraphQL API. - Supports starting and finishing books, viewing the "Want to Read" shelf, and computing yearly reading stats. - Requires the HARDCOVER_TOKEN environment variable, exactly as copied from Hardcover (including the Bearer prefix). - Provides CLI commands for listing books, starting/finishing reading, and counting books read last year. - Handles ambiguous or missing titles with user prompts before mutating data. - Includes safety rules to prevent accidental changes and clear feedback for user actions.
元数据
Slug hardcover-bookshelf
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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。

💬 留言讨论