PA

party-tph-catalog

Simplifies small lookup table management by using a shared polymorphic database structure.

Install

mkdir -p .claude/skills/party-tph-catalog && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17378" && unzip -o skill.zip -d .claude/skills/party-tph-catalog && rm skill.zip

Installs to .claude/skills/party-tph-catalog

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when adding a small polymorphic catalog dimension (Gender, BlogTag, BlogPostStatus, statuses, types, categories-as-lookup) instead of scaffolding a full entity. Covers the Party base (TPH, int key, PartyType discriminator), PartyRelation for party-to-party links, DTO inheritance from Info/Create/UpdatePartyDto, BasePartyService with SetPolicies and SearchByCriteriaByPartyTypeAsync, and discriminator registration. Domain: Persistence, Domain Modeling. Level: Intermediate. Tags: party, tph, discriminator, catalog, lookup.
529 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • →Add small polymorphic catalog dimensions
  • →Implement Type-Per-Hierarchy (TPH) pattern for entities
  • →Manage DTO inheritance for Info, Create, and Update operations
  • →Register discriminators for derived types
  • →Handle party-to-party links using `PartyRelation` table

How it works

The skill provides a pattern for small catalog dimensions to share a single table via TPH with a string discriminator, managing inheritance for entities, DTOs, and services.

Inputs & outputs

You give it
A small catalog dimension like Gender or BlogTag
You get back
A new catalog dimension implemented using the Party TPH pattern, including inherited DTOs and service

When to use party-tph-catalog

  • →Add new lookup status
  • →Create shared catalog entity
  • →Implement polymorphic party pattern

About party-tph-catalog

Provides a pattern for small catalog entities that share a table using a discriminator. It manages the boilerplate for inheritance, service implementation, and database registration.

Use when adding a small polymorphic catalog dimension (Gender, BlogTag, BlogPostStatus, statuses, types, categories-as-lookup) instead of scaffolding a full entity. Covers the Party base (TPH, int key, PartyType discriminator), PartyRelation for party-to-party links, DTO inheritance from Info/Create

When not to use it

  • →When entities have their own rich schema and require a full scaffold
  • →When an entity needs its own table or a non-integer key
  • →When a read-only projection is needed

Limitations

  • →The key for entities implemented with this pattern is always `int`
  • →New properties on derived types must be nullable or defaulted
  • →Forgetting discriminator registration makes EF treat rows as base `Party`

How it compares

This skill offers a specialized pattern for small catalog entities, reusing a single table and inheritance, which is more efficient than scaffolding a full entity for each.

Compared to similar skills

party-tph-catalog side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
party-tph-catalog (this skill)03moNo flagsIntermediate
drizzle-orm324moNo flagsIntermediate
django-pro206moNo flagsIntermediate
event-store-design55moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry