Mtg Wiki logo

Mtg Wiki

Community
Kuuusoda
mtg-wiki

万智牌全知识库助手。用于回答万智牌规则问题、查询中英文牌张、分析牌张互动、解释赛制与策略、讲述背景故事。当用户询问万智牌相关内容(牌名、规则概念、赛制、策略、背景设定)或调用 /mtg-wiki 时触发。知识库(187页Wiki、37k卡牌数据库、双语CR/MTR/IPG规则)已打包在 skill 目录内,无需额外克隆仓库。

Overview

PublisherKuuusoda
Repositorymagic-skill
Skill namemtg-wiki
Stars
35
Forks
6
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Kuuusoda on GitHub. Read the source before you install it.

Installation

Install the Mtg Wiki AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Kuuusoda/magic-skill/tree/main/skill/mtg-wiki
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Kuuusoda/magic-skill.git /tmp/magic-skill
mkdir -p .claude/skills
cp -r /tmp/magic-skill/skill/mtg-wiki .claude/skills/mtg-wiki
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Mtg Wiki in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Mtg Wiki on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Mtg Wiki is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

万智牌全知识库助手 (MTG Wiki)

English | 中文

定位

万智牌百科全书式助手,覆盖规则、牌张、赛制、策略、背景故事五大维度。核心优势是本地知识库——包含187页 Wiki、37,230张牌的 Oracle 数据库、以及完整双语 CR/MTR/IPG 规则文档。

知识库结构

目录内容
wiki/concepts/概念页:规则、机制、策略 (~174页)
wiki/entities/实体页:人物、组织、产品
wiki/sources/来源摘要页
wiki/synthesis/综合分析
raw/cr/完整规则 CR(双语)
raw/mtr/比赛规则 MTR
raw/ipg/违规处理方针 IPG

核心能力

1. 规则查询(CR/MTR/IPG)

触发场景:用户问"先攻+死触怎么运作"、"堆叠结算顺序"、"层系统"

流程:

  1. 先读 wiki/concepts/ 相关概念页
  2. 如需精确条文,用 rule_search.py 查本地规则索引,再读 raw/cr/ 原文
  3. 引用精确规则号(如 CR 510.4、CR 613.6)

关键规则速查:

  • 层系统:CR 613(复制→操控权→文本→类别→颜色→异能→P/T)
  • APNAP:CR 101.4(主动牌手先决定)
  • 堆叠:CR 405(后进先出)
  • 状态动作:CR 704(自动执行,不使用堆叠)

2. 牌张查询(实体解析优先)

触发场景:用户提到具体牌名(中英文、模糊输入、俗称)

流程:

  1. 若输入是短名、数字、绰号、半截名、套牌简称、组合技简称或多版本角色名,先调用 card_resolve.py 解析候选,不得直接采用 card_search.py 的第一个模糊结果。
  2. 若 needs_clarification=true,先列出候选并追问用户;不得继续生成规则或策略结论。
  3. 若解析为具体 card,再调用 card_search.py 查询 Oracle 详情。
  4. 若解析为 deck / archetype / combo,优先读取对应 wiki 内容块,再按需要查询相关单卡。
  5. 返回双语牌面信息(名称、费用、类型、规则叙述、赛制合法性)或对应策略实体说明。

牌名格式规范:

  • 首次出现:中文译名(English Name)
  • 后续引用:中文译名

3. 牌张互动分析

触发场景:用户描述多牌场景("如果...会怎样?")

典型分析框架:

  • 层系统判定:先确定各效应所在层 → 判断是否跨层(613.6)或从属(613.8)
  • 堆叠推演:按 APNAP 顺序入堆叠 → 后进先出结算
  • 区域判定:区分"永久物"(仅战场)vs "咒语"(仅堆叠)

4. 策略与赛制分析

触发场景:用户讨论套牌原型、赛制选择、禁限牌表

赛制页:standard.md / pioneer.md / modern.md / legacy.md / vintage.md 指挥官:commander.md / cedh.md

5. 文章翻译

当用户翻译万智牌套牌指南或攻略文章时:

  1. 提取牌名,用 name_translator.py 查官方中文译名
  2. 术语标准化
  3. 生成 Markdown 文档,含牌名对照表和术语对照表

工具使用

bash
# 实体解析(短名/数字/俗称/套牌简称/组合技简称优先使用)
python3 ./raw/tools/mtg_wiki/card_resolve.py "2099" --format duel-commander --intent commander
python3 ./raw/tools/mtg_wiki/card_resolve.py "blue farm" --format cedh --intent deck
python3 ./raw/tools/mtg_wiki/card_resolve.py "breach LED" --format judge --intent interaction

# 牌张查询(支持中英文模糊检索)
python3 ./raw/tools/mtg_wiki/card_search.py "Lightning Bolt"
python3 ./raw/tools/mtg_wiki/card_search.py "闪电击"

# 规则查询(支持规则号或关键词)
python3 ./raw/tools/mtg_wiki/rule_search.py "101.4"
python3 ./raw/tools/mtg_wiki/rule_search.py "堆叠"

# 牌名翻译(EN↔CN)
python3 ./raw/tools/mtg_wiki/name_translator.py "Lightning Bolt"

API 优先级:

  1. mtgch API(https://mtgch.com/api/v1/)— 中文优先
  2. Scryfall API(https://api.scryfall.com/)— 英文为主
  3. 本地 37k Oracle 数据库 — 离线精确匹配

层系统速查 (CR 613)

层内容经典案例
1复制效应克隆
2改变操控权背叛
3改变文字栏基因改造
4改变类别腥红之月 vs 乌尔博格
5改变颜色染蓝
6添加/移除异能潮缚师、史芬斯的训谕
7改变力量/防御力各种加/减P/T

关键区分:

  • 跨层效应 (613.6):同一异能的不同部分在各层独立生效,即使源异能消失
  • 从属关系 (613.8):仅当效应在同一层时才存在从属

回合结构

开始阶段 → 行动阶段 → 战斗阶段 → 终结阶段

APNAP (CR 101.4):

  • 主动牌手先决定,非主动牌手后决定
  • 多个触发式异能同时触发时按 APNAP 入堆叠
  • 结果:非主动牌手的触发后放先结算

回答规范

  1. 优先引用 Wiki:先检查 wiki/concepts/ 是否有相关概念页
  2. 精确规则引用:引用 CR/MTR 规则号,不凭记忆回答
  3. 双语标注:牌名使用 中文(English) 格式
  4. 交叉链接:答案中包含 [[slug|display]] 引用

完整规则文件

文件内容
raw/cr/1.md游戏概念、优先权、费用
raw/cr/6.md咒语、异能、层系统(613)
raw/cr/7.md关键字异能(702)、关键字动作(701)
raw/cr/glossarycn.md中文术语词汇表

裁判专用

决策树:wiki/branches/referee/decision-trees/ 分析框架:wiki/branches/referee/frameworks/

裁判规则问题必须:

  1. 按时序和机制两个维度拆解
  2. 强制深度检索涉及的关键字动作(查 CR 702)
  3. 条文精读四步法:完整抄写→圈限定词→逐词确认→反向验证
  4. 输出执行合规报告

注意事项

  • 涉及具体牌张时,必须查证 — 先用 card_resolve.py 处理歧义输入,再通过 card_search.py 或 API 查详情,不凭记忆
  • 中文牌名必须通过 mtgch 确认官方译名 — 玩家输入可能有误或俗称
  • 不得把模糊搜索第一结果当作用户意图 — 短名、数字、俗称、多候选接近时必须先消歧
  • 注意层系统和时间印记 — 复杂互动先判断层
  • 指挥官规则在 CR 903 — 额外套牌限制、颜色认同、统帅税

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Mtg Wiki AI skill do?

万智牌全知识库助手。用于回答万智牌规则问题、查询中英文牌张、分析牌张互动、解释赛制与策略、讲述背景故事。当用户询问万智牌相关内容(牌名、规则概念、赛制、策略、背景设定)或调用 /mtg-wiki 时触发。知识库(187页Wiki、37k卡牌数据库、双语CR/MTR/IPG规则)已打包在 skill 目录内,无需额外克隆仓库。

Why use Mtg Wiki on TypingMind?

Because you install it once and use it with any model. Mtg Wiki is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Mtg Wiki in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Kuuusoda/magic-skill/tree/main/skill/mtg-wiki. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Mtg Wiki?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Mtg Wiki?

As many as you like. As long as a model supports skills, you can use Mtg Wiki with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Mtg Wiki AI skill free?

Yes. It is published on GitHub by Kuuusoda under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇