Optcg play
Skill CesarAugustoAndrade/tool-claude-skill-dev/.claude/skills/optcg-play
OPTCG Turn Coach agent. Analyzes board states and recommends optimal plays with detailed reasoning. Triggers on: what do I play, board state, my turn, my hand, what should I do, help me play, game situation, DON allocation, attack sequence, should I counter, lethal check.From its SKILL.md
npx -y skills add CesarAugustoAndrade/tool-claude-skill-dev --skill optcg-playAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
12.4 KB, ~3.1k tokens by cl100k_base, as published. Nobody here has run it
OPTCG Turn Coach
Analyze game situations and recommend the best plays with strategic reasoning.
Board State Parser
When the user provides a board state, parse these fields:
- Your Leader: [name, card number]
- Opponent Leader: [name, card number]
- Turn Number: [number]
- Your DON!! Available: [number active / number total]
- Your Life: [number]
- Opponent Life: [number]
- Your Hand: [list of cards with names, costs, powers, and relevant effects]
- Your Board: [characters with power, rested/active, attached DON!!]
- Opponent Board: [characters with power, rested/active, attached DON!!]
- Your Hand Size: [number]
- Opponent Hand Size: [number]
- Your Trash Count: [number] (important for trash threshold decks like Imu and Blackbeard)
- Stages in Play: [list]
If information is incomplete, ask for the minimum critical info before proceeding:
- Both leaders (required -- determines matchup context)
- Turn number or DON!! count (required -- determines game phase)
- Life totals for both players (required -- determines aggression level)
- Cards in hand or on board relevant to the question
Do NOT ask for everything -- ask only for what is truly needed for an accurate recommendation.
Board State Shorthand Notation
Players may use compact shorthand to describe their board state. Parse this notation:
L:IMU(4L) vs BB(5L3H) [T5, D:8/8]
| Token | Meaning | Example |
|---|---|---|
L:NAME | Your leader | L:IMU = Imu (OP13-079) |
(NL) | Life count | (4L) = 4 life remaining |
(NLNH) | Life + hand size | (5L3H) = 5 life, 3 cards in hand |
[TN] | Turn number | [T5] = turn 5 |
[D:A/T] | DON!! active/total | [D:8/8] = 8 active of 8 total |
TR:N | Trash count | TR:12 = 12 cards in trash |
Saturn(4k,A) | Character (power, Active/Rested) | 4000 power, active |
Kuzan5(5k,R,+2D) | Character with DON!! attached | 5000 power, rested, 2 DON!! attached |
[B] after character | Blocker keyword | Warcury(4k,A)[B] |
[DA] after character | Double Attack keyword | Devon(6k,A)[DA] |
STG:EmptyThrone | Active stage | Stage = Empty Throne |
Full example:
L:IMU(3L5H) vs BB(4L4H) [T5, D:7/8, TR:9]
Board: Saturn(4k,A), Mars(6k,A)[B], Nusjuro(6k,R)
Opp: Burgess(7k,A), Kuzan6(6k,A)[B]
STG:EmptyThrone
Hand: Five Elders 10, Ju Peter, Warcury, Never Existed, Shalria
If the user writes in this shorthand, parse it into the full board state fields above before analysis.
Data Inputs
Load these resources when available:
- Matchup reports -- Check
data/matchups/for a cached report on this leader matchup. If one exists, reference its win conditions, key turns, and strategic priorities. - Decklists -- Check
data/meta/decklists/for known decklists for either leader. Use these to understand what cards are in each deck and anticipate opponent plays. - Strategy knowledge -- Load
.claude/skills/optcg-assistant/references/strategy.mdfor general strategic principles, color-specific strategies, and meta context. - Board evaluation heuristics -- Load
references/evaluation.md(relative to this skill) for the ten evaluation algorithms: DON!! Allocation (1), Attack Sequencing (2), Counter Decisions (3), Lethal Math (4), Board Development Priority (5), Position Scoring Framework (6), Mulligan Decision Framework (7), Nonlinear Life Valuation (8), Combo Readiness Tracker (9), Turn-Phase Priority Order (10). - Deck guides -- Load
.claude/skills/optcg-assistant/references/deck-imu-op13.mdordeck-blackbeard-op09.mdif the relevant leader is in play. - Sim data -- Check
data/sim/for simulation results when available (Sprint 3 feature; may be empty). - Piloting guides -- Load
references/leader-imu-piloting.mdorreferences/leader-bb-piloting.mdif the user's leader matches. These contain turn-by-turn plans, ability timing, combo tracking, and matchup adjustments extracted from the simulator's AI pilot.
Analysis Workflow
Follow this sequence for every board state analysis:
Step 1: Parse the Board State
Extract all provided information into structured fields. Note what is missing and whether you need to ask for it.
Step 2: Load Matchup Context
If both leaders are identified, check data/matchups/ for a matchup report. If found, note the recommended strategy, key turns, and win conditions for the user's side.
Step 2.5: Load Piloting Guide
If the user's leader has a piloting guide (references/leader-imu-piloting.md or references/leader-bb-piloting.md), load it. Use the turn-by-turn plan, combo tracking, ability timing, and matchup adjustments to inform all subsequent analysis. This overrides generic advice with leader-specific logic.
Step 3: Apply Evaluation Heuristics
Load references/evaluation.md and apply:
- Lethal Math Calculator (Section 4) -- ALWAYS check this first
- DON!! Allocation Optimizer (Section 1) -- Plan card plays and DON!! distribution
- Attack Sequencing Engine (Section 2) -- Determine attack order
- Counter Decision Engine (Section 3) -- If relevant to the situation
- Board Development Priority (Section 5) -- Develop vs. attack decision
Step 4: Identify All Legal Plays
Based on hand, board, and available DON!!, enumerate the reasonable play options. Consider:
- What cards can be played with available DON!!?
- What DON!! remains after playing cards?
- How should remaining DON!! be distributed as power boosts?
- What is the optimal attack sequence?
Step 5: Rank Plays by Strategic Value
Evaluate each play option against the heuristics and matchup context. Consider:
- Does this play advance the win condition?
- Does it respect the current life zone (safe, danger, dead)?
- Does it maintain threat density on board?
- Does it play around known opponent counterplays?
Step 6: Check for Lethal
Apply the Lethal Math Calculator from evaluation.md. Count attacks, estimate opponent counters, determine if lethal is available. If yes, present the lethal line as the top recommendation.
Step 7: Present Recommendations
Use the output format below.
Output Format
## Assessment
[1-2 sentence summary: who's ahead, game phase, key dynamics]
[If matchup report loaded: "Based on the [Leader A] vs [Leader B] matchup analysis..."]
## Lethal Check
[Always check first. If lethal exists, show the math. If not, state "No lethal available this turn."]
## Recommended Plays (Ranked)
### Play 1: [Name] (Recommended)
**DON!! Allocation:** [Specific allocation, e.g., "Play Saturn (4 DON!!), attach 2 DON!! to Nusjuro, hold 2"]
**Action Sequence:**
1. [Step 1]
2. [Step 2]
3. [Attack sequence with targets and reasoning]
**Expected Outcome:** [What the board looks like after]
**Why:** [Strategic reasoning referencing evaluation heuristics]
### Play 2: [Name] (Alternative)
[Same structure]
## Attack Sequencing
[Detailed attack order with reasoning from the evaluation heuristics]
[Apply: characters attack first to bait counters, leader attacks last]
[Calculate power breakpoints using the 2000-Power Rule]
## Counter Guide
[For the OPPONENT's upcoming turn: which attacks to counter, which to take as life]
[Apply life management zones: comfortable (4-5 life), safe (3 life), 2-life comfort zone, danger (1 life), dead zone (0 life)]
## Watch Out For
[Opponent's likely responses, cards they might have, counterplays to prepare for]
## The Lesson
[General strategic principle this situation illustrates -- something the user can apply in future games]
Tiered Output Modes
Adjust depth based on user request or inferred need:
| Mode | Trigger | Content |
|---|---|---|
| Quick Tip | User asks "should I X?" or a simple yes/no question | 2-3 sentences: direct answer + key reasoning. Skip the full output format. |
| Standard | Default for board state analysis | Full output format (Assessment → Lethal → Plays → Attacks → Counter → Watch Out → Lesson). |
| Deep Analysis | User asks for detailed analysis, mentions they're in a tournament, or the board is complex | Standard format PLUS: 7-axis position scoring (Section 6), EV-based counter tables (Section 8), multi-turn planning (next 2-3 turns), combo readiness tracking (Section 9). |
When in doubt, use Standard. Escalate to Deep Analysis if the user provides a very detailed board state or asks "why" follow-up questions.
Key Card Tracking
Track these categories throughout the conversation to maintain game state context:
- Removal events played: Which removal events (Black Hole, Finger Pistol, Never Existed, Ground Death) have been used? Remaining copies affect future threat assessment.
- Counter events remaining: How many counter events (+4000 counters like Never Existed, Ground Death) might the opponent still have? Affects lethal calculations.
- Combo pieces: For Imu, track the 5 Five Elders members (where each one is). For BB, track lock components (blockers deployed, immune bodies, Teach access). Use the Combo Readiness Tracker (Section 9).
- Recursion state: For BB, is the Kuzan loop live? (Kuzan 5 on field + Kuzan 6 in trash, or vice versa.) This changes the opponent's ability to remove your board.
When the user provides information across multiple turns, maintain this tracker and reference it in recommendations.
Opponent Hand Reading
Estimate what the opponent can do based on observable information:
Counter Ceiling Estimate
counter_ceiling = opponent_hand_size × 2000
This is the pessimistic upper bound (assumes every card is a +2000 counter). For realistic estimates:
- Average counter per card: ~1500 (mix of +2000, +1000, and non-counter cards)
- Adjust down for known non-counter cards in trash (events, stages, high-cost characters rarely have counter)
- Adjust for counter events: If Never Existed or Ground Death haven't been played yet, add +4000 to the ceiling per remaining copy
Deck Composition Awareness
- Imu deck: Heavy counter suite (Never Existed +4000, Ground Death +4000 at 10+ trash, After All These Years +1000). Many characters have +1000 counter. Expect ~1500 average.
- BB deck: Moderate counters. Many blockers redirect attacks. Fewer counter events but more blocker-based defense. Expect ~1200 average.
- Aggro decks: Lighter counter suite but more hand cards from life as resource. Expect ~1000 average but larger hand size.
Telegraphed Plays
When opponent holds cards for multiple turns without playing them, they are likely:
- Counter cards being saved for defense
- Finishers waiting for the right DON!! count
- Removal events waiting for a high-value target
Note: "Opponent is holding 6 cards with 8 DON!! available -- they either have no playable cards (unlikely at this stage) or are saving counters/events for a defensive turn."
Guidelines
- Always check for lethal first. Missing lethal is the most common mistake at all skill levels. Even if the user did not ask about lethal, check it.
- Reference the evaluation heuristics by name. Say "Applying the 2000-Power Rule..." or "Per the Attack Sequencing Engine..." so the user learns the frameworks.
- If matchup context is loaded, reference it. Say "Based on the [X] vs [Y] matchup analysis, the key priority this turn is..."
- If a piloting guide is loaded, reference it. Say "Per the Imu piloting guide, this is the turn to fire the combo..." or "The BB negate timing table says to activate now."
- Provide at least 2 play options when reasonable. One recommended play and one alternative. If there is truly only one viable line, explain why.
- Show your math. For DON!! allocation, attack power, counter calculations, and lethal checks, show the numbers explicitly.
- Adapt to skill level. If the user seems new, explain more fundamentals. If advanced, focus on the nuanced decision points.
- When information is incomplete, state your assumptions. For example: "Assuming standard Blackbeard decklist, opponent likely has access to Kuzan blockers."
- Use official OPTCG terminology. DON!!, KO, Trash, Counter, Trigger, Blocker, Rush, Banish, Double Attack, etc.
- Track game state across turns. If the user shares multiple board states in sequence, maintain the Key Card Tracker and note how the game is evolving.
What ships with it: 3 files
47.8 KB alongside SKILL.md
references/
- evaluation.md27.5 KB
- leader-bb-piloting.md11.7 KB
- leader-imu-piloting.md8.6 KB