From sdv-toolkit
Add a league/source for ANY SportsDataverse provider (ESPN, Fox Bifrost, CBS NAPI, Yahoo, 247Sports, Torvik) — capture bodies, generate the returns doc, extend the catalog, scaffold the wrapper.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sdv-toolkit:add-provider-sourceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Router skill. Identify the provider first, then follow the matching sub-flow. All providers share a common Part A (capture + catalog in sdv-internal-refs) before any sdv-py wiring.
Router skill. Identify the provider first, then follow the matching sub-flow. All providers share a common Part A (capture + catalog in sdv-internal-refs) before any sdv-py wiring.
| Provider | Skill | Base URL | Auth |
|---|---|---|---|
| ESPN | add-espn-league + add-sport-parser | site.api.espn.com / sports.core.api.espn.com | None (public) |
| Fox Sports (Bifrost) | add-fox-league | api.foxsports.com/bifrost/v1 | apikey + api-version query params |
| CBS Sports (NAPI) | add-cbs-league | api.cbssports.com/napi | None for data resources |
| Yahoo Sports | add-yahoo-source | sports.yahoo.com (HTML scrape) | None (scrape) |
| 247Sports | See below | 247sports.com | None (HTML scrape) |
| Barttorvik | See below | barttorvik.com | None (CSV/JSON endpoints) |
For ESPN → use add-espn-league (wrapper registration) and add-sport-parser (parser layer). This skill does not repeat those steps.
Working dir: c:\Users\saiem\Documents\sdv-internal-refs
Create the directory structure:
<provider>/inputs/sample_bodies/<sport-or-league>/<endpoint>.json
Fetch and save bodies manually or via a helper script. Record:
YYYY-MM-DD)Create <provider>/catalogs/<sport>_returns.md:
# <Provider> — <Sport/League> Returns
Captured: YYYY-MM-DD
## <endpoint-name>
**URL:** `https://...`
**Host:** `api.provider.com`
**Top-level keys:** `["events", "season", ...]`
| Field | Type | Notes |
|---|---|---|
| id | string | |
| ...
**Divergence notes:** ...
Each provider directory has a master catalog file (e.g. fox/fox_catalog.yaml, cbs/cbs_catalog.yaml). Add your new sport/league entry following the existing schema.
→ Follow add-espn-league for wrapper registration.
→ Follow add-sport-parser for the parser layer.
→ Follow add-fox-league. The OpenAPI at c:\Users\saiem\Documents\GitHub-Data\sdv-dev\sdv-swagger\foxsports-api-openapi.yaml covers the full Bifrost surface.
→ Follow add-cbs-league. Regenerate the OpenAPI with python cbs/gen_napi_openapi.py after capturing new resources.
→ Follow add-yahoo-source. Extracting the embedded JSON blob is the critical first step.
247Sports serves content as HTML with embedded JSON in <script id="__NEXT_DATA__"> (Next.js). Steps:
<provider>/inputs/sample_bodies/247sports/<sport>/<page>.htmlJSON.parse(document.getElementById('__NEXT_DATA__').textContent) or equivalent Python BeautifulSoup + json.loads extraction.Barttorvik exposes clean CSV/JSON endpoints (no auth). The barttorvik catalog in sdv-internal-refs maps the known endpoints. Steps:
https://barttorvik.com/<endpoint>.json?... or ...csv.barttorvik/inputs/sample_bodies/<endpoint>.json.sportsdataverse/mbb/ (Torvik-backed functions). Check the existing surface before adding a new one — the function may already exist.espn_<league>_<dataset>(...) returning pl.DataFrame.feat(<provider>): add <sport/league> capture + catalog
feat(<prefix>): scaffold <provider> <sport> wrappers
No Co-Authored-By trailers.
npx claudepluginhub sportsdataverse/.github --plugin sdv-toolkitCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.