Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

cube-builder

БесплатноБез исполняемых скриптовНе проверен

This skill should be used when building cube draft configurations for GEMP-SWCCG from CSV files containing card names. It handles mapping card names to IDs…

PlayersCommitteeот PlayersCommittee★ 35 звёзд на GitHub21 установка в других каталогах

Об этом скилле

Cube Builder

Overview

Build cube draft configurations for GEMP-SWCCG by mapping CSV files of card names to card IDs and generating properly structured cube configuration JSON files. This skill covers the complete workflow from CSV preparation through deployment, including the critical playtesting card exclusion requirement and add-on card pack structure.

When to Use This Skill

Use this skill when:

  • Creating a new cube draft configuration from card lists
  • Updating an existing cube with new cards
  • Troubleshooting cube draft issues (missing cards, playtesting cards appearing, etc.)
  • Understanding how multi-column CSVs create add-on card packs

Workflow

CRITICAL REQUIREMENT: Unless explicitly told otherwise, you MUST use side-specific databases with defensive shields filtered out when mapping light/dark side cards. This prevents:

  1. Defensive shield versions being mapped instead of effect versions (e.g., "Battle Plan" as shield vs effect)
  2. Wrong-side cards appearing in drafts (e.g., DARK "Control" in LIGHT side packs)
  3. Slug collision errors

See Step 3 for detailed instructions on creating filtered databases.

Step 1: Prepare CSV Files

Create three CSV files in the cube source directory:

  1. default_cards.csv - Single column of card names (core cards all players start with)
  2. cube_worlds_lightside.csv - Light side packs (supports multi-column for add-ons)
  3. cube_worlds_darkside.csv - Dark side packs (supports multi-column for add-ons)

CSV Column Structure:

  • Single column → Produces flat array: ["card1_id", "card2_id"]
  • Multiple columns → Produces array of arrays: [["primary_id", "addon1_id"], ["card2_id"]]
    • Column 1 = primary card in the pack
    • Columns 2+ = add-on cards that come with the primary card
    • When a player picks a pack, they receive ALL cards in that array
    • Empty cells are skipped

Example multi-column CSV:

Admiral Ackbar,Home One
Obi-Wan Kenobi,Kenobi's Lightsaber
Luke Skywalker,,

Produces:

[
  ["admiral_ackbar_id", "home_one_id"],
  ["obi_wan_id", "lightsaber_id"],
  ["luke_id"]
]

Directory Structure:

src/gemp-swccg-server/src/main/resources/draft/cube_building/
└── <cube_name>/
    ├── default_cards.csv
    ├── cube_worlds_lightside.csv
    └── cube_worlds_darkside.csv

Step 2: Update Card Database (Critical)

The card mapping process requires an up-to-date card database that EXCLUDES playtesting cards (set 501).

./bin/gemp export-cards src/gemp-swccg-cards/src/main/resources/card_blueprint_database.json

Why this matters: The CardDataExporter automatically excludes set501 cards via a filter. If this step is skipped or uses old data, playtesting cards will appear in the cube.

Verification:

grep -c '"cardId": "501_' src/gemp-swccg-cards/src/main/resources/card_blueprint_database.json
# Must output: 0

Step 3: Create Side-Specific Databases (CRITICAL)

IMPORTANT: Unless explicitly told otherwise, you MUST filter out defensive shields from the side-specific databases to prevent slug collisions. Cards like "Battle Plan" exist as both Effect and Defensive Shield with the same slug - without filtering, the defensive shield version will be incorrectly mapped instead of the effect.

Create filtered databases excluding defensive shields:

bash <<'BASH'
cd src/gemp-swccg-cards/src/main/resources

# Create light side database without defensive shields
jq '[.[] | select(.side == "LIGHT" and .cardCategory != "DEFENSIVE_SHIELD")]' \
  card_blueprint_database.json > /tmp/card_blueprint_database_light_no_shields.json

# Create dark side database without defensive shields
jq '[.[] | select(.side == "DARK" and .cardCategory != "DEFENSIVE_SHIELD")]' \
  card_blueprint_database.json > /tmp/card_blueprint_database_dark_no_shields.json
BASH

Verify filtering worked:

bash <<'BASH'
echo "Light side defensive shields (should be 0):"
jq '[.[] | select(.cardCategory == "DEFENSIVE_SHIELD")] | length' \
  /tmp/card_blueprint_database_light_no_shields.json

echo "Dark side defensive shields (should be 0):"
jq '[.[] | select(.cardCategory == "DEFENSIVE_SHIELD")] | length' \
  /tmp/card_blueprint_database_dark_no_shields.json
BASH

Why this matters:

  • Prevents defensive shields from being mapped when effect versions exist
  • Prevents side-mixing (e.g., DARK "Control" appearing in LIGHT side packs)
  • Resolves slug collisions for cards with same names on both sides

Step 4: Map Card Names to IDs

Map each CSV file to card IDs using the map_card_names_to_ids script with side-specific, defensive-shield-filtered databases:

CUBE_DIR="src/gemp-swccg-server/src/main/resources/draft/cube_building/<cube_name>"

# Map default/core cards (use main database)
./bin/map_card_names_to_ids \
  $CUBE_DIR/default_cards.csv \
  $CUBE_DIR/default_cards_mapped.json \
  src/gemp-swccg-cards/src/main/resources/card_blueprint_database.
Полный SKILL.md на GitHub

Установить cube-builder в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/common_issues.md

FAQ

Что делает скилл cube-builder?

This skill should be used when building cube draft configurations for GEMP-SWCCG from CSV files containing card names. It handles mapping card names to IDs, generating cube configurations with add-on card support, and integrating the cube into the application (swccgDrafts.json registration and frontend dropdown setup).

Как установить скилл cube-builder?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cube-builder запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cube-builder с