About calibredb
The CalibreDB skill provides guidance for command-line operations on Calibre libraries, for users who need to inspect or maintain book records. It emphasizes identifying the library path, starting with read-only checks, and confirming intent before destructive operations.
Key features
- 01Target a local library or Content server
- 02Search books and inspect metadata
- 03Add books and update fields
- 04Run library health checks
- 05Distinguish read-only from destructive operations
Use cases
- 01Find books and retrieve record IDs
- 02Review book records and format information
- 03Update metadata or add book files
- 04Check library health
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ lvtd-llc/ skills --skill calibredbAfter installing, type/calibredbin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/command-matrix.mdsafe-workflows.mdscripts/list_books_json.pyDetails
From the project READMECalibreDB
Use this skill for all command-line operations on Calibre libraries.
Library path
- Calibre library locations are user-specific. Identify the target library path or Content server URL before running commands.
- Prefer explicit path in every command:
--with-library "$CALIBRE_LIBRARY". - If the user has not provided a library path, ask for it or inspect the local environment for an existing Calibre library before proceeding.
- For machine-readable outputs, use
--for-machineor JSON-capable subcommands.
Safety model
Start with read-only operations, then escalate only when needed.
Read-only (safe by default)
listsearchshow_metadatacustom_columnslist_categoriescheck_libraryfts_searchfts_index status
Mutating (confirm intent for destructive/irreversible)
- Usually safe with clear intent:
add,set_metadata,set_custom,add_format,embed_metadata,backup_metadata - Confirm before destructive actions:
remove,remove_format,remove_custom_column,restore_database,fts_index reindexon full library
Core workflow
- Identify target library and set
--with-library. - Discover relevant book IDs with
search(orlist --search). - Inspect records with
show_metadataorlist --for-machine. - Apply minimal required mutations.
- Validate with follow-up
list/search/show_metadata.
Quick command patterns
1) List books
export CALIBRE_LIBRARY="/path/to/Calibre Library"
calibredb list --with-library "$CALIBRE_LIBRARY" --fields id,title,authors,formats --limit 20
Machine output:
calibredb list --with-library "$CALIBRE_LIBRARY" --fields id,title,authors,tags,formats --for-machine
2) Search and get IDs
calibredb search --with-library "$CALIBRE_LIBRARY" "title:python"
Use IDs in follow-up commands.
3) Show metadata
calibredb show_metadata --with-library "$CALIBRE_LIBRARY" 123
As OPF:
calibredb show_metadata --with-library "$CALIBRE_LIBRARY" --as-opf 123
4) Update metadata fields
calibredb set_metadata --with-library "$CALIBRE_LIBRARY" 123 \
--field title:"Example Book" \
--field tags:"python,reference"
5) Add/export books
calibredb add --with-library "$CALIBRE_LIBRARY" "/path/to/book.epub"
calibredb export --with-library "$CALIBRE_LIBRARY" 123 --to-dir "/tmp/export"
6) Library health check
calibredb check_library --with-library "$CALIBRE_LIBRARY"
Content server usage
To target a running Calibre Content server:
calibredb list --with-library "http://hostname:8080/#library_id" --username <user> --password <pass>
From docs: use special #- library id to list server libraries.
Security note: a literal --password <pass> value is passed as a process
argument and may be visible to other users on shared machines via
process-listing tools. Prefer --password '<stdin>' with the password piped
from a password manager, or --password '<f:/path/to/file>' with a 0600
credential file stored outside the repository. Prefer local or trusted hosts
for authenticated Content server commands, and redact credentials from shell
history, logs, and task transcripts.
Reference files
- Command matrix + options:
references/command-matrix.md - Safe operational playbooks:
references/safe-workflows.md