Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

card-blueprint-db-manager

FreeNo executable scriptsNot checked

This skill should be used when you need to create filtered subsets of the card_blueprint_database.json file to resolve slug collisions during card mapping. It…

PlayersCommitteeby PlayersCommittee★ 35 GitHub stars14 installs in other catalogs

About this skill

Card Blueprint Database Manager

Overview

The card blueprint database (card_blueprint_database.json) contains all SWCCG card data with slugified names for mapping. However, slug collisions occur when:

  1. Light side and dark side cards have the same name (e.g., "Bespin" exists on both sides)
  2. Defensive shields share slugs with regular cards

This skill provides jq-based filtering to create side-specific databases that exclude defensive shields, resolving these collisions during cube building.

When to Use This Skill

Use this skill when:

  • Building cube drafts with cards that have slug collisions
  • Mapping card names to IDs fails due to duplicate slugs
  • You need side-specific card databases (light only or dark only)
  • You need to exclude defensive shields from mapping

Card Database Structure

Each card in the database has these relevant fields:

{
  "cardId": "101_2",
  "title": "Luke",
  "slug": "luke",
  "slugWithSetName": "luke-premiere-introductory-two-player-game",
  "side": "LIGHT",
  "cardCategory": "CHARACTER",
  "cardTypes": ["REBEL"]
}

Key fields for filtering:

  • side - Either "LIGHT" or "DARK"
  • cardCategory - Card category, including "DEFENSIVE_SHIELD"
  • cardTypes - Array of types, including "DEFENSIVE_SHIELD"

Filtering Commands

Filter by Light Side (Exclude Defensive Shields)

Create a light side only database:

jq '[.[] | select(.side == "LIGHT" and .cardCategory != "DEFENSIVE_SHIELD")]' \
  src/gemp-swccg-cards/src/main/resources/card_blueprint_database.json \
  > src/gemp-swccg-cards/src/main/resources/card_blueprint_database_light.json

Filter by Dark Side (Exclude Defensive Shields)

Create a dark side only database:

jq '[.[] | select(.side == "DARK" and .cardCategory != "DEFENSIVE_SHIELD")]' \
  src/gemp-swccg-cards/src/main/resources/card_blueprint_database.json \
  > src/gemp-swccg-cards/src/main/resources/card_blueprint_database_dark.json

Filter Excluding All Defensive Shields

Create database without any defensive shields:

jq '[.[] | select(.cardCategory != "DEFENSIVE_SHIELD")]' \
  src/gemp-swccg-cards/src/main/resources/card_blueprint_database.json \
  > src/gemp-swccg-cards/src/main/resources/card_blueprint_database_no_shields.json

Verify Filtering Results

Check card counts after filtering:

# Original database count
jq 'length' src/gemp-swccg-cards/src/main/resources/card_blueprint_database.json

# Light side count
jq 'length' src/gemp-swccg-cards/src/main/resources/card_blueprint_database_light.json

# Dark side count
jq 'length' src/gemp-swccg-cards/src/main/resources/card_blueprint_database_dark.json

# Verify no defensive shields
jq '[.[] | select(.cardCategory == "DEFENSIVE_SHIELD")] | length' \
  src/gemp-swccg-cards/src/main/resources/card_blueprint_database_light.json
# Should output: 0

Integration with Cube Builder

When building cubes with slug collisions, modify the map_card_names_to_ids script to use filtered databases:

Standard Workflow (No Collisions)

./bin/map_card_names_to_ids \
  $CUBE_DIR/cube_worlds_lightside.csv \
  $CUBE_DIR/cube_worlds_lightside_mapped.json

Modified Workflow (With Slug Collisions)

Step 1: Create filtered databases

# Light side database (no defensive shields)
jq '[.[] | select(.side == "LIGHT" and .cardCategory != "DEFENSIVE_SHIELD")]' \
  src/gemp-swccg-cards/src/main/resources/card_blueprint_database.json \
  > src/gemp-swccg-cards/src/main/resources/card_blueprint_database_light.json

# Dark side database (no defensive shields)
jq '[.[] | select(.side == "DARK" and .cardCategory != "DEFENSIVE_SHIELD")]' \
  src/gemp-swccg-cards/src/main/resources/card_blueprint_database.json \
  > src/gemp-swccg-cards/src/main/resources/card_blueprint_database_dark.json

Step 2: Modify map_card_names_to_ids script to accept database path

The script needs to accept an optional third parameter for the database path:

./bin/map_card_names_to_ids \
  $CUBE_DIR/cube_worlds_lightside.csv \
  $CUBE_DIR/cube_worlds_lightside_mapped.json \
  src/gemp-swccg-cards/src/main/resources/card_blueprint_database_light.json

Step 3: Map with appropriate database

CUBE_DIR="src/gemp-swccg-server/src/main/resources/draft/cube_building/worlds_2025"

# Map light side with light database
./bin/map_card_names_to_ids \
  $CUBE_DIR/cube_worlds_lightside.csv \
  $CUBE_DIR/cube_worlds_lightside_mapped.json \
  src/gemp-swccg-cards/src/main/resources/card_blueprint_database_light.json

# Map dark side with dark database
./bin/map_card_names_to_ids \
  $CUBE_DIR/cube_worlds_darkside.csv \
  $CUBE_DIR/cube_worlds_darkside_mapped.json \
  src/gemp-swccg-cards/src/main/resources/card_blueprint_database_dark.json

# Default cards can use either (or no-shields version if needed)
./bin/map_card_names_to_ids \
  $CUBE_DIR/default_cards.csv \
  $CUBE_DIR/default_cards_mapped.json

Complete Cube Buildi

Full SKILL.md on GitHub

Install card-blueprint-db-manager in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

references/jq_filter_examples.mdreferences/slug_collision_patterns.md

FAQ

What does the card-blueprint-db-manager skill do?

This skill should be used when you need to create filtered subsets of the card_blueprint_database.json file to resolve slug collisions during card mapping. It provides jq commands to filter by side (LIGHT/DARK) and exclude defensive shields, creating temporary filtered JSON files for use with cube-builder.

How do I install the card-blueprint-db-manager skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the card-blueprint-db-manager skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare card-blueprint-db-manager with