implement-cards
БесплатноБез исполняемых скриптовНе проверенFill out the implementation of effects of different attacks, abilities, and trainer cards in this Pokemon TCG Pocket engine codebase.
Об этом скилле
Implementing Cards
To implement cards, first read the models module and the state module. Cards
are not implemented if they are a Pokemon that is missing an Ability or Attack implementation,
or a Trainer card (be it a tool or a normal one) missig implementation.
Use TDD for every new card implementation:
- Before changing the production implementation, add 1 or 2 focused tests for the new card behavior.
- Write those tests at the same abstraction level as
test_raikou_rocky_helmet_promotion_orderintests/tools/raikou_rocky_helmet_order_test.rs. - Keep the tests at the public
GameAPI level, driving behavior through calls likegame.apply_action(...),generate_possible_actions(),get_state_clone(), and observable game state changes. - Do not start implementation until those tests exist.
If the user hasn't specified what card to implement, you can use the tool:
cargo run --bin card_status
to see what cards are missing, and choose one. You can also that tool to see what is missing from the specified card.
Abilities
Get the details of all the cards that have the ability you want to implement by using the following script:
- For a single card or name lookup:
cargo run --bin search "Venusaur"Copy the ids of cards to implement (including full art versions) in the given JSON. Only choose the ones with the ability you want to implement.
All abilities should use the
AbilityMechanicpathway.- Find the ability effect text in the JSON and search for it in
effect_ability_mechanic_map.rs. - Re-use an existing
AbilityMechanicwhen possible. If not, add a new variant insrc/actions/abilities/mechanic.rs. - Add or uncomment all matching
map.insert(...)lines ineffect_ability_mechanic_map.rsand map them to the correctAbilityMechanicwith parameters. - Implement the mechanic logic in
forecast_ability_by_mechanicinsrc/actions/apply_abilities_action.rs.- Return an
Outcomesstruct (seesrc/actions/outcomes.rs). - For deterministic effects:
Outcomes::single_fn(|rng, state, action| { ... }) - For coin-flip effects, use the appropriate
Outcomesconstructor:Outcomes::binary_coin(heads_mutation, tails_mutation)for a single coin flipOutcomes::binomial_by_heads(n, |heads| mutation)for N flips grouped by heads countOutcomes::geometric_until_tails(max, |heads| mutation)for flip-until-tails effects
- Keep
matcharms as one-liners by moving logic into helpers.
- Return an
- Implement move generation logic in
can_use_ability_by_mechanicinsrc/move_generation/move_generation_abilities.rs.- Keep
matcharms as one-liners by moving logic into helpers.
- Keep
- Find the ability effect text in the JSON and search for it in
If the ability is passive or hook-driven:
- Prefer a mechanic + hook combination.
- Put the mechanic-to-hook wiring in the relevant hook file, usually under
src/hooks/. forecast_ability_by_mechanicshouldpanic!for passive mechanics, andcan_use_ability_by_mechanicshould returnfalse.
Add 1 or 2 logic tests before implementation at the
Gamepublic API level.- Prefer the folder-matched integration test layout under
tests/, for exampletests/pokemon/...,tests/tools/...,tests/stadiums/..., ortests/mechanics/.... - Follow
test_raikou_rocky_helmet_promotion_orderintests/tools/raikou_rocky_helmet_order_test.rsin style and abstraction level. - Drive behavior through public APIs like
game.apply_action(...)instead of internal helpers or private implementation details. - Do not assert on
.move_generation_stack; drive behavior through public actions and resulting game state.
- Prefer the folder-matched integration test layout under
Attack
Get the details of the card with the attack you want to implement by using the following script:
cargo run --bin search "Venusaur" --attack "Giant Bloom"Search for the effect text in the above JSON in the
effect_mechanic_map.rsfile.Decide if we should introduce a new Mechanic or re-use or generalize an existing one. Try to re-use existing ones first.
Identify all the cards that have the same effect text template, and just differ by parameters.
Uncomment all the
// map.insert("lines that pertain to the mechanic, and add the correct value (anMechanicenum variant with the corresponding parameters).Implement the mechanic logic in
forecast_effect_attack_by_mechanicinsrc/actions/apply_attack_action.rs.- Return an
Outcomesstruct (seesrc/actions/outcomes.rs). - For deterministic effects:
Outcomes::single_fn(|rng, state, action| { ... }) - For coin-flip effects, use the appropriate
Outcomesconstructor:Outcomes::binary_coin(heads_mutation, tails_mutation)- single coin flipOutcomes::binomial_by_heads(n, |heads| mutation)- flip N coins, group by heads countOutcomes::geometric_until_tails(max, |heads| mutation)- flip until tails
- Keep the code as a simple one-liner in the match statement by using helper functions
- Return an
Установить implement-cards в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл implement-cards?
Fill out the implementation of effects of different attacks, abilities, and trainer cards in this Pokemon TCG Pocket engine codebase.
Как установить скилл implement-cards?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл implement-cards запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic