返回顶部
s

scryfall-mtg万智牌搜索

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.3
安全检测
已通过
1,952
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

scryfall-mtg

Scryfall MTG卡牌搜索

使用Scryfall API搜索《万智牌》卡牌。

API概述

基础URL:https://api.scryfall.com

必需请求头:
python
headers = {
User-Agent: OpenClawMTGSkill/1.0,
Accept: application/json
}

速率限制: 请求间插入50-100毫秒延迟(最大每秒10次请求)。

核心端点

搜索卡牌

GET /cards/search?q={查询词}

参数:

  • - q(必需):全文搜索查询
  • unique:cards|art|prints(默认:cards)
  • order:name|set|released|rarity|color|usd|tix|eur|cmc|power|toughness|edhrec|penny|artist|review
  • dir:auto|asc|desc
  • page:分页页码

按名称查找卡牌

GET /cards/named?exact={名称}
GET /cards/named?fuzzy={名称}

使用fuzzy进行部分匹配(例如,jac bele → Jace Beleren)。
添加&set={代码}限制到特定系列。

随机卡牌

GET /cards/random
GET /cards/random?q={查询词}

按ID查找卡牌

GET /cards/{id}
GET /cards/{系列代码}/{收藏编号}

自动补全

GET /cards/autocomplete?q={部分名称}

返回最多20个卡牌名称建议。

搜索语法参考

完整搜索语法指南请参见references/search_syntax.md。

快速示例:

  • - c:red pow=3 - 红色且力量为3的卡牌
  • t:merfolk t:legend - 传奇人鱼
  • o:draw a card - 文本中包含draw a card的卡牌
  • cmc=3 r:rare - 3费稀有卡牌
  • e:dom - 来自多明纳里亚的卡牌
  • f:standard - 标准赛制合法卡牌
  • usd<1 - 价格低于1美元的卡牌

实现方式

使用提供的脚本进行常见操作:

bash
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

或使用正确的请求头和速率限制直接调用API。

卡牌对象关键字段

显示卡牌信息时,优先使用以下字段:

  • - name、manacost、typeline
  • oracletext、power、toughness
  • imageuris.normal(卡牌图片)
  • prices.usd、prices.usdfoil
  • legalities(赛制合法性)
  • setname、rarity

对于双面卡牌,请检查card_faces数组。

错误处理

  • - 404:未找到卡牌
  • 422:无效搜索查询
  • 429:触发速率限制(等待后重试)

始终验证响应是否包含object字段;如果object: error,请检查details获取错误信息。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 mtg-edh-deckbuilder-1776363593 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 mtg-edh-deckbuilder-1776363593 技能

通过命令行安装

skillhub install mtg-edh-deckbuilder-1776363593

下载

⬇ 下载 scryfall-mtg v1.0.3(免费)

文件大小: 7.21 KB | 发布时间: 2026-4-17 16:27

v1.0.3 最新 2026-4-17 16:27
Version 1.0.3 (Skill renamed and focused on Scryfall API)

- Skill renamed to "scryfall-mtg" and now focuses exclusively on MTG card search via the Scryfall API.
- Added detailed API usage and search syntax references.
- Old features and files related to deck building, banlists, LigaMagic, and metagame data have been removed.
- Partial migration of search and utility scripts to the new `scripts/` and `references/` directories.
- SKILL.md rewritten and streamlined for Scryfall API integration.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部