Agent skill

Book Metadata

by pottekkat in pottekkat/personal-website

Research bibliographic metadata for a book and download a high-resolution cover from LibraryThing, returning front matter for content/books/.

MITAuto-check passedDocuments & Office

Install Book Metadata

skills CLI
$ npx skills add pottekkat/personal-website --skill book-metadata -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pottekkat/personal-website book-metadata --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pottekkat/personal-website.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/book-metadata .claude/skills/book-metadata && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
book-metadata
GitHub stars
128
Token cost
~2.8k tokens
SKILL.md length
1,362 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Research bibliographic metadata for a book and download a high-resolution cover from LibraryThing, returning front matter for content/books/.

  • Works in 6 steps: identify the book → pick the edition → Goodreads URL → …
  • Adding a book to The Bookshelf
  • SKILL.md covers Scope — read this first, Output contract, Step 1 — identify the book and Step 2 — pick the edition, plus 5 more sections
  • Calls curl, magick and black; reaches librarything.com and goodreads.com

What it does

Book Metadata is an agent skill from pottekkat/personal-website. Research bibliographic metadata for a book and download a high-resolution cover from LibraryThing, returning front matter for content/books/. Use when adding a book to The Bookshelf, filling in an empty book review stub, or when asked for book metadata for this site.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering Markdown. The repository describes itself as: Source code of my personal website. The licence is MIT.

When your agent uses it

  • Adding a book to The Bookshelf
  • Filling in an empty book review stub
  • Asked for book metadata for this site

Example prompts

  • “/book-metadata”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. identify the book
  2. pick the edition
  3. Goodreads URL
  4. genre
  5. cover image
  6. summary

What it can do on your machine

Read from SKILL.md and the folder at commit a1a1e49. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • magick
    • black

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • librarything.com
    • goodreads.com
    • googleapis.com
    • openlibrary.org
    • covers.openlibrary.org

    Also links to:

    • pics.cdn.librarything.com
    • m.media-amazon.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Book Metadata loads about 2.8k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 1,362 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pottekkat/personal-website at commit a1a1e49, republished under its MIT licence (© pottekkat). 1,362 words, ~2,764 tokens.

Download SKILL.mdSave it as .claude/skills/book-metadata/SKILL.md (or your agent's skills folder).
name
book-metadata
description
Research bibliographic metadata for a book and download a high-resolution cover from LibraryThing, returning front matter for content/books/. Use when adding a book to The Bookshelf, filling in an empty book review stub, or when asked for book metadata for this site.

Book metadata for The Bookshelf

Research one book and return its bibliographic front matter as JSON, and download its cover image into static/images/books/covers/.

Scope — read this first

Research and the cover download only. Do not write the .md file and do not write the review body. The caller applies the metadata:

  • Invoked from the Front Matter CMS button (scripts/frontmatter/book-metadata.js), the JSON is fed to ContentScript.updateFrontMatter() and Front Matter writes the front matter itself. A second writer would conflict.
  • Invoked interactively, hand the JSON back and let the user apply it.

Never set status, rating, draft, date, or title — those are the user's, not the catalogue's. Never invent the body text.

Output contract

Final output must be exactly this object (no prose around it):

json
{
  "summary": "Review of \"The Lost Continent: Travels in Small-Town America\" by Bill Bryson.",
  "bookMeta": {
    "author": "Bill Bryson",
    "published": 1989,
    "isbn": "9780552998086",
    "publisher": "Black Swan",
    "pageCount": 379,
    "genre": ["Humor", "Memoir", "Non-Fiction", "Travel", "American"],
    "coverImage": "/images/books/covers/the-lost-continent.jpg"
  },
  "notes": "Anything uncertain, plus the LibraryThing work id used."
}

goodreadsUrl goes inside bookMeta too — it is omitted above only for brevity. When the caller supplies a JSON schema, match it exactly.

Every key is always present. A field you could not verify is "" (or 0, or []) — never a guess. The caller drops empty values rather than writing them, so a blank is safe and a wrong value is not.

notes is for the human, not the file. Put every uncertainty there. Note that the Front Matter button discards notes — say anything critical by leaving the field blank so the gap is visible in the file itself.

Step 1 — identify the book

Two REST APIs, no auth, no scraping:

bash
curl -s "https://www.googleapis.com/books/v1/volumes?q=intitle:<title>+inauthor:<author>"
curl -s "https://openlibrary.org/search.json?q=<title>+<author>&fields=title,author_name,first_publish_year,isbn,publisher,number_of_pages_median,subject&limit=5"

Cross-check at least two independent sources for the ISBN and page count. If they disagree, prefer the one matching the edition you picked in step 2 and record the conflict in notes.

Step 2 — pick the edition

Look at how the neighbours in content/books/ are filled before deciding:

FieldRule
publishedYear the work was first published, not the reprint. Kundera's Unbearable Lightness is 1984 even though the ISBN is a 2000 Faber printing.
isbnThe specific edition — quoted string, 13 digits, no hyphens. Prefer a widely-held paperback the user plausibly owns.
publisherPublisher of that edition (Black Swan, Faber & Faber), not the original house.
pageCountThat edition.

Step 3 — Goodreads URL

Canonical https://www.goodreads.com/book/show/<id>.<Slug> or <id>-<slug> form. Verify the id resolves to the right book — Goodreads has many editions and the wrong id silently points at a different translation. If you cannot verify it, omit the field and say so in notes. A missing link is better than a wrong one.

Step 4 — genre

Genres are a closed taxonomy. Read the allowed values before choosing:

frontmatter.json → frontMatter.taxonomy.customTaxonomy → the entry with "id": "genre"

Pick 3–5. Order them alphabetically, with any nationality or language genre last — that is the existing convention:

  • Humor, Memoir, Non-Fiction, Travel, American
  • Classics, Fiction, Philosophy, Czech
  • Contemporary, Fiction, Scandinavian

If nothing in the list fits, propose a new genre in notes. Do not silently invent one: an unlisted value shows up as an unknown taxonomy entry in the CMS.

Step 5 — cover image

Aim for ≥1000px wide. layouts/partials/book_cover.html builds a srcset out to 720w, and Hugo upscales rather than refusing, so a 600px source silently produces a soft 720w variant — that is what makes a cover look blurry on a retina screen. Existing covers run 800–1730px wide; the few 400–600px ones are the bad outliers, not the target.

Do not judge quality by file size — flat cover art compresses to very few bytes while staying crisp (the-art-of-doing-science-and-engineering.jpg is 1730×2560 in 76K). But do not trust pixel dimensions either; substep 5 below has the test that actually works.

LibraryThing sits behind a Cloudflare challenge, so plain curl on the site returns 403 — use the browser tools for the lookup, then curl the CDN URL you find (the CDN itself is open).

  1. Navigate to https://www.librarything.com/isbn/<isbn>. It redirects to https://www.librarything.com/work/<workid>. Cloudflare shows "Just a moment…" first — wait for that text to disappear (up to ~15s) before reading the page.

  2. Navigate to https://www.librarything.com/work/<workid>/covers/.

  3. Each cover is a div.cover_box holding a thumbnail, a dimensions label (div.cover_size → e.g. 1272 × 1897), and an anchor whose onclick carries the cover id: lt.newwork.cover_info_popup(event, 'yourcustom', 'custom:4906380', ...). Enumerate them and pick the best cover — highest listed resolution, correct edition art, front cover only, no obvious scan artefacts. Prefer boxes marked high_quality.

  4. Click that anchor to get the full URL. Two kinds come back:

    • A member upload on LibraryThing's own CDN, capped at whatever the popup emits:

      https://pics.cdn.librarything.com/picsizes/49/06/4906380-c-h1200-w600-pv25_<hash>_v5.jpg

      The size directive and the hash are cryptographically bound, so you cannot hand-edit -w600- to force a bigger image — a wrong hash returns the same stored rendition or a 307. This is usually the low-resolution option.

    • An Amazon-sourced cover (LibraryThing labels these Higher instead of giving dimensions), which is where the resolution actually is. Take the ISBN-10 out of the URL and ask Amazon for the native maximum:

      bash
      curl -sL -A "Mozilla/5.0" -o cover.jpg \
        "https://m.media-amazon.com/images/P/<isbn10>.01._SX1500_SY2400_SCRM_.jpg"

      Amazon downscales to its stored maximum and ignores anything larger, so this returns the biggest it has — request _SX1500_ and accept the 1000px you get. Do not use _SX600_, _SCLZZZZZZZ_, or .LZZZZZZZ.: the first hard-compresses and the other two cap around 330px.

  5. Pixel dimensions lie. Measure real detail, and look at the image. Several sources happily return a big upscale of a small master, and one returns a placeholder.

    Download every candidate, then rank them by edge energy at a common width so the comparison is fair:

    bash
    magick <file> -resize 1000x -colorspace Gray \
      -define convolve:scale='!' -morphology Convolve Laplacian:0 \
      -format "%[fx:standard_deviation]\n" info:

    Higher is sharper. On Why Men Rebel the 1000px print-ISBN image scored 0.0181 while a 3330×5000 Kindle-ASIN image scored 0.0112 — the "bigger" file had 1.7× less real detail. Pick the winner of this test, not the largest file.

    Then confirm by eye at 1:1, which is the only thing that reliably catches mush:

    bash
    magick <file> -crop 500x260+<x>+<y> +repage /tmp/crop.png   # over some large type

    Read that crop. Crisp letter edges = real resolution. Soft, smeared edges = an upscale, no matter what the dimensions say. Also confirm it is the right edition's art and not a placeholder. If the file is HTML or a 1x1 the download failed; do not leave a broken file behind.

    Target ≥1000px of real detail, never below 720px.

    Dead ends already measured, so do not spend turns on them:

    sourceresult
    Amazon _SX<big>_ on a Kindle ASINupscales on demand to any size — soft, ignore the dimensions
    books.google.com/…&fife=w1600can return a grey "no cover" placeholder at 1734×2500 — always look at it
    Google Books APIenvironment-wide 429, quota_limit_value 0 — assume unavailable
    images.tandf.co.uk / images.routledge.com /common/jackets/*350px max, even on the publisher's own product page
    Open Library -L~350px
    Waterstones, Blackwell's, Wordery, Bokus, Booktopia, IndieBound, B&N≤300px or 403

    Amazon's print-ISBN path (_SX1500_) is the one that refuses to upscale past its master, which is what makes it trustworthy.

  6. Sharpening is allowed when the softness is a resampling artifact. Cover art that is flat type on a flat background — no photographic texture — recovers real crispness from a mild unsharp mask. Do not use this to prop up a genuine upscale.

    bash
    magick <file> -unsharp 0x1.2+1.4+0.01 -quality 92 <out>.jpg

    Then check a 1:1 crop of the thinnest details (hairlines, publisher logo, small caption type) for bright or dark halo ringing. Back the amount off until the halos are gone. On Why Men Rebel this took edge energy from 0.0181 to 0.0373 with no visible halo.

Show full SKILL.md (195 more words)Show less

Filename: the page slug, shortened if the slug is long — stubborn-attachments.jpg for stubborn-attachments-a-vision-for-a-society-of-..., the-lost-continent.jpg for the-lost-continent-travels-in-small-town-america. Keep the .jpg extension (Hugo's image pipeline in layouts/partials/book_cover.html handles jpg/png/webp, but jpg is the norm). coverImage is the site-absolute path: /images/books/covers/<file>.

Fallback if LibraryThing has no usable cover or the browser tools are unavailable. Try Amazon first, since it needs no browser and no Cloudflare dance — convert the edition's ISBN-13 to its ISBN-10 and use the _SX1500_ form from step 4. Only if that 404s fall back to Open Library:

bash
curl -sL -o cover.jpg "https://covers.openlibrary.org/b/isbn/<isbn>-L.jpg"

Open Library's -L is only ~350px and sometimes a placeholder, which is below what the image pipeline needs. Take it only as a last resort, and say so in notes so the user knows to replace it by hand.

Step 6 — summary

Exactly this shape, matching every other book on the site:

Review of "<Title>" by <Author>.

That is the whole summary. It is a card subtitle, not a blurb — do not describe or review the book.

Accuracy

A wrong ISBN or a cover from the wrong edition is worse than a blank field, because it looks correct and never gets checked. Leave a field out and explain in notes rather than guessing.

© pottekkat, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/book-metadata of pottekkat/personal-website.

Open the folder on GitHubat commit a1a1e49

Compare with similar skills

Book Metadata next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Book Metadata compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Book Metadata this skillpottekkat/personal-website128—~2.8kAutomated safety check: PassMIT
Markdown Article FormatterJimLiu/baoyu-skills27k6 repos~3.5kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Obsidian MarkdownAtmosphere/atmosphere3.8k20 repos~1.3kAutomated safety check: PassApache-2.0
Crosspostingwasp-lang/wasp19k—~1.1kAutomated safety check: PassMIT
Gzh Designisjiamu/gzh-design-skill4k—~2.2kAutomated safety check: PassAGPL-3.0

Similar skills

  • Markdown Article Formatter

    JimLiu/baoyu-skills

    Reformats plain text or Markdown articles with frontmatter, a title, a summary, headings, bold, lists and code blocks, and saves a separate formatted copy.

    27k GitHub starsUsed in 6 repos~3.5k tokens
    Documents & OfficeAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Obsidian Markdown

    Atmosphere/atmosphere

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    3.8k GitHub starsUsed in 20 repos~1.3k tokens
    Documents & OfficeAuto-check passed
  • Crossposting

    wasp-lang/wasp

    Crosspost Wasp blog articles (MDX) to DEV.to and Medium. An agent skill from wasp-lang/wasp.

    19k GitHub stars~1.1k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Gzh Design

    isjiamu/gzh-design-skill

    微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…

    4k GitHub stars~2.2k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • Review The Docs

    supabase/supabase

    Official

    Review Supabase docs changes locally in your supabase/supabase checkout — either an open PR (triage, classify, verify) or your own branch before opening a PR (local self-review).

    111k GitHub stars~4.6k tokensUpdated yesterday
    Documents & OfficeAuto-check passed

Questions about Book Metadata

What does Book Metadata do?

Research bibliographic metadata for a book and download a high-resolution cover from LibraryThing, returning front matter for content/books/. Book Metadata is an agent skill from pottekkat/personal-website. Research bibliographic metadata for a book and download a high-resolution cover from LibraryThing, returning front matter for content/books/.

When should I use Book Metadata?

Book Metadata fits situations like: adding a book to The Bookshelf; filling in an empty book review stub; asked for book metadata for this site.

How do I install Book Metadata in Claude Code?

Run `npx skills add pottekkat/personal-website --skill book-metadata -a claude-code`. Or copy the skill folder (.claude/skills/book-metadata in pottekkat/personal-website) into .claude/skills/book-metadata in your project. Claude Code loads it when a task matches its description.

How do I install Book Metadata in Codex?

Run `npx skills add pottekkat/personal-website --skill book-metadata -a codex`. Or copy the skill folder (.claude/skills/book-metadata in pottekkat/personal-website) into .agents/skills/book-metadata in your project. Codex loads it when a task matches its description.

Can I use Book Metadata in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pottekkat/personal-website --skill book-metadata -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/book-metadata, .gemini/skills/book-metadata, .github/skills/book-metadata and .opencode/skills/book-metadata in your project.

What does Book Metadata need to run?

Going by SKILL.md and its folder, Book Metadata needs the command-line tools its instructions call (curl, magick and black).

Does Book Metadata access the network?

SKILL.md names 7 domains. In commands or code: librarything.com, goodreads.com, googleapis.com, openlibrary.org and covers.openlibrary.org; the agent is likely to contact these when it follows the instructions. As links in the text: pics.cdn.librarything.com and m.media-amazon.com. This is read from the text; nothing was executed.

Is Book Metadata safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Book Metadata use?

Book Metadata is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Book Metadata use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Book Metadata?

Skills that share tags, products or a category with Book Metadata: Markdown Article Formatter (JimLiu/baoyu-skills, 27k stars), Markitdown (ImCa0/just-laws, 781 stars), Obsidian Markdown (Atmosphere/atmosphere, 3.8k stars) and Crossposting (wasp-lang/wasp, 19k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Book Metadata?

pottekkat (a GitHub user) maintains it in pottekkat/personal-website, which has 128 GitHub stars. The repository was last updated on October 11, 2026.

Source: pottekkat/personal-website on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.