tool-scripts

Validate, rename, and analyze Yu-Gi-Oh! YDK decks and cards.cdb databases with Python and shell scripts.

1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/ZisIsNotZis/ygoskill --skill tool-scripts-zisisnotzis
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tool-scripts
Source: https://github.com/ZisIsNotZis/ygoskill/tree/main/ygopro/tools
Command: npx skills add https://github.com/ZisIsNotZis/ygoskill --skill tool-scripts-zisisnotzis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, xxhash, scikit-learn, numpy, and includes scripts (resource) and references (resource) components.

What problem does it solve? Managing Yu-Gi-Oh! deck files and card databases manually is error-prone: decks may violate banlists, contain unsummonable extra-deck monsters, or have poor opening-hand consistency, and card data in cards.cdb uses unreadable bitmasks. This Skill provides scripts that automate deck validation, deck consensus analysis, batch YDK renaming, database statistics, card image generation, and deck-list crawling. ## Core Features & Use Cases - Deck Validation & Scoring: ydkcheck.py checks deck size, duplicate limits, banlist compliance, extra-deck summonability, and simulates T0/T1 opening-hand rates with a weighted quality score. - Deck Consensus & Lookup: ydkshow.py shows card details by regex or computes top-N card consensus across folders of YDK files, with optional KMeans clustering of decklists. - Database & Image Tooling: cards.sql/cdb2sql convert cards.cdb between bitmask and human-readable SQL, raceattrstat.py outputs race/attribute distribution YAML, and ypicdown.sh/ypicgen.sh download and generate card images. - Use Case: After collecting tournament decks with clipdown.sh and the AutoKey crawler, run ydkrename.py to organize them by archetype and date, then use ydkshow.py to derive the meta consensus core for an archetype. ## Quick Start Use the tool-scripts skill to validate my deck file deck.ydk against the banlist and simulate its opening-hand consistency.

Frequently Asked Questions about tool-scripts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if a Yu-Gi-Oh! deck is legal against the banlist?▼

Run ydkcheck.py with the deck file and the lflist section: ./ydkcheck.py deck.ydk --section lflist. It reads lflist.conf, resolves card aliases, and reports forbidden cards or copies exceeding limit 1 or limit 2.

How to simulate opening hand consistency for a YDK deck?▼

Use ydkcheck.py with the start section, which shuffles the main deck and draws 5-card hands repeatedly. Set N_SAMPLES to control iterations (default 500); it reports T0, T1, and unplayable-hand rates based on starter and hand-trap detection.

What files does ydkcheck.py need to run?▼

ydkcheck.py requires cards.cdb (the YGOPro SQLite database) in the working directory and optionally lflist.conf for banlist checks. Without lflist.conf it skips banlist validation with a warning.

How do I convert cards.cdb to a human-readable format?▼

Run sqlite3 cards.cdb < cdb2.sql to produce readable tables where type, race, and attribute bitmasks become strings like 怪兽效果 or 炎. For authoring new DIY cards, use the cards.sql template instead, which converts readable rows back into bitmasks.

What are the limitations of the AutoKey deck crawler scripts?▼

The AutoKey scripts use hard-coded screen coordinates tied to a specific resolution and require the WeChat mini program to be in an exact state. They have no error recovery if a click misses, and timing delays may need adjustment on slower systems.

Why does ydkrename.py not detect my deck's archetype?▼

Archetype detection requires a name gram appearing at least CNT times (default 4) across deck cards. Lower the CNT environment variable or check that strings.conf and the pack/ directory exist relative to the script, since it reads setcodes and release dates from them.