What problem does it solve?
Manual print() statements make debugging complex data pipelines a nightmare, and API calls often lack robust retry mechanisms, leading to brittle data captures. This Skill standardizes logging and adds resilience, saving you hours of manual debugging.
Core Features & Use Cases
- Structured Logging: Automatically replaces
print() statements with structlog calls, creating parseable JSON logs for easier analysis.
- API Retry Logic: Inserts
@conservative_retry decorators to API functions, ensuring robust error handling and reducing data loss from transient failures.
- Safe Modifications: Creates a backup of the original script before modifying and preserves all existing logic, ensuring functional changes are limited to logging improvements.
- Use Case: Apply this Skill to a new sport's capture scripts to instantly add production-grade logging and retry capabilities, making them as robust as your most mature pipelines.
Quick Start
Add logging to a specific capture script
python .claude/skills/pipeline-logger/scripts/add_logging.py pipelines/nhl/capture/01_fetch_nhl_odds.py