fix: rewrite skill scripts to use API instead of sqlite3 (#124) #125

Open
Claude wants to merge 1 commits from ai/paper-dynasty-database#124 into main

1 Commits

Author SHA1 Message Date
Cal Corum
a52a77ad2a fix: rewrite skill scripts to use API instead of sqlite3 (#124)
All checks were successful
Build Docker Image / build (pull_request) Successful in 8m34s
Rewrote ~/.claude/skills/paper-dynasty/scripts/generate_summary.py
and validate_database.py to use the Paper Dynasty API (via
api_client.py) instead of sqlite3.connect() on a local file.

generate_summary.py: now accepts --cardset-id / --env flags and
fetches batting/pitching card counts and player count via
GET /battingcards and GET /pitchingcards endpoints.

validate_database.py: now accepts --cardset-id / --env flags and
validates via API: checks card counts > 0, and that every player
in the cardset has at least one batting or pitching card.

Rarity-change comparison (two-DB diff) and raw field validation
(groundout_b, percentage ranges) are removed — these relied on
direct SQLite access and are not available through the public API.

Also documents in CLAUDE.md that companion skill scripts use the
API only, per the project's SQLite → PostgreSQL migration.

Closes #124

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 23:07:37 -05:00