From mtg-skills
Build or refresh the local Scryfall card database (.mtg/database/cards.sqlite) that the MTG deckbuilding skills read from instead of calling the Scryfall API. Use this skill when the user wants to set up, build, refresh, or update their local MTG card data, when card prices or sets seem out of date, or as the one-time setup step before building or upgrading Commander/EDH or MTG Arena Standard decks. The deck skills also invoke this automatically when the database is missing or stale. It downloads Scryfall's "Default Cards" bulk file, collapses it to one row per unique card (cheapest EUR/USD price, Arena availability, rarity, legalities, Game Changer flag, EDHREC rank), and stores it as SQLite for fast, mostly-offline querying — sharply cutting Scryfall API calls and rate-limiting.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mtg-skills:mtg-scryfall-databaseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill creates and maintains the **local card database** the other MTG skills depend on.
This skill creates and maintains the local card database the other MTG skills depend on.
Instead of every deck build hammering api.scryfall.com, the skills query a local SQLite file
built once from Scryfall's downloadable bulk data. This is faster, works mostly offline, and
keeps us well under Scryfall's rate limits.
This is the foundation the deckbuilding skills build on. A Commander or Arena build needs card data before it can do anything, so the database must exist first. In practice you rarely run this skill by hand — the deck skills auto-build the database on demand when it's missing (see below). Run this skill directly when you want to set it up ahead of time, force a refresh, or check how current the data is.
.mtg/database/cards.sqlite — one row per unique card (oracle_id), carrying oracle text,
type, mana value, color identity/colors, power/toughness, rarity, keywords, legalities, the
Game Changer flag, EDHREC rank, Arena/paper/MTGO availability, and the cheapest
EUR/USD price across all printings (Cardmarket via Scryfall for EUR)..mtg/database/meta.json — records the source bulk version and build date (used for the
staleness check).Source: Scryfall's Default Cards bulk file (the only bulk export carrying per-printing prices and Arena availability). It's a ~540 MB download that builds into a ~170 MB SQLite file in roughly half a minute. The raw JSON is discarded after the build; only the SQLite + meta remain.
The work is done by scripts/build_database.py, a thin wrapper over the shared mtg_scryfall
library in mtg-skills/lib/ (which the deckbuilding skills also use). Requires code execution with
network access to api.scryfall.com.
python "${CLAUDE_SKILL_DIR}/scripts/build_database.py" # build if missing; otherwise print status
python "${CLAUDE_SKILL_DIR}/scripts/build_database.py" --status # status + whether Scryfall has newer data
python "${CLAUDE_SKILL_DIR}/scripts/build_database.py" --refresh # force a rebuild from the latest bulk file
python "${CLAUDE_SKILL_DIR}/scripts/build_database.py" --path P # use an explicit database location (see no-FS case)
python "${CLAUDE_SKILL_DIR}/scripts/build_database.py" --json # machine-readable output
Each deckbuilding skill checks the database at the start of a build and behaves as follows:
The 30-day window is the default staleness threshold. For the Arena skills (which use only rarity, Arena availability, and Standard legality — none of which move between set releases) staleness matters little; for Commander, prices drift, so a refresh is worth offering past the window.
Two cases, handled differently:
.mtg/database/ should live, then build there by passing
--path <their-path>/.mtg/database/cards.sqlite. Use that location for the rest of the session.Always store the database whenever storage is possible — that's the whole point (reduce Scryfall API load and avoid rate-limiting us). Case 2 is the unavoidable exception, not a reason to skip it.
The local database serves everything the bulk data contains. The deliberate exception is
function: / otag: (Scryfall Tagger) tags — curated tags like function:ramp,
function:removal, function:card-advantage — which exist in no bulk file. Any query using those,
or any operator the local engine can't translate, is routed whole to the live Scryfall API by
the shared library, so results are never silently wrong. This is by design (see
docs/adr/0001 in the repo): it removes the overwhelming majority of API calls (every card lookup,
price, identity/type/cost filter) while keeping the genuinely-unavailable Tagger queries accurate.
npx claudepluginhub guuse/claude-mtg-skills --plugin mtg-skillsSearches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.