artifact-explorer
Skill from fstr21/sportsbot
- Category: discovered
- Tags: github, community
- Version: 1.0.0
- Author: walid
- Downloads: 0
- Updated: 2025-11-22
Download the latest version (v1.0.0) from this page.
SKILL.md
# Artifact Explorer Skill
**Purpose**: Explore and analyze captured data artifacts across all sports.
## When Claude Should Use This Skill
Use this skill when:
- User asks "what data do we have?" or "show me artifacts"
- User asks "did the capture work?" or "check artifacts"
- User wants to know which dates have data for a sport
- User asks "what games were captured?"
- After running a capture script, to verify artifacts were created
- User mentions "missing artifacts" or "no data files"
- Debugging why data isn't showing up in database
- User asks "what's in artifacts folder?"
## What This Skill Does
1. **Scans** `artifacts/` directory for all sports
2. **Counts** games, players, and files for each sport/date
3. **Identifies** which pipeline stages have data (raw, derived, packages)
4. **Compares** artifacts to database (what's captured but not ingested?)
5. **Shows** file sizes and timestamps
6. **Validates** artifact integrity (corrupt JSON, missing index files)
7. **Displays** results in easy-to-read table format
8. **Explains** what the data means in plain English
## Critical Constraints
**MUST follow these rules**:
- NO emoji (Windows environment - use ASCII like [OK], [FAIL], [WARN])
- Read-only operations (never modify artifacts)
- Handle missing directories gracefully (some sports may have no data)
- Display dates in YYYY-MM-DD format (ISO standard)
- Use Rich library for table display (already installed)
- Show both artifact counts AND database counts for comparison
## How to Use This Skill
**Example 1**: User says "what data do we have?"
- Claude runs: `python .claude/skills/artifact-explorer/scripts/explore_artifacts.py`
- Claude shows: Summary table of all sports with artifact counts
- Claude explains: "You have data for NFL (1 date), NHL (1 date), NBA (1 date)"
**Example 2**: User says "check NBA artifacts"
- Claude runs: `python .claude/skills/artifact-explorer/scripts/explore_artifacts.py --sport nba`
- Claude shows: NBA-specific artifact breakdown by date
- Claude explains: "NBA has 12 games captured for 2025-10-22"
**Example 3**: User says "did the capture work?"
- Claude runs: `python .claude/skills/artifact-explorer/scripts/explore_artifacts.py --date 2025-10-23`
- Claude shows: What was captured on that specific date
- Claude explains: "Capture ran successfully - created 14 game files for NFL"
## Expected Outcome
After using this skill:
- User knows what data exists in artifacts/
- User knows which dates have data for each sport
- User knows if captures are creating files correctly
- User knows if data is missing between stages (captured but not derived?)
- User understands what the artifact counts mean (in plain English)
- User can identify issues (e.g., "10 games in raw/ but 0 in derived/")
## Technical Details
The artifact-explorer scripts:
- `explore_artifacts.py` - Main artifact explorer (all sports overview)
- `explore_sport.py` - Deep dive for specific sport (optional future enhancement)
- `compare_to_db.py` - Compare artifacts to database counts (optional future enhancement)
All scripts:
- Read artifact directories (`artifacts/{sport}/raw/`, `derived/`, `packages/`)
- Count JSON files and parse index files
- Use Rich for formatted table output
- Handle missing directories gracefully (show [NONE] not crash)
- Display file sizes and last modified timestamps
- Compare raw → derived → packages → database to find gaps
## Success Criteria
Script is successful if:
- Scans all artifact directories successfully
- Displays artifact counts in readable table format
- Shows accurate counts for games/players/files
- Identifies pipeline stage gaps (data in raw/ but not derived/)
- Explains findings in plain English
- User understands artifact status
## Example Output
```
ARTIFACT SUMMARY (All Sports)
+-------+------------+-----------+---------+----------+
| Sport | Date | Raw Files | Derived | Packages |
+-------+------------+-----------+---------+----------+
| NFL | 2025-10-21 | 14 | 14 | 14 |
| NHL | 2025-10-22 | 3 | 0 | 0 |
| NBA | 2025-10-22 | 12 | 0 | 0 |
+-------+------------+-----------+---------+----------+
PIPELINE STAGE GAPS
[WARN] NHL: 3 games in raw/ but 0 in derived/ - Run derive pipeline
[WARN] NBA: 12 games in raw/ but 0 in derived/ - Run derive pipeline
SUMMARY
[OK] 3 sports with artifacts (29 total games captured)
[WARN] 2 sports missing derived data
```