database-operations

Fetch PostgreSQL data as DataFrames via the DBManager interface.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/MGPowerlytics/nhlstats --skill database-operations-mgpowerlytics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-operations
Source: https://github.com/MGPowerlytics/nhlstats/tree/main/.github/skills/database-operations
Command: npx skills add https://github.com/MGPowerlytics/nhlstats --skill database-operations-mgpowerlytics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies PostgreSQL data interaction by providing a unified DBManager interface for common operations, reducing ad-hoc queries and promoting consistent data access patterns across the betting analytics stack.

Core Features & Use Cases

  • Fetch data as a DataFrame using the default connection (e.g., unified_games across sports).
  • Execute updates and transactional changes (e.g., marking bets as won/lost) via parameterized queries.
  • Upsert and insert data from DataFrames into key tables like unified_games, game_odds, placed_bets, elo_ratings, and portfolio_snapshots.
  • Use Case: Data analysts fetch historical game data, perform analytics, and feed dashboards or models with consistent data.

Quick Start

Run a quick fetch with the default DB connection: df = default_db.fetch_df("SELECT * FROM unified_games WHERE sport = 'nba'") print(df.head())

Frequently Asked Questions about database-operations

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

FAQPage Schema
How do I fetch data from a PostgreSQL table into a DataFrame?

You can fetch PostgreSQL data into a DataFrame using the default DBManager connection by running a parameterized SELECT query, such as default_db.fetch_df, to retrieve records from tables like unified_games.

Can I upsert or insert DataFrame data into a PostgreSQL database?

Yes, you can upsert and insert data from DataFrames directly into key PostgreSQL tables like game_odds, placed_bets, and elo_ratings using the DBManager interface to maintain consistent records.

How do I execute transactional updates on PostgreSQL records?

You can execute transactional updates and changes, such as marking bets as won or lost, by running parameterized queries through the DBManager interface to ensure safe and consistent database modifications.

Do I need a pre-configured PostgreSQL instance to use DBManager?

Yes, you need a configured PostgreSQL instance with valid connection parameters including host, port, user, password, and database, along with the DBManager library to establish data access.

What is the best way to standardize PostgreSQL data access for analytics?

Using a unified DBManager interface standardizes PostgreSQL data access by reducing ad-hoc queries, providing a consistent data retrieval method across the betting analytics stack, and simplifying cross-sport analysis workflows.