Agent skill

Abp Ddd

by abpframework in abpframework/abp

ABP DDD patterns - Entities, Aggregate Roots, value objects, Repositories, Domain Services, Domain Events, Specifications.

LGPL-3.0Auto-check passedDevelopment

Install Abp Ddd

skills CLI
$ npx skills add abpframework/abp --skill abp-ddd -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install abpframework/abp abp-ddd --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/abpframework/abp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/abp-ddd .claude/skills/abp-ddd && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
abp-ddd
GitHub stars
14k
Token cost
~2.1k tokens
SKILL.md length
433 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
LGPL-3.0

At a glance

ABP DDD patterns - Entities, Aggregate Roots, value objects, Repositories, Domain Services, Domain Events, Specifications.

  • Designing domain layer
  • SKILL.md covers Anti-Patterns to Avoid, Rich Domain Model vs Anemic…, Entities and Aggregate Roots, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Creating entities

What it does

Abp Ddd is an agent skill from abpframework/abp. ABP DDD patterns - Entities, Aggregate Roots, value objects, Repositories, Domain Services, Domain Events, Specifications. Use when designing domain layer, creating entities, repositories, or domain services in ABP projects.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Domain-driven design. The repository describes itself as: Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides… The licence is LGPL-3.0.

When your agent uses it

  • Designing domain layer
  • Creating entities
  • Domain services in ABP projects

Example prompts

  • “/abp-ddd”

What it can do on your machine

Read from SKILL.md and the folder at commit 329eaa8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • abp.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Abp Ddd loads about 2.1k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 433 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from abpframework/abp at commit 329eaa8, republished under its LGPL-3.0 licence (© abpframework). 433 words, ~2,117 tokens.

Download SKILL.mdSave it as .claude/skills/abp-ddd/SKILL.md (or your agent's skills folder).
name
abp-ddd
description
ABP DDD patterns - Entities, Aggregate Roots, value objects, Repositories, Domain Services, Domain Events, Specifications. Use when designing domain layer, creating entities, repositories, or domain services in ABP projects.

ABP DDD Patterns

Docs: https://abp.io/docs/latest/framework/architecture/domain-driven-design

Anti-Patterns to Avoid

  • Anemic entities: public setters with no behavior — use private setters + methods that enforce invariants
  • Repository for child entities: only aggregate roots get repositories — access child entities through their root
  • Generating GUID in entity constructor: use IGuidGenerator from outside and pass id parameter
  • Navigation properties to other aggregates: reference by Id only, never add full navigation properties across aggregates
  • Domain service depending on current user: accept values from the application layer instead

Rich Domain Model vs Anemic Domain Model

ABP promotes Rich Domain Model pattern where entities contain both data AND behavior:

Anemic (Anti-pattern)Rich (Recommended)
Entity = data onlyEntity = data + behavior
Logic in servicesLogic in entity methods
Public settersPrivate setters with methods
No validation in entityEntity enforces invariants

Encapsulation is key: Protect entity state by using private setters and exposing behavior through methods.

Entities

Entity Example (Rich Model)
csharp
public class OrderLine : Entity<Guid>
{
    public Guid ProductId { get; private set; }
    public int Count { get; private set; }
    public decimal Price { get; private set; }

    protected OrderLine() { } // For ORM

    internal OrderLine(Guid id, Guid productId, int count, decimal price) : base(id)
    {
        ProductId = productId;
        SetCount(count); // Validates through method
        Price = price;
    }

    public void SetCount(int count)
    {
        if (count <= 0)
            throw new BusinessException("Orders:InvalidCount");
        Count = count;
    }
}

Aggregate Roots

Aggregate roots are consistency boundaries that:

  • Own their child entities
  • Enforce business rules
  • Publish domain events
csharp
public class Order : AggregateRoot<Guid>
{
    public string OrderNumber { get; private set; }
    public Guid CustomerId { get; private set; }
    public OrderStatus Status { get; private set; }
    public ICollection<OrderLine> Lines { get; private set; }

    protected Order() { } // For ORM

    public Order(Guid id, string orderNumber, Guid customerId) : base(id)
    {
        OrderNumber = Check.NotNullOrWhiteSpace(orderNumber, nameof(orderNumber));
        CustomerId = customerId;
        Status = OrderStatus.Created;
        Lines = new List<OrderLine>();
    }

    public void AddLine(Guid lineId, Guid productId, int count, decimal price)
    {
        // Business rule: Can only add lines to created orders
        if (Status != OrderStatus.Created)
            throw new BusinessException("Orders:CannotModifyOrder");

        Lines.Add(new OrderLine(lineId, productId, count, price));
    }

    public void Complete()
    {
        if (Status != OrderStatus.Created)
            throw new BusinessException("Orders:CannotCompleteOrder");

        Status = OrderStatus.Completed;

        // Publish events for side effects
        AddLocalEvent(new OrderCompletedEvent(Id));           // Same transaction
        AddDistributedEvent(new OrderCompletedEto { OrderId = Id }); // Cross-service
    }
}
Domain Events
  • AddLocalEvent() - Handled within same transaction, can access full entity
  • AddDistributedEvent() - Handled asynchronously, use ETOs (Event Transfer Objects)
Entity Best Practices
  • Encapsulation: Private setters, public methods that enforce rules
  • Primary constructor: Enforce invariants, accept id parameter
  • Protected parameterless constructor: Required for ORM
  • Initialize collections: In primary constructor
  • Virtual members: For ORM proxy compatibility
  • Reference by Id: Don't add navigation properties to other aggregates
  • Don't generate GUID in constructor: Use IGuidGenerator externally

Repository Pattern

When to Use Custom Repository
  • Generic repository (IRepository<T, TKey>): Sufficient for simple CRUD operations
  • Custom repository: Only when you need custom query methods
Show full SKILL.md (169 more words)Show less
Interface (Domain Layer)
csharp
// Define custom interface only when custom queries are needed
public interface IOrderRepository : IRepository<Order, Guid>
{
    Task<Order> FindByOrderNumberAsync(string orderNumber, bool includeDetails = false);
    Task<List<Order>> GetListByCustomerAsync(Guid customerId, bool includeDetails = false);
}
Repository Best Practices
  • One repository per aggregate root only - Never create repositories for child entities
  • Child entities must be accessed/modified only through their aggregate root
  • Creating repositories for child entities breaks data consistency (bypasses aggregate root's business rules)
  • In ABP, use AddDefaultRepositories() without includeAllEntities: true to enforce this
  • Define custom repository only when custom queries are needed
  • ABP handles CancellationToken automatically; add parameter only for explicit cancellation control
  • Single entity methods: includeDetails = true by default
  • List methods: includeDetails = false by default
  • Don't return projection classes
  • Interface in Domain, implementation in data layer
csharp
// ✅ Correct: Repository for aggregate root (Order)
public interface IOrderRepository : IRepository<Order, Guid> { }

// ❌ Wrong: Repository for child entity (OrderLine)
// OrderLine should only be accessed through Order aggregate
public interface IOrderLineRepository : IRepository<OrderLine, Guid> { } // Don't do this!

Domain Services

Use domain services for business logic that:

  • Spans multiple aggregates
  • Requires repository queries to enforce rules
csharp
public class OrderManager : DomainService
{
    private readonly IOrderRepository _orderRepository;
    private readonly IProductRepository _productRepository;

    public OrderManager(
        IOrderRepository orderRepository,
        IProductRepository productRepository)
    {
        _orderRepository = orderRepository;
        _productRepository = productRepository;
    }

    public async Task<Order> CreateAsync(string orderNumber, Guid customerId)
    {
        // Business rule: Order number must be unique
        var existing = await _orderRepository.FindByOrderNumberAsync(orderNumber);
        if (existing != null)
        {
            throw new BusinessException("Orders:OrderNumberAlreadyExists")
                .WithData("OrderNumber", orderNumber);
        }

        return new Order(GuidGenerator.Create(), orderNumber, customerId);
    }

    public async Task AddProductAsync(Order order, Guid productId, int count)
    {
        var product = await _productRepository.GetAsync(productId);
        order.AddLine(productId, count, product.Price);
    }
}
Domain Service Best Practices
  • Use *Manager suffix naming
  • No interface by default (create only if needed)
  • Accept/return domain objects, not DTOs
  • Don't depend on authenticated user - pass values from application layer
  • Use base class properties (GuidGenerator, Clock) instead of injecting these services

Domain Events

Local Events
csharp
// In aggregate
AddLocalEvent(new OrderCompletedEvent(Id));

// Handler
public class OrderCompletedEventHandler : ILocalEventHandler<OrderCompletedEvent>, ITransientDependency
{
    public async Task HandleEventAsync(OrderCompletedEvent eventData)
    {
        // Handle within same transaction
    }
}
Distributed Events (ETO)

For inter-module/microservice communication:

csharp
// In Domain.Shared
[EventName("Orders.OrderCompleted")]
public class OrderCompletedEto
{
    public Guid OrderId { get; set; }
    public string OrderNumber { get; set; }
}

Specifications

Reusable query conditions:

csharp
public class CompletedOrdersSpec : Specification<Order>
{
    public override Expression<Func<Order, bool>> ToExpression()
    {
        return o => o.Status == OrderStatus.Completed;
    }
}

// Usage
var orders = await _orderRepository.GetListAsync(new CompletedOrdersSpec());

© abpframework, LGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/abp-ddd of abpframework/abp.

Open the folder on GitHubat commit 329eaa8

Compare with similar skills

Abp Ddd next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Abp Ddd compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Abp Ddd this skillabpframework/abp14k—~2.1kAutomated safety check: PassLGPL-3.0
Domain Modelingfossasia/eventyay-interpretation1.6k31 repos~821Automated safety check: PassApache-2.0
Architecture Governancezai-org/ZCode7.6k—~1.2kAutomated safety check: PassApache-2.0
Evolutionary Modular Architecturetech-leads-club/agent-skills7k—~3.7kAutomated safety check: PassCC-BY-4.0
Domain Modelingbrim-borium/spotify_sdk1665 repos~806Automated safety check: PassApache-2.0
Domain Modeling and Glossarywindmill-labs/windmill18k—~622Automated safety check: PassCustom licence

Similar skills

  • Domain Modeling

    fossasia/eventyay-interpretation

    Build and sharpen a project's domain model. An agent skill from fossasia/eventyay-interpretation.

    1.6k GitHub starsUsed in 31 repos~821 tokens
    DevelopmentAuto-check passed
  • Apply the repository's architecture policy to code changes by generating a bounded context package, checking module and layer boundaries, and reporting baseline-aware violations.

    7.6k GitHub stars~1.2k tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Evolutionary Modular Architecture

    tech-leads-club/agent-skills

    Guides design of modular-monolith platforms with DDD, flat-by-aggregate modules, anti-corruption layers, outbox events and resilience, plus an architecture document with SVG diagrams.

    7k GitHub stars~3.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Domain Modeling

    brim-borium/spotify_sdk

    Build and sharpen a project's domain model. An agent skill from brim-borium/spotify_sdk.

    166 GitHub starsUsed in 5 repos~806 tokens
    DevelopmentAuto-check passed
  • Domain Modeling and Glossary

    windmill-labs/windmill

    Actively challenges vague or conflicting terminology as you design, and keeps a living domain glossary file up to date in real time.

    18k GitHub stars~622 tokensUpdated today
    DevelopmentAuto-check passed
  • Ddd

    swamp-club/swamp

    Domain Driven Design guidance for TypeScript/Deno codebases.

    644 GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed

More from abpframework/abp

All 18 skills in this repo
  • Abp Angular

    abpframework/abp

    ABP Angular UI patterns - generate-proxy, ListService, PermissionGuard, abpLocalization pipe, ConfirmationService, ToasterService, ConfigStateService.

    14k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Abp App Nolayers

    abpframework/abp

    ABP Single-Layer (No-Layers / nolayers) application template - single project structure, feature-based file organization, no separate Domain/Application.Contracts projects.

    14k GitHub stars~575 tokensUpdated today
    Auto-check passed
  • Abp Application Layer

    abpframework/abp

    ABP Application Services, DTOs, CRUD service, object mapping (Mapperly/AutoMapper), validation, error handling.

    14k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Abp Authorization

    abpframework/abp

    ABP permission system - PermissionDefinitionProvider, [Authorize] attribute, CheckPolicyAsync, IsGrantedAsync, ICurrentUser, IPermissionManager, multi-tenancy side.

    14k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Abp Blazor

    abpframework/abp

    ABP Blazor UI patterns - AbpComponentBase, AbpCrudPageBase, DataGrid, IMenuContributor, Message/Notify, Validations, JavaScript interop.

    14k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Abp CLI

    abpframework/abp

    ABP CLI commands - generate-proxy, install-libs, add-package-ref, new-module, install-module, abp update, abp clean, abp suite generate.

    14k GitHub stars~633 tokensUpdated today
    Auto-check passed

Categories

Questions about Abp Ddd

What does Abp Ddd do?

ABP DDD patterns - Entities, Aggregate Roots, value objects, Repositories, Domain Services, Domain Events, Specifications. Abp Ddd is an agent skill from abpframework/abp. ABP DDD patterns - Entities, Aggregate Roots, value objects, Repositories, Domain Services, Domain Events, Specifications.

When should I use Abp Ddd?

Abp Ddd fits situations like: designing domain layer; creating entities; domain services in ABP projects.

How do I install Abp Ddd in Claude Code?

Run `npx skills add abpframework/abp --skill abp-ddd -a claude-code`. Or copy the skill folder (.agents/skills/abp-ddd in abpframework/abp) into .claude/skills/abp-ddd in your project. Claude Code loads it when a task matches its description.

How do I install Abp Ddd in Codex?

Run `npx skills add abpframework/abp --skill abp-ddd -a codex`. Or copy the skill folder (.agents/skills/abp-ddd in abpframework/abp) into .agents/skills/abp-ddd in your project. Codex loads it when a task matches its description.

Can I use Abp Ddd in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add abpframework/abp --skill abp-ddd -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/abp-ddd, .gemini/skills/abp-ddd, .github/skills/abp-ddd and .opencode/skills/abp-ddd in your project.

What does Abp Ddd need to run?

SKILL.md names no scripts, command-line tools or credentials: Abp Ddd is instructions for the agent only.

Does Abp Ddd access the network?

SKILL.md names 1 domain. As links in the text: abp.io. This is read from the text; nothing was executed.

Is Abp Ddd safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Abp Ddd use?

Abp Ddd is published under the LGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Abp Ddd use?

About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Abp Ddd?

Skills that share tags, products or a category with Abp Ddd: Domain Modeling (fossasia/eventyay-interpretation, 1.6k stars), Architecture Governance (zai-org/ZCode, 7.6k stars), Evolutionary Modular Architecture (tech-leads-club/agent-skills, 7k stars) and Domain Modeling (brim-borium/spotify_sdk, 166 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Abp Ddd?

abpframework (a GitHub organization) maintains it in abpframework/abp, which has 14,445 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on October 9, 2026.

Source: abpframework/abp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.