Card Game
/card-game
Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.
- 许可证
- Apache-2.0
- 出品
- GameSkill 出品
所属合集
Awesome Gamedev Agent Skills
77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.
我们测过
在 Godot 4.7.2 上通过 30/30 项检查(2026-10-30):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告这个 skill 做什么
什么时候触发
Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution. Use for a deckbuilder, TCG/CCG, or roguelike deckbuilder.
GameSkill 测过的版本
GameSkill 调优版:skill 文件取自提交 19d93f97c9c1,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。
协议:基于 gamedev-skills/awesome-gamedev-agent-skills(作者 gamedev-skills),协议 Apache-2.0。ZIP 保留协议文件(LICENSE, NOTICE),CHANGES.md 列出了 GameSkill 加的所有文件。

自检清单
- 卡牌效果写成数据,不写成每张卡一段代码 / Card effects are data, not one code path per card
- 每张卡同一时间只在一个区域,移动就是从这里删、往那里加 / A card lives in exactly one zone; moving is remove-here, add-there
- 牌库空时把弃牌堆洗回再抽 / An empty deck reshuffles the discard pile before drawing
- 洗牌用自己的种子随机数,存档时一起存 / Shuffles use the run's own seeded RNG, saved with the run
- 费用不够的牌不能打出,效果按固定顺序结算 / Unaffordable cards cannot be played; effects resolve in a fixed order
中文指南
这个 skill 做什么
卡牌游戏的规则骨架:卡牌数据(费用、类型、效果都写成数据)、牌库、手牌、弃牌堆、消耗区等区域(每张卡同一时间只在一个区域)、洗牌和抽牌(牌库空了把弃牌洗回去)、回合结构、费用检查和按顺序结算的效果队列。适合构筑类、集换式卡牌和 roguelike 构筑。
什么时候用
- 做构筑类卡牌战斗
- 设计抽牌、弃牌、洗回的规则
- 让卡牌效果按固定顺序结算
怎么装
下载本页的 ZIP,把 card-game/ 整个文件夹放进 agent 的 skills 文件夹:Claude Code 用 .claude/skills/,Codex、Gemini CLI、OpenCode 用 .agents/skills/,Cursor 用 .cursor/skills/,Copilot 用 .github/skills/,Windsurf 用 .windsurf/skills/,然后重启 agent。也可以直接对 agent 说:Install the skill from https://gameskill.dev/skills/card-game/install.md
最小示例
gameskill/examples/ 是一个 Godot 4.7 工程:cards.gd 是卡牌数据和效果操作,battle.gd 管区域、种子洗牌、回合和效果队列,main.gd 画出手牌和各区域张数。卡牌名都是我们自己编的。
我们怎么测的
总分 30/30。在 Godot 4.7.2 无头模式下跑检查:抽牌、弃牌、洗回前后卡牌总数守恒;同一张卡不会同时出现在两个区域;同一个种子洗出同样的顺序;费用不够时不能出牌;效果按队列顺序结算。审查时我们发现初稿里同名卡共用一份数据(改一张会影响所有副本),已改成每张卡一个独立实例并加了检查。结果在 gameskill/test-report.json。
搭配
ccgs-balance-check:检查卡牌数值平衡game-ui-ux:手牌和目标选择的界面save-systems:保存一局的牌组
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/card-game/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/card-game.zip -o /tmp/gameskill-card-game.zip
unzip -oq /tmp/gameskill-card-game.zip -d .claude/skills
rm /tmp/gameskill-card-game.zip包含内容
- Worked steps: Zones + draw with automatic reshuffle; Card as data + effect resolution; Turn structure as a phase machine
- A pitfalls section with the mistakes to avoid
- Bundled 1 reference doc the agent reads when needed
适合
- A deckbuilder, TCG/CCG, or roguelike deckbuilder
试试这条提示词
Build a roguelike deckbuilder: deck, hand and discard piles, energy costs and card effects.关于这个 Skill
Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution. Use for a deckbuilder, TCG/CCG, or roguelike deckbuilder.
From the card-game SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.
What's inside
- Core loop
- Must-have systems
- Design knobs
- Zones + draw with automatic reshuffle
- Card as data + effect resolution
- Turn structure as a phase machine
- Composition (build it from these skills)
常见问题
抽卡 Gacha Kit
单抽、十连演出:SSR 蓄力后金光爆发,飞到中央变成跟着鼠标或手机陀螺仪倾斜的全息卡。按稀有度分级演出,可跳过,内置中英文案。
- SSR/UR 蓄力与金光爆发
- 跟手/陀螺仪的全息箔
基于 gamedev-skills/awesome-gamedev-agent-skills (作者 gamedev-skills,协议 Apache-2.0)。ZIP 里保留原作者的 LICENSE 和 NOTICE,ATTRIBUTION.md 和 CHANGES.md 写明来源提交和 GameSkill 加的内容。
Awesome Gamedev Agent Skills 中的更多 Skills
查看全部 48 个2D Platformer
Build a 2D platformer: run/jump control with coyote time, jump buffering, and variable jump height, plus tiled levels and hazards.
Behavior Trees & Utility AI
Build a behavior-tree runtime and a Utility AI system with response curves, plus hybrid agents where the behavior tree drives utility scoring.
Bevy ECS
Structure a Bevy app around ECS: plugins, components and resources, systems with Query and Commands, system ordering and Time.
Create Game Assets
Plan, generate, source, normalize, and validate cohesive visual game assets.
相似 skills
Novel to Game
Agent skills for source-grounded adaptation of novels into games: cited design docs, target-runtime builds and evidence-based QA.
Novel to Game: Art Direction
Direct game art and creative vision.
Novel to Game: Book Analysis
Deconstruct a novel for game adaptation.
Novel to Game: Concept
Design game concepts from a novel.