onion-architecture

Generate Rust DDD aggregates across domain, application, infrastructure, and API layers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the tedious and error-prone work of manually writing Rust DDD code that violates onion architecture layer dependency rules, which leads to tight coupling and hard-to-maintain domain logic.

Core Features & Use Cases

  • End-to-end aggregate generation: Creates complete, production-ready code for new aggregates across all four layers (domain, application, infrastructure, API) following strict DDD and onion architecture patterns.
  • Existing code validation and fixes: Audits existing code to ensure correct dependency direction (inner layers never depend on outer layers) and fixes violations.
  • Use case: Add a new Book aggregate to the existing book manager API, or extend the User domain with new validation rules without breaking layer boundaries.

Quick Start

Use the onion-architecture skill to add a new Book aggregate with full domain, application, infrastructure, and API layer implementation to the existing Rust book manager project.

Frequently Asked Questions about onion-architecture

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

FAQPage Schema
How do I generate Rust DDD boilerplate for a new aggregate?

Generating Rust DDD boilerplate for a new aggregate automatically creates code across domain, application, infrastructure, and API layers. This enforces strict separation of concerns and domain logic purity following onion architecture principles.

How do I audit existing Rust code for onion architecture dependency violations?

Auditing existing Rust code for onion architecture dependency violations checks the dependency flow between domain, application, infrastructure, and API layers. This ensures inner layers never depend on outer layers, identifying and fixing coupling issues automatically.

Does this DDD code generation work with Axum and SeaORM?

Yes, this DDD code generation works with Axum and SeaORM technical stacks. It generates CQRS-aligned persistence patterns and API handlers compatible with these frameworks, ensuring proper integration across the infrastructure and API layers.

What is the best way to add a new entity to an existing Rust domain without breaking layer boundaries?

The best way to add a new entity to an existing Rust domain without breaking layer boundaries is using end-to-end aggregate generation. This creates production-ready code across all four layers while enforcing strict separation of concerns and domain logic purity.

Why does my Rust DDD application have tight coupling and hard-to-maintain domain logic?

Your Rust DDD application has tight coupling and hard-to-maintain domain logic due to manual boilerplate that violates onion architecture layer dependency rules. Auditing the code ensures correct dependency direction where inner layers never depend on outer layers.