ptcg-bc-large-model-submission

ptcg-bc-large-model-submission is a skill for Claude Code, Codex from topprismdata/cultivating-ml-agent. It costs 207 tokens per session (1,630 once invoked), scanned A, original, MIT.

A validated workflow for submitting a behavioral-cloning Transformer agent to a Pokémon Trading Card Game AI competition. Behavioral cloning trains an agent to copy actions from recorded games, while a checkpoint is a saved version of the trained model.

In plain words
What is it for?
Use it to download Pokémon TCG competition episodes, create training examples, train the BC Large model, select the best checkpoint, and prepare the required submission file.
Why use it?
It addresses the common mistake of submitting an outdated or smaller saved model after training a better one. It also covers downloading daily game datasets and extracting large amounts of training data without using excessive memory.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is tar -czf ../submission_bc_v7.tar.gz ..

Good fit Use it to download Pokémon TCG competition episodes, create training examples, train the BC Large model, select the best checkpoint, and prepare the required submission file.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/topprismdata/cultivating-ml-agent
agentmods
npx agentmods add skills/topprismdata/cultivating-ml-agent/ptcg-bc-large-model-submission

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ptcg-bc-large-model-submission

README.md
[![agentmods](https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/ptcg-bc-large-model-submission/github.svg)](https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/ptcg-bc-large-model-submission)
Your own site
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/ptcg-bc-large-model-submission"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/ptcg-bc-large-model-submission/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ptcg-bc-large-model-submission

Your own site · 80×15
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/ptcg-bc-large-model-submission"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/ptcg-bc-large-model-submission.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 207 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,630 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00207 $0.01630
Opus 5.5 $0.00083 $0.00652
Sonnet 5.5 $0.00041 $0.00326
Haiku 4.5 $0.00021 $0.00163

Measured 3mo ago against content hash 9841e32e8a63, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ptcg-bc-large-model-submission scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/examples/ptcg-bc-large-model-submission/SKILL.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pokémon TCG — BC Large Model Submission Pipeline

The Core Lesson (validated)

The single biggest jump (165 → 600) came from using the right checkpoint. Training produces checkpoints_bc_large/best.pth (66 MB, 16.6M params). Submissions require model_bc.pth (v6 path). Forgetting to copy best.pth → submission/model_bc.pth is the #1 reason scores stay low after training.

Submission Source LB
v6 stale small-model checkpoint 165.6
v7 checkpoints_bc_large/best.pth 600.0

Pipeline (validated end-to-end)

Step 1: Scale BC data via Kaggle dataset snapshots

Episodes are published daily as kaggle/pokemon-tcg-ai-battle-episodes-YYYY-MM-DD. Each snapshot is ~5000 games (not 200 — that was the pitfall of per-file downloading). Use whole-snapshot download (one zip per day), not per-file:

for date in 2026-06-20 2026-06-22 ...; do
  kaggle datasets download kaggle/pokemon-tcg-ai-battle-episodes-$date -p bc_zips
  unzip bc_zips/...zip -d bc_data/$date
done
# Total: 80K+ games → ~6.4M (state, action) pairs

Step 2: Stream extract to part files (avoids OOM)

extract_bc_data.py must NOT accumulate the full sample list in memory before saving. With 6.4M samples at ~10KB each = 64 GB → instant OOM. Write part files every 50K samples, then del part_data after each:

PART_SIZE = 50_000
for i, rf in enumerate(replay_files):
    samples = extract_from_replay(rf)
    batch.extend(samples)
    if len(batch) >= PART_SIZE:
        torch.save(batch, f"bc_dataset_part_{part_idx}.pt")
        part_idx += 1; batch = []
torch.save({"n_parts": part_idx, "total": total_samples}, "bc_dataset_meta.pt")

Step 3: Stream-sampling training (avoids OOM at load)

train_bc_large.py loading 129 part files → extend() into one list = OOM. Sample per-part to quota (50K / 129 ≈ 400 per part), del part_data after each:

per_part_quota = MAX_SAMPLES // len(part_files)
for pf in part_files:
    part_data = torch.load(pf, weights_only=False)
    if len(part_data) > per_part_quota:
        idx = np.random.choice(len(part_data), per_part_quota, replace=False)
        samples.extend([part_data[j] for j in idx])
    else:
        samples.extend(part_data)
    del part_data  # critical: release memory

Read the full file on GitHub · 138 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 138 lines · 207 tokens per session scan A 9841e32e8a63

Subscribe to this mod's changes

ptcg-bc-large-model-submission is a skill published in the GitHub repository topprismdata/cultivating-ml-agent (5 stars, last pushed 1mo ago), licensed MIT. It adds 207 tokens to every session and 1,630 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

ptcg-bc-large-model-submission compared with skills from other repositories

ptcg-bc-large-model-submission next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ptcg-bc-large-model-submissiontopprismdata/cultivating-ml-agentSkill51mo agoMITA207Claude Code, Codex
huggingface-hubbraxtonROSE4/zorro-agentSkill117mo agoMITC43Claude Code, Codex
agent-v3-memory-specialistruvnet/rufloSkill83ktodayMITA25Claude Code
neural-trainingruvnet/rufloSkill83ktodayMITA64Claude Code
kv-cache-designbojieli/ai-agent-bookSkill60kyesterdayApache-2.0A91Claude Code, Codex
reward-designbojieli/ai-agent-bookSkill60kyesterdayApache-2.0A131Claude Code, Codex
post-training-strategybojieli/ai-agent-bookSkill60kyesterdayApache-2.0A159Claude Code, Codex