new-entity

Generate Go domain entities and repository interfaces following Domain-Driven Design.

2|1|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/solrac97gr/marketplace-plugins --skill new-entity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-entity
Source: https://github.com/solrac97gr/marketplace-plugins/tree/main/plugins/go-dev/skills/new-entity
Command: npx skills add https://github.com/solrac97gr/marketplace-plugins --skill new-entity

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of domain entities and their corresponding repository interfaces, adhering to Domain-Driven Design (DDD) principles, to streamline backend development.

Core Features & Use Cases

  • Entity Generation: Creates Go structs for domain entities with constructors and business logic methods.
  • Repository Interface Creation: Defines persistence contracts for entities.
  • Value Object Support: Facilitates the creation of reusable value objects.
  • Unit Testing: Generates basic unit tests for entities.
  • Use Case: When starting a new feature in a Go backend project, use this Skill to quickly scaffold the core domain entities and their data access patterns, ensuring consistency and adherence to DDD.

Quick Start

Use the new-entity skill to create a 'Product' entity in the 'catalog' domain with 'id', 'name', and 'price' fields.

Frequently Asked Questions about new-entity

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

FAQPage Schema
How do I create domain entities in Go following Domain-Driven Design principles?

To create DDD domain entities in Go, you generate structs equipped with constructors and encapsulated business logic methods. This approach promotes rich domain models that enforce business invariants within the entity itself.

What is the best way to scaffold repository interfaces for Go backend development?

The best way to scaffold repository interfaces for Go backend development is by generating persistence contracts directly tied to your domain entities. This defines clear data access patterns while maintaining separation from infrastructure implementation.

Can I generate unit tests for value objects and entities in a Go DDD architecture?

Yes, you can generate unit tests for value objects and entities in a Go DDD architecture. The process creates basic test scaffolds alongside your domain structs to validate encapsulated behavior and business logic.

Does DDD entity generation in Go align with standard style guides like Uber's?

DDD entity generation in Go aligns with standard style guides like Uber's by referencing the Uber Go Style Guide for code quality enforcement. This ensures generated structs and repositories follow community best practices.

When do I need value objects in Domain-Driven Design with Go?

You need value objects in Domain-Driven Design with Go when representing domain concepts identified by their attributes rather than identity. Creating reusable value objects ensures validation logic is centralized and immutable.