domain-layer

Enforce Rust DDD domain conventions in the rust-ddd-book-manager project.

Updated Jan 11, 2026
One-click install
npx skills add https://github.com/nftug/rust-ddd-book-manager --skill domain-layer-nftug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-layer
Source: https://github.com/nftug/rust-ddd-book-manager/tree/main/.agents/skills/domain-layer
Command: npx skills add https://github.com/nftug/rust-ddd-book-manager --skill domain-layer-nftug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates inconsistent domain layer implementation in the rust-ddd-book-manager project by enforcing the repository's established DDD conventions, ensuring domain purity and proper layer separation between crates.

Core Features & Use Cases

  • Pattern-Aligned Implementation: Guides you to add or modify aggregates, value objects, entities, and repository traits that exactly match the existing book and user aggregate patterns used in the project.
  • Rule Enforcement: Automatically enforces core DDD rules including separation of persistence hydration and input validation, encapsulation of state changes within entities, and mandatory audit/permission checks for all entity updates.
  • Use Case: When adding a new book reservation aggregate to the project, this Skill ensures the implementation follows all existing domain conventions without introducing forbidden cross-crate dependencies.

Quick Start

Use the domain-layer skill to implement a new book checkout event aggregate in the domain crate that adheres to the repository's existing entity and value object patterns.

Frequently Asked Questions about domain-layer

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

FAQPage Schema
How do I implement a Rust DDD domain layer without cross-crate dependencies?

Building a Rust DDD domain layer without cross-crate dependencies requires enforcing strict domain purity and layer separation. This Skill ensures aggregates, value objects, and entities remain isolated by preventing forbidden cross-crate imports and encapsulating state changes exclusively within the domain crate.

What's the best way to structure Rust repository traits for domain-driven design?

Structuring Rust repository traits for domain-driven design involves matching established aggregate patterns. This Skill guides you to implement repository traits that align with existing book and user aggregate conventions, separating persistence hydration from input validation to maintain a pure domain layer.

Why does my Rust DDD aggregate break when mixing input validation with persistence hydration?

Mixing input validation with persistence hydration in a Rust DDD aggregate breaks domain purity. This Skill enforces the separation of these concerns, ensuring persistence hydration logic is isolated from input validation to maintain consistent domain layer implementation across aggregates, entities, and value objects.

How do I add mandatory audit and permission checks to Rust DDD entities?

Adding mandatory audit and permission checks to Rust DDD entities requires encapsulating state changes within the entity itself. This Skill enforces these rules automatically, ensuring all entity updates include proper audit logic and permission validations before any state modification occurs in the domain crate.

Can I use this Skill to add a new aggregate to an existing Rust DDD project?

Yes, you can use this Skill to add new aggregates to an existing Rust DDD project. It enforces repository conventions for adding or modifying aggregates, value objects, and entities, ensuring new implementations like a book checkout event aggregate match established domain patterns without introducing cross-crate dependencies.

When do I need to enforce domain purity in a Rust software architecture project?

You need to enforce domain purity in a Rust software architecture project whenever adding or modifying domain layer components like aggregates, repository traits, or entities. This Skill ensures layer separation is maintained, preventing cross-crate dependencies and keeping state changes encapsulated within the domain crate.