part-model-maintainer

Maintain Discord Part domain models with canonical state and repository-backed persistence.

1.1k|250|Updated Aug 12, 2015
One-click install
npx skills add https://github.com/discord-php/DiscordPHP --skill part-model-maintainer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: part-model-maintainer
Source: https://github.com/discord-php/DiscordPHP/tree/main/.agents/skills/part-model-maintainer
Command: npx skills add https://github.com/discord-php/DiscordPHP --skill part-model-maintainer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Maintain consistent, canonical in-memory representations for Discord Part classes, ensuring raw attributes, typed access, and repository-backed persistence stay aligned.

Core Features & Use Cases

  • Enforces a unified Part contract across src/Discord/Parts, including fillable attributes, getters/setters, and repository bindings.
  • Guides developers on how to hydrate, mutate, and persist Part objects when adding or modifying Discord resources.
  • Helps maintain type safety and clear data flow for nested parts and repositories.

Quick Start

Load this skill when touching Part models to ensure changes respect canonical state, hydration, and persistence semantics.

Frequently Asked Questions about part-model-maintainer

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

FAQPage Schema
How do I maintain canonical state and type safety in Discord PHP Part models?

To maintain canonical state in Discord PHP Part models, you must enforce a unified contract using PartTrait, define fillable attributes, and bind repositories for hydration and persistence to ensure raw attributes and typed access stay aligned.

What is the best way to hydrate and persist Discord Part objects when adding new resources?

Hydrating and persisting Discord Part objects requires using the repository-backed fetch and save mechanisms, ensuring that raw attributes are correctly mutated and filled during object creation to maintain canonical in-memory state.

Why does my Discord Part model fail to save changes to the repository correctly?

Save failures in Discord Part models often occur when the class does not properly extend Discord\Parts\Part, lacks PartTrait usage, or has misconfigured fillable attributes preventing correct repository-backed persistence.

Do I need to use PartTrait when editing Discord PHP Part classes?

Yes, using PartTrait is required when editing Discord PHP Part classes to satisfy the core contract, ensuring correct hydration, typed access, and proper repository-backed save behavior across src/Discord/Parts.

Can I use custom getters and setters with Discord Part domain models?

Yes, Discord Part domain models support custom getters and setters, allowing you to enforce type safety and clear data flow while keeping raw attributes and repository-backed persistence aligned.

How does repository-backed persistence work for nested Discord Parts?

Repository-backed persistence for nested Discord Parts works by binding repositories to the parent Part class, managing hydration and type safety for nested objects during fetch and save operations to maintain canonical state.