ecto-schema-patterns

Official

Design robust Elixir data models with advanced Ecto patterns.

AuthorTheBushidoCollective
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides advanced Ecto schema patterns to define robust data structures for complex Elixir applications, covering intricate field types, associations, and schema metadata. It automates the application of sophisticated data modeling techniques.

Core Features & Use Cases

  • Flexible Field Types: Utilize :map and {:array, :type} for unstructured or list data, and virtual fields for computed or temporary values.
  • Advanced Associations: Implement many_to_many with join tables or dedicated join schemas, and self-referencing associations for hierarchical data.
  • Custom Primary Keys & Prefixes: Define custom primary keys (e.g., UUIDs, composite keys) and use schema prefixes for multi-tenant applications.
  • Use Case: You're building an e-commerce platform where products can have multiple tags and users can belong to multiple organizations with specific roles. Use this Skill to define a many_to_many relationship between Product and Tag, and a many_to_many with a join schema for User and Organization to store the user's role within each organization, ensuring a flexible and accurate data model.

Quick Start

Use the ecto-schema-patterns skill to define a Product schema with a custom primary key sku of type :string.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ecto-schema-patterns
Download link: https://github.com/TheBushidoCollective/han/archive/main.zip#ecto-schema-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository