Pipeline Logger Skill

Add structlog logging and retry decorators to Python pipeline scripts.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/fstr21/sportsbot --skill pipeline-logger-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Pipeline Logger Skill
Source: https://github.com/fstr21/sportsbot/tree/main/.claude/skills/pipeline-logger
Command: npx skills add https://github.com/fstr21/sportsbot --skill pipeline-logger-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires structlog, tenacity, and includes scripts (resource) components.

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

Frequently Asked Questions about Pipeline Logger Skill

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

FAQPage Schema
How do I replace print statements with structured logging in Python pipeline scripts?

Structured logging replaces print() with logger.info/warning/error calls that output JSON logs, making debugging easier. This Skill automatically converts print statements to structlog calls in your Python scripts, preserving logic while enabling parseable log analysis.

Can I add retry logic to API calls in my data pipeline without rewriting the code?

Yes. This Skill inserts @conservative_retry decorators on API functions to handle transient failures automatically. Your existing pipeline logic stays intact while gaining robust error handling and reduced data loss from temporary failures.

What happens to my original script when I apply logging updates?

A backup (.bak) copy is created before modification, and all original behavior is preserved. Only logging and retry decorators are added, so your script's core functionality and output remain unchanged.

Does this work with sports data pipeline scripts across different sports?

Yes. The Skill applies to Python pipeline scripts across NFL, NHL, NCAAF, and Soccer pipelines—capture, package, derive, and fetch scripts. It standardizes logging and retries across your entire sports data infrastructure.

Where are the JSON logs stored after this Skill runs?

JSON logs are written to logs/{script_name}/YYYY-MM-DD.jsonl, organizing structured output by script and date. This enables time-based log analysis and easier troubleshooting of pipeline execution.

What dependencies do I need to use structured logging and retry decorators?

The Skill requires structlog for JSON logging and tenacity for retry logic. Both are open-source Python libraries that integrate seamlessly into your existing pipeline code.