# update pokemon tcg corpus

> Update the English Pokemon card list and scan images in pokemon-tcg-corpus when a new set is missing, an embeddings run fails, or a release needs verification.

update pokemon tcg corpus is a free AI agent skill on Agensi by Reebal Abelson, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Reebal Abelson](https://www.agensi.io/creators/reebal-abelson)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-19
- Security: scan passed (2026-11-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/update-pokemon-tcg-corpus
- Tags: llm-ops, python, sqlite, github-actions, data-verification

## About this skill

Maintaining a complete Pokemon TCG dataset is difficult when image sources and card counts frequently mismatch. This skill automates the verification and update cycle for the `pokemon-tcg-corpus` repository to ensure data integrity.

### What it does
- **Verify card counts** checks TCGdex and PokemonTCG.io against official checklists to confirm secret rare totals.
- **Triage build failures** analyzes GitHub Action logs and JSON reports to identify why embeddings failed to generate.
- **Map image sources** resolves missing card art by pairing TCGdex IDs with verified pkmn.gg slugs in the resolution script.
- **Validate embeddings** queries the SQLite database to ensure all card variants have associated vector embeddings.
- **Workflow dispatch** triggers automated rebuilds of the embeddings database via GitHub CLI.

### How it works
1. **Source discovery** identifies the target set ID and card count from public TCG APIs.
2. **Failure analysis** downloads artifacts from failed `build-embeddings-db.yml` runs to extract the `missing-images-report.json`.
3. **Set mapping** updates `EXACT_SET_MAPPINGS` in the Python source to bridge metadata and image providers.
4. **Local validation** runs the image check script and pytest suite to verify every card resolves to a decodable image.
5. **Production verification** downloads the latest release asset to confirm the SQLite `cards` table matches the expected checklist.

### Frameworks & tools
Built for repositories using Python, SQLite, and GitHub Actions. It utilizes `pytest` for validation and the GitHub CLI (`gh`) for artifact and workflow management.

### Why this beats prompting it yourself
Generic agents struggle with the specific cross-referencing logic required between TCGdex and pkmn.gg. This skill enforces a strict image gate and specific SQLite join logic to prevent incomplete data from reaching production releases.

### Use cases
- Add a newly released Pokemon TCG set to the embeddings database.
- Debug a failed GitHub Action run that reported missing card images.
- Verify that a published release contains the correct number of secret rares.
- Update image resolution logic when a source provider changes their URL structure.

### Known limitations
Cannot add sets that are absent from both TCGdex and PokemonTCG.io feeds. Requires GitHub CLI authenticated with repository write access to dispatch workflows.

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the update pokemon tcg corpus skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific data integrity issues does this skill solve?

This skill automates the synchronization between TCG APIs and your local repository, resolving common data mismatches, missing image art, and incomplete SQLite embeddings that manual scripts often overlook.

### Are there any specific system requirements to run this skill?

The skill requires a Python environment with the GitHub CLI (gh) installed and authenticated, as it needs repository write access to fetch Action artifacts and dispatch rebuild workflows.

### Can this skill handle image mapping for new TCG sets not yet in the official database?

Yes, while it primarily targets TCGdex and PokemonTCG.io, you can update the Python source's mapping logic to bridge metadata with new image providers like pkmn.gg as their URL structures evolve.

### How does the skill verify that the embeddings database is actually complete?

The skill includes a automated SQLite validation step that queries your production database to ensure every card variant, including secret rares, has a corresponding, decodable vector embedding.

### What is included in the purchase of this skill?

You receive the full skill logic for automated source discovery, failure analysis scripts for GitHub Actions, and the image resolution suite designed for the pokemon-tcg-corpus ecosystem.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
