dataclass-generator

Generate Python dataclasses from SQL queries and database schemas.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Wkayaobama/icalps_pipeline --skill dataclass-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dataclass-generator
Source: https://github.com/Wkayaobama/icalps_pipeline/tree/main/Documents/AnthonySalesOps/Codebase/IC_Load/dataclass-generator
Command: npx skills add https://github.com/Wkayaobama/icalps_pipeline --skill dataclass-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyodbc, pandas, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Manually creating and maintaining Python dataclasses that accurately reflect complex SQL query results, especially with JOINs and evolving schemas, is time-consuming and prone to errors. This Skill automates that process, ensuring type safety and consistency, so you can focus on logic, not boilerplate.

Core Features & Use Cases

  • Dynamic Dataclass Generation: Create Python dataclasses directly from SQL queries or discovered database schemas, including denormalized fields from JOINs.
  • SQL to Python Type Mapping: Automatically convert SQL data types to their appropriate Python equivalents, handling nullability and adding necessary imports.
  • Use Case: After defining a complex SQL query that joins multiple tables for a new data entity, use this skill to instantly generate the corresponding Python dataclass, ready for use in your data pipeline.

Quick Start

Generate a Python dataclass named 'CustomerOrder' from the SQL query "SELECT c.CustomerID, c.Name, o.OrderID, o.Amount FROM Customers c JOIN Orders o ON c.CustomerID = o.CustomerID".