Unified Domain Model Skill

Validate trading domain objects and generate JSON, AVRO, SQL, and GraphQL schemas.

38|9|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/IgorGanapolsky/trading --skill unified-domain-model-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Unified Domain Model Skill
Source: https://github.com/IgorGanapolsky/trading/tree/main/.claude/skills/unified_domain_model
Command: npx skills add https://github.com/IgorGanapolsky/trading --skill unified-domain-model-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires src/core/unified_domain_model.py.

What problem does it solve?

This Skill provides a unified domain model aligning validation, relationships, and schema generation across the system.

Core Features & Use Cases

  • Validation: DomainValidator and SHACL-style rules.
  • Relationships: DomainGraph for entity links.
  • Schema generation: JSON/AVRO/SQL/GraphQL outputs.
  • Factory usage: create domain objects consistently.

Quick Start

Use Domain Validator to validate a Trade object before processing.

Frequently Asked Questions about Unified Domain Model Skill

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

FAQPage Schema
How do I validate trading data across multiple formats like Alpaca and yfinance?

Validation across trading data formats uses a unified domain model with DomainValidator to enforce consistent rules before processing trades, signals, or positions. The Skill applies SHACL-style validation rules to ensure data integrity regardless of source format.

What's the best way to ensure consistency when converting between trading data schemas?

A unified domain model standardizes conversion between formats by mapping entity relationships through DomainGraph and generating consistent schemas via SchemaGenerator. This eliminates format-specific inconsistencies for JSON, AVRO, SQL, and GraphQL outputs.

How do I generate API and database schemas from domain objects?

SchemaGenerator produces JSON, AVRO, SQL, and GraphQL schemas directly from validated domain objects. Combined with DomainValidator and DomainGraph, it ensures schema outputs reflect the same entity relationships and validation rules across all trading system components.

Can I use a domain model to enforce validation rules on trades before they're processed?

Yes, DomainValidator enforces validation rules on domain objects like trades before processing. The Skill integrates validation, relationships, and schema generation through a factory pattern, making consistent enforcement across all trading system components automatic.

Do I need to understand entity relationships to work with this approach?

Understanding entity relationships helps but isn't required to start. DomainGraph models those relationships for you; you apply DomainValidator to validate individual objects and use SchemaGenerator for outputs. The factory handles consistent object creation.