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…
Об этом скилле
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:
- Defensive shield versions being mapped instead of effect versions (e.g., "Battle Plan" as shield vs effect)
- Wrong-side cards appearing in drafts (e.g., DARK "Control" in LIGHT side packs)
- 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:
- default_cards.csv - Single column of card names (core cards all players start with)
- cube_worlds_lightside.csv - Light side packs (supports multi-column for add-ons)
- 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.
Установить cube-builder в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic