# Card Game

Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn...

- Repository: https://github.com/gamedev-skills/awesome-gamedev-agent-skills (6445 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-28
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -g -a claude-code -y`
Codex: `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -g -a codex -y`
Cursor: `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -g -a cursor -y`
Gemini CLI: `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add gamedev-skills/awesome-gamedev-agent-skills`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Card Game

A playbook for card games, card data, the deck/hand/discard zones, the turn structure, and
how card effects resolve. This is a **compositional** skill: it models cards as data and wires
them to UI. It does not re-teach data assets or UI nodes; it defines the zone model, the draw
machinery, and the effect-resolution rules that keep a card game correct and bug-free.

## When to use

- Use when building any game where the core objects are **cards** moving between zones
  (deck → hand → play → discard): deckbuilder, TCG/CCG, solitaire, roguelike deckbuilder.
- Use when designing draw/shuffle/reshuffle, turn structure, card costs, or how effects resolve.

**When *not* to use:** board/tile state with matching rules → `puzzle`. RPG with an
incidental card battler → start from `rpg`. For defining cards as assets, use `godot-resources`
/ `unity-scriptableobjects`; for the hand/drag UI, use `godot-ui-control`.

## Core loop

**Draw to your hand → spend resources to play cards → effects resolve and change the board →
end the turn (cleanup/discard) → opponent/next phase → repeat until a win condition.** Depth
comes from the *combinations* a hand allows; the engine's job is to resolve them unambiguously.

## Must-have systems

1. **Card data**, id, name, cost, type, text, and an effect spec (data, not code).
2. **Zones**, deck (draw pile), hand, play/board, discard, exile/removed; cards live in exactly one.
3. **Draw + shuffle + reshuffle**, draw from deck to hand; reshuffle discard into deck when empty.
4. **Turn structure**, phases (untap/draw/main/combat/end) as a state machine.
5. **Resource system**, mana/energy/actions that gate how much you do per turn.
6. **Effect resolution**, apply a card's effects in a defined order; handle targets and triggers.
7. **Win/loss condition**, life total, deck-out, objective.
8. **UI**, hand layout, drag/drop or tap-to-play, zone counts, targeting affordances.

## Design knobs

The rest: https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/HEAD/skills/genres/card-game/SKILL.md
