abp-dependency-rules — angular abp-dependency-rules, abp, abpframework, community, angular, ai agent skill, ide skills, agent automation, architecture, aspnet, aspnet-core, aspnetcore

v1.0.0
GitHub

About this Skill

Perfect for ASP.NET Core Agents needing modular architecture and domain-driven design enforcement. ABP project layer dependency rules - which projects can reference which, domain/application/infrastructure separation, cross-layer violations to avoid. Use when reviewing project structure, adding new

# Core Topics

abpframework abpframework
[14.2k]
[3678]
Updated: 3/16/2026

Quality Score

Top 5%
46
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
> npx killer-skills add abpframework/abp/abp-dependency-rules
Supports 19+ Platforms
Cursor
Windsurf
VS Code
Trae
Claude
OpenClaw
+12 more

Agent Capability Analysis

The abp-dependency-rules skill by abpframework is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for angular, architecture, aspnet.

Ideal Agent Persona

Perfect for ASP.NET Core Agents needing modular architecture and domain-driven design enforcement.

Core Value

Empowers agents to enforce domain logic separation from infrastructure, utilize abstractions for dependencies, and ensure higher layers depend on lower layers, all while leveraging ASP.NET Core and dependency rules for robust enterprise software solutions.

Capabilities Granted for abp-dependency-rules

Enforcing domain-driven design principles in enterprise software
Implementing modular architecture with opinionated best practices
Validating dependency rules for layered template structures

! Prerequisites & Limits

  • Requires ASP.NET Core infrastructure
  • Limited to enterprise software solutions
  • Dependent on abstractions and repositories for data access
SKILL.md
Readonly

ABP Dependency Rules

Core Principles (All Templates)

These principles apply regardless of solution structure:

  1. Domain logic never depends on infrastructure (no DbContext in domain/application)
  2. Use abstractions (interfaces) for dependencies
  3. Higher layers depend on lower layers, never the reverse
  4. Data access through repositories, not direct DbContext

Layered Template Structure

Note: This section applies to layered templates (app, module). Single-layer and microservice templates have different structures.

Domain.Shared    → Constants, enums, localization keys
       ↑
    Domain       → Entities, repository interfaces, domain services
       ↑
Application.Contracts → App service interfaces, DTOs
       ↑
  Application    → App service implementations
       ↑
   HttpApi       → REST controllers (optional)
       ↑
     Host        → Final application with DI and middleware

Layered Dependency Direction

ProjectCan ReferenceReferenced By
Domain.SharedNothingAll
DomainDomain.SharedApplication, Data layer
Application.ContractsDomain.SharedApplication, HttpApi, Clients
ApplicationDomain, ContractsHost
EntityFrameworkCore/MongoDBDomainHost only
HttpApiContracts onlyHost

Critical Rules

❌ Never Do

csharp
1// Application layer accessing DbContext directly 2public class BookAppService : ApplicationService 3{ 4 private readonly MyDbContext _dbContext; // ❌ WRONG 5} 6 7// Domain depending on application layer 8public class BookManager : DomainService 9{ 10 private readonly IBookAppService _appService; // ❌ WRONG 11} 12 13// HttpApi depending on Application implementation 14public class BookController : AbpController 15{ 16 private readonly BookAppService _bookAppService; // ❌ WRONG - Use interface 17}

✅ Always Do

csharp
1// Application layer using repository abstraction 2public class BookAppService : ApplicationService 3{ 4 private readonly IBookRepository _bookRepository; // ✅ CORRECT 5} 6 7// Domain service using domain abstractions 8public class BookManager : DomainService 9{ 10 private readonly IBookRepository _bookRepository; // ✅ CORRECT 11} 12 13// HttpApi depending on contracts only 14public class BookController : AbpController 15{ 16 private readonly IBookAppService _bookAppService; // ✅ CORRECT 17}

Repository Pattern Enforcement

Interface Location

csharp
1// In Domain project 2public interface IBookRepository : IRepository<Book, Guid> 3{ 4 Task<Book> FindByNameAsync(string name); 5}

Implementation Location

csharp
1// In EntityFrameworkCore project 2public class BookRepository : EfCoreRepository<MyDbContext, Book, Guid>, IBookRepository 3{ 4 // Implementation 5} 6 7// In MongoDB project 8public class BookRepository : MongoDbRepository<MyDbContext, Book, Guid>, IBookRepository 9{ 10 // Implementation 11}

Multi-Application Scenarios

When you have multiple applications (e.g., Admin + Public API):

Vertical Separation

MyProject.Admin.Application      - Admin-specific services
MyProject.Public.Application     - Public-specific services
MyProject.Domain                 - Shared domain (both reference this)

Rules

  • Admin and Public application layers MUST NOT reference each other
  • Share domain logic, not application logic
  • Each vertical can have its own DTOs even if similar

Enforcement Checklist (Layered Templates)

When adding a new feature:

  1. Entity changes? → Domain project
  2. Constants/enums? → Domain.Shared project
  3. Repository interface? → Domain project (only if custom queries needed)
  4. Repository implementation? → EntityFrameworkCore/MongoDB project
  5. DTOs and service interface? → Application.Contracts project
  6. Service implementation? → Application project
  7. API endpoint? → HttpApi project (if not using auto API controllers)

Common Violations to Watch

ViolationImpactFix
DbContext in ApplicationBreaks DB independenceUse repository
Entity in DTOExposes internalsMap to DTO
IQueryable in interfaceBreaks abstractionReturn concrete types
Cross-module app service callTight couplingUse events or domain

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is abp-dependency-rules?

Perfect for ASP.NET Core Agents needing modular architecture and domain-driven design enforcement. ABP project layer dependency rules - which projects can reference which, domain/application/infrastructure separation, cross-layer violations to avoid. Use when reviewing project structure, adding new

How do I install abp-dependency-rules?

Run the command: npx killer-skills add abpframework/abp/abp-dependency-rules. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for abp-dependency-rules?

Key use cases include: Enforcing domain-driven design principles in enterprise software, Implementing modular architecture with opinionated best practices, Validating dependency rules for layered template structures.

Which IDEs are compatible with abp-dependency-rules?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for abp-dependency-rules?

Requires ASP.NET Core infrastructure. Limited to enterprise software solutions. Dependent on abstractions and repositories for data access.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add abpframework/abp/abp-dependency-rules. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use abp-dependency-rules immediately in the current project.

Related Skills

Looking for an alternative to abp-dependency-rules or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
Design

flags

Logo of vercel
vercel

The React Framework

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

98.6k
0
AI

antd-commit-msg

Logo of ant-design
ant-design

Generate a single-line commit message for ant-design by reading the projects git staged area and recent commit style. Use when the user asks for a commit message, says msg, commit msg, 写提交信息, or wants

97.8k
0
Design