| name | add-set |
| description | Add a new TCG Pocket expansion set to the project. Use when asked to add a new set, expansion, or pack. |
| argument-hint | ["set-id"] |
| allowed-tools | Read, Write, Edit, Glob, Grep |
Add New Set
Start by asking the user for the following details (ask all in one message):
- Set display name – e.g.
Paldean Wonders
- Set ID – e.g.
B2a (used in URLs and card IDs)
- Internal ID – the next integer after the current highest non-promo internalId in
frontend/src/lib/CardsDB.ts (read the file to determine this automatically and suggest it)
- Pack name(s) – internal key(s) without spaces, lowercase, e.g.
paldeanwonderspack. If there are multiple packs, ask for all of them.
- Pack display name(s) – the human-readable pack name(s), e.g.
Paldean Wonders
- Pack color(s) – hex color(s), e.g.
#78b9c0. Rule: saturation 37.5%, value 75%, hue distance ≥ 3.33% (12 steps) from all existing packs. Read CardsDB.ts to find existing colors and suggest a valid new one.
- Tradeable? – yes/no (default: yes)
- Openable? – yes/no (default: yes)
- Contains shinies? – yes/no (default: yes)
- Shiny ranges (only if contains shinies) – card number ranges for
✵ (1-shiny) and ✵✵ (2-shiny) cards, e.g. ✵: 87–110, ✵✵: 111–115. These are the card index numbers within the set.
- Contains babies? – yes/no (default: no)
- Contains linked cards? – yes/no (default: no)
- Cards per pack – number (default: 5)
Once you have all the details, perform all of the following steps:
Step 1 — frontend/src/types/index.ts
Add the new set ID to the front of the expansionIds array:
export const expansionIds = ['<NEW_ID>', 'B2a', ...] as const
Step 2 — frontend/src/lib/CardsDB.ts
Add the expansion entry to the expansions array, after the previous set and before the promo sets comment (// Pack colors should have saturation ...):
{
name: '<nameLowercase>',
id: '<ID>',
internalId: <internalId>,
packs: [{ name: '<packname>', color: '<color>' }],
tradeable: <true|false>,
openable: <true|false>,
packStructure: {
containsShinies: <true|false>,
containsBabies: <true|false>,
containsLinkedCards: <true|false>,
cardsPerPack: <number>,
},
},
All four packStructure fields are required by the PackStructure type in frontend/src/types/index.ts. There is no missions field on Expansion.
Step 3 — scripts/scraper.ts
3a. Add each pack name to the packs array (before 'allcards'):
'<packname>',
3b. Add the set to rarityOverrides with the shiny ranges provided. rarityOverrides is typed Record<ExpansionId, ...>, so it must have an entry for the new ID or the build fails. If the set contains shinies:
<ID>: [
{ rarity: '✵', start: <shiny1Start>, end: <shiny1End> },
{ rarity: '✵✵', start: <shiny2Start>, end: <shiny2End> },
],
If no shinies (or ranges unknown), use an empty array: <ID>: []
Place it in the correct alphabetical/sequential position among the other set IDs.
Step 4 — Locale files: sets.json (all 6 locales)
Files: frontend/public/locales/{en-US,es-ES,it-IT,pt-BR,de-DE,fr-FR}/common/sets.json
For en-US, add after the previous set's entry:
"<nameLowercase>": "<Display Name>",
And in the ID-suffixed section, add after the previous set's suffixed entry:
"<nameLowercase>(<idLower>)": "<Display Name> (<ID>)",
For all other locales, append at the end (before the closing }):
"<nameLowercase>": "<Display Name>",
"<nameLowercase>(<idLower>)": "<Display Name> (<ID>)"
Use the English display name as a placeholder for non-English locales.
Step 5 — Locale files: packs.json (all 6 locales)
Files: frontend/public/locales/{en-US,es-ES,it-IT,pt-BR,de-DE,fr-FR}/common/packs.json
For en-US, add before "everypack":
"<packname>": "<Pack Display Name>",
For all other locales, append at the end (before the closing }):
"<packname>": "<Pack Display Name>"
Naming conventions
<nameLowercase> = display name lowercased with all spaces removed, e.g. Paldean Wonders → paldeanwonders
<idLower> = set ID lowercased, e.g. B2a → b2a
Step 6 — Set banner image
Place the set artwork image at:
frontend/public/images/sets/en-US/<ID>.webp
This is a manually sourced asset — the scraper only downloads individual card images, not set banners. Remind the user to add this file manually after obtaining it from official sources.
Important notes
internalId must never change after a set is released — the DB encoding depends on it.
- Promo sets use internalIds 192+ to avoid conflicts with regular sets.
- If shiny ranges were not provided upfront, remind the user to fill in
rarityOverrides in scripts/scraper.ts once the set's card list is confirmed.