Searches Yale's library catalog via Alma SRU and LUX JSON API for books, museum objects, archives, and more. Returns call numbers, locations, availability, and online access links.
Ships in yale-library-catalog. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Search Yale's library catalog (Alma) for print and online holdings. No API key needed.
Yale runs its catalog on Ex Libris Alma. Alma has a public SRU interface (Search/Retrieve via URL, a library standard for searching catalogs over plain HTTP). Queries are written in CQL (Contextual Query Language, e.g. alma.title="明史"). Records come back as MARCXML; the script turns them into simple JSON.
https://yale.alma.exlibrisgroup.com/view/sru/01YALE_INST
?version=1.2&operation=searchRetrieve&recordSchema=marcxml
&query=alma.title="明史"&maximumRecords=10
Yale's Quicksearch site (search.library.yale.edu) answers scripts with an empty HTTP 202 bot-check response. Yale also has an official "AI Connector" MCP server (announced 15 October 2026), but it is in beta for the Yale community only. Alma SRU is open and needs no key. Give people search.library.yale.edu/catalog/{mms_id} links to open in a browser.
Yale's AVE fields carry $u, an access link (OpenURL). The script returns it as holdings.electronic[].url. Access still needs a Yale login.
LUX (lux.collections.yale.edu) searches the library catalog together with the Yale art galleries, Peabody Museum, Beinecke, and archives. It returns Linked Art JSON-LD. Use it for objects, artworks, people, places, and archival collections. Use Alma SRU for book holdings and call numbers.
scripts/lux_api.py fetches each one and summarizes it (one extra request per result).item (physical/digital objects), work (texts, images), agent (people, groups), place, concept, event, set (collections).{"text": "明史"}, {"name": "Wen Zhengming"}, {"AND": [{"text": "Ming"}, {"producedBy": {"name": "Wen Zhengming"}}]}.GET /api/search-info lists every search term per scope; GET /api/translate/{scope}?q=... turns plain words into a JSON query.One search that returns 0 does not show that the library lacks the book. A full citation often misses because of a subtitle, an accent (Cœdès, Śrīvijaya), a hyphen, or a reprint under a new title.
To check whether a library has a known book, use find, not search. It tries several wordings (full title with author, main title, first words of the title, plain-ASCII spelling, then looser steps) and stops at the first one that gives records.
python scripts/yale_api.py find --title "The Indianized States of Southeast Asia" --author "George Cœdès"
The answer has a status. found: the title matched; still read the record. possible: only the author and a few title words matched; it may be a reprint under another title, or other books by the same author. not_found: none of the steps matched.
Report not_found as "not found by these searches, unchecked", never as "the library does not have it". Give the person a link to the library's website search to check by hand.
The keyword index (alma.all_for_ui) and the author index (alma.creator) match a phrase. author="George Cœdès" gives 0 because the heading is "Cœdès, George"; search the surname alone.
For Chinese, Japanese, and Korean keywords, search the traditional form, the simplified form, and the romanization, and merge by mms_id.
$q library name, $c location, $d call number, $e available/unavailable, $f item count, $t volume summary.$m collection, $t interface (platform), $e Available, $n note, $u access link (when supplied).The script reads both into holdings.physical and holdings.electronic. Keys: holdings.physical[] has library, location, call_number, availability, items_total, items_unavailable, summary; holdings.electronic[] has collection, interface, availability, note, url. Much of Yale's print collection is at the Library Shelving Facility ($q = Library Shelving Facility); people request those items for use at any Yale library.
The main fields (245 title, 100 author, 260/264 publisher) are romanized (pinyin, Hepburn, McCune-Reischauer). The original script is in a linked 880 field. The script pairs them, so title reads like 明史 (Ming shi). Search in both scripts: alma.title="明史" and alma.title="Ming shi" return different sets.
alma.title="shi dian" matches records with shi and dian anywhere in the title (256 hits at Yale on 2026-10-26, many of them unrelated titles). Quotes and adj change nothing; == matches the whole title field exactly.phrase=True (CLI --phrase) to keep only titles that contain the term as one connected phrase. It filters each page after the search, so total is still the server's count; use search_all(..., phrase=True) to scan every page.shi dian also matches 知识典籍 (zhi shi dian ji), and ji qi is 機器 as well as 祭器. After a romanized search, keep the records whose vernacular title has the characters you want.alma.title="文廟" misses it at U-M and Princeton (Yale finds it). The romanized Wen miao finds it.mms_id.startRecord (1-based); search_all() does this for you.... sortBy alma.main_pub_date/sort.descending. The sortKeys parameter is ignored. Records with unknown dates (uuuu) sort first in ascending order; add cql="alma.main_pub_date>=1000" to drop them. But placeholder years such as #### still pass that filter and sort first (seen at Princeton and U-M on 2026-10-26). Add known_dates=True (CLI --known-dates) to drop records whose year is not four digits. It filters each page after the search, like phrase.-- and pass it to subject. The script splits it and searches each part, AND'd together. Do not send a long heading as one phrase, with or without -- inside the quotes: that gives 0 or only a few records. Short headings work as one phrase ("Confucius Cult"). Use LC's inverted form: "Temples, Confucian" works; "Confucian temples" gives 0. The split search is a little wide: it returns records that carry all the parts, not always inside one heading. At U-M, Humanities -- Electronic information resources gives 55 this way and 32 as one phrase (the website shows 34). So read the subjects of the records, and for a short heading also try it as one phrase without the dashes.Song, Yingxing, 1587-approximately 1666. Dian gong kai wu. Only the subdivisions $v $x $y $z are joined with --, e.g. Science -- China -- History.Retry-After). If a later page of search_all() still fails, it raises IncompleteResults; the records fetched so far are in its .records.references/api_reference.md.alma.main_pub_date<1900)python scripts/yale_api.py search --title 明史 --language chi --limit 5
python scripts/yale_api.py search --author "Spence, Jonathan D." --sort date_desc
python scripts/yale_api.py search --cql 'alma.title=明史 and alma.main_pub_date<1900' --sort date_asc
python scripts/yale_api.py search --call-number 'DS753*' --json
python scripts/yale_api.py record 99129140223408651
python scripts/yale_api.py record 99129140223408651 --raw # all MARC fields
from scripts.yale_api import YaleCatalogAPI
lib = YaleCatalogAPI()
result = lib.search(title="明史", language="chi", sort="date_asc",
cql="alma.main_pub_date>=1000", limit=10)
print(result["total"])
for rec in result["records"]:
print(rec["title"], rec["year"])
for h in rec["holdings"]["physical"]:
print(" ", h["library"], h["call_number"], h["availability"])
lib.search(oclc="424023") # exact identifier lookups
lib.search(isbn="9787101003277")
lib.search_all(subject="China History Ming dynasty", max_results=200)
lib.get_record("99129140223408651") # one record by MMS ID
Search fields: keyword, title, author, subject, isbn, issn, oclc, lccn, publisher, series, call_number, language (MARC code: chi, jpn, kor, eng), mms_id. Sort: date_desc, date_asc, title, author.
Each summary has mms_id, title, titles (romanized + vernacular), author, authors, contributors, edition, publication, year, language, physical_description, series, subjects, isbns, oclc, lccn, lc_call_number, classifications, subject_headings, holdings, and url (the public record page).
Cataloging fields (for comparing cataloging traditions): subject_headings lists each 6XX heading with its vocabulary (lcsh, csht = Taiwan's Chinese subject headings, fast, mesh, …), and classifications lists each class number with its scheme (lcc, ddc, ncsclt = 中文圖書分類法, the Chinese classification used in Taiwan, …). subjects stays a plain list of strings.
python scripts/lux_api.py search 明史 --scope work --limit 5
python scripts/lux_api.py search "Wen Zhengming" --scope agent --field name
python scripts/lux_api.py search --scope item --query '{"AND":[{"text":"Ming"},{"producedBy":{"name":"Wen Zhengming"}}]}'
python scripts/lux_api.py get https://lux.collections.yale.edu/data/person/7ffd4495-8917-4e92-b30d-fc3cd1d38c2b
from scripts.lux_api import LuxAPI
lux = LuxAPI()
res = lux.search("文徵明", scope="item", limit=5) # fetches each result
for r in res["results"]:
print(r["label"], r["classified_as"], r["links"])
Each LUX summary has id, type, label, names, identifiers, classified_as, languages, makers, dates, member_of, notes, equivalent (links to other databases), and links (e.g. the Yale catalog record).
language (chi, jpn, kor) when a title word is common.oclc or isbn. These are exact.url so they can see live status and request items in a browser.Retry-After. Do not page through thousands of records.references/api_reference.md — SRU parameters, CQL syntax, index list, MARC and AVA/AVE field guidescripts/yale_api.py — Alma SRU client and CLI (zero dependencies)tests/test_yale_api.py — offline tests (python -m unittest discover -s tests)scripts/lux_api.py — LUX client and CLI (zero dependencies)tests/test_lux_api.py — offline LUX testsReport a problem. This skill is part of the public repository kltng/humanities-skills. If it fails (an API changed, a script errors, or these instructions are wrong), report it as a GitHub issue:
gh issue list --repo kltng/humanities-skills --state all --search "yale-library-catalog"gh issue create --repo kltng/humanities-skills --label bug --title "[yale-library-catalog] <short summary>" --body "<details>". Without gh, give the user this link: https://github.com/kltng/humanities-skills/issues/new?template=skill-problem.ymlCredit the source. The records belong to Yale University Library; name the library as the source of catalog data you use. LUX ("LUX: Yale Collections Discovery", https://lux.collections.yale.edu) brings together Yale's libraries, museums and archives; credit the Yale unit that holds the item (it is named in the record) and check the rights statement before you reuse an image. The search interface (SRU) is a feature of Alma, the library system made by Ex Libris (part of Clarivate). Ex Libris says SRU is meant for looking up records (interlibrary loan, copy cataloging, selection), not for bulk export, so keep searches small.
Cite. If this skill helped work that is published, please cite it, together with the source credited above:
Tang, Kwok-leong. humanities-skills: yale-library-catalog (version ). GitHub, . https://github.com/kltng/humanities-skills
When you help a user write up results that relied on this skill, remind them once about this citation and the credit above.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/yale-library-catalog:yale-library-catalogfrom yale-library-catalog
npx claudepluginhub kltng/humanities-skills --plugin yale-library-catalogOther plugins' skills for the same job