scryfall-card

v1.0.0

Search and retrieve Magic: The Gathering card data using the Scryfall API. Use this skill when the user asks about MTG cards, wants to search for cards by name, type, color, mana cost, oracle text, set, or any other card attribute. Also use for getting card images, prices, rulings, legality information, or random cards. Triggers include mentions of MTG, Magic, Magic: The Gathering, card names, deck building questions, or requests for card information.

1· 1.4k·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (Scryfall MTG card search) match the code and SKILL.md. The script and docs only reference the Scryfall API and card-search functionality; nothing requested or installed is unrelated to that purpose.
Instruction Scope
SKILL.md instructs direct API calls to https://api.scryfall.com with specific headers and rate limiting and points to the included CLI script. Instructions do not ask the agent to read arbitrary filesystem paths, environment variables, or send data to third-party endpoints outside Scryfall.
Install Mechanism
No install spec or external downloads are present. The skill is essentially documentation plus a small Python CLI that uses standard library modules; there are no archives or remote installers referenced.
Credentials
The skill declares no required environment variables or credentials and the code does not read any sensitive env vars. This is proportionate for a public-API read-only integration.
Persistence & Privilege
always: false (default) and the skill does not request persistent system-wide configuration or modify other skills. The default ability for the agent to invoke the skill autonomously is standard and appropriate here.
Assessment
This skill appears safe and does exactly what it claims: query Scryfall for card data and format results. Before installing, note that it requires outbound network access to api.scryfall.com and will expose card image URLs (which are external links hosted by Scryfall). There are no credentials requested. If you want extra assurance, inspect the full script shipped with the skill (the listing provided was truncated in the prompt) to confirm there are no hidden endpoints or additional behavior. Also respect Scryfall's rate limits when using the skill repeatedly.

Like a lobster shell, security has layers — review code before you run it.

latestvk976tepj6qa9y0x3v1mmchgnj180jyjh

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Scryfall MTG Card Search

Search for Magic: The Gathering cards using the Scryfall API.

API Overview

Base URL: https://api.scryfall.com

Required Headers:

headers = {
    "User-Agent": "OpenClawMTGSkill/1.0",
    "Accept": "application/json"
}

Rate Limiting: Insert 50-100ms delay between requests (max 10 req/sec).

Core Endpoints

Search Cards

GET /cards/search?q={query}

Parameters:

  • q (required): Fulltext search query
  • unique: cards|art|prints (default: cards)
  • order: name|set|released|rarity|color|usd|tix|eur|cmc|power|toughness|edhrec|penny|artist|review
  • dir: auto|asc|desc
  • page: Page number for pagination

Named Card Lookup

GET /cards/named?exact={name}
GET /cards/named?fuzzy={name}

Use fuzzy for partial matches (e.g., "jac bele" → "Jace Beleren"). Add &set={code} to limit to specific set.

Random Card

GET /cards/random
GET /cards/random?q={query}

Card by ID

GET /cards/{id}
GET /cards/{set_code}/{collector_number}

Autocomplete

GET /cards/autocomplete?q={partial_name}

Returns up to 20 card name suggestions.

Search Syntax Reference

See references/search_syntax.md for the complete search syntax guide.

Quick examples:

  • c:red pow=3 - Red cards with power 3
  • t:merfolk t:legend - Legendary merfolk
  • o:"draw a card" - Cards with "draw a card" in text
  • cmc=3 r:rare - 3-mana rares
  • e:dom - Cards from Dominaria
  • f:standard - Standard legal cards
  • usd<1 - Cards under $1

Implementation

Use the provided script for common operations:

python3 scripts/scryfall_search.py search "lightning bolt"
python3 scripts/scryfall_search.py named --exact "Black Lotus"
python3 scripts/scryfall_search.py random
python3 scripts/scryfall_search.py random --query "t:dragon"

Or make direct API calls with proper headers and rate limiting.

Card Object Key Fields

When displaying card info, prioritize these fields:

  • name, mana_cost, type_line
  • oracle_text, power, toughness
  • image_uris.normal (for card image)
  • prices.usd, prices.usd_foil
  • legalities (format legality)
  • set_name, rarity

For double-faced cards, check card_faces array.

Error Handling

  • 404: Card not found
  • 422: Invalid search query
  • 429: Rate limited (wait and retry)

Always validate responses have object field; if object: "error", check details for message.

Files

3 total
Select a file
Select a file to preview.

Comments

Loading comments…