abp-dependency-rules — angular abp-dependency-rules, community, angular, ide skills, architecture, aspnet, aspnet-core, aspnetcore, blazor, c-sharp, Claude Code

v1.0.0

关于此技能

适用于需要模块化架构和领域驱动设计强制的 ASP.NET Core 代理。 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 project references, or checking if a dependency direction is correct.

# 核心主题

abpframework abpframework
[14.2k]
[3678]
更新于: 3/16/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 4/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Concrete use-case guidance Explicit limitations and caution
Review Score
4/11
Quality Score
46
Canonical Locale
en
Detected Body Locale
en

适用于需要模块化架构和领域驱动设计强制的 ASP.NET Core 代理。 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 project references, or checking if a dependency direction is correct.

核心价值

赋予代理以强制域逻辑与基础设施分离、利用抽象依赖、确保更高层依赖于更低层,同时利用 ASP.NET Core 和依赖规则来实现强大的企业软件解决方案。

适用 Agent 类型

适用于需要模块化架构和领域驱动设计强制的 ASP.NET Core 代理。

赋予的主要能力 · abp-dependency-rules

在企业软件中强制实施领域驱动设计原则
使用有见解的最佳实践实现模块化架构
验证分层模板结构的依赖规则

! 使用限制与门槛

  • 需要 ASP.NET Core 基础设施
  • 仅限于企业软件解决方案
  • 依赖于抽象和存储库以访问数据

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The page lacks a strong recommendation layer.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

实验室 Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

常见问题与安装步骤

以下问题与步骤与页面结构化数据保持一致,便于搜索引擎理解页面内容。

? FAQ

abp-dependency-rules 是什么?

适用于需要模块化架构和领域驱动设计强制的 ASP.NET Core 代理。 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 project references, or checking if a dependency direction is correct.

如何安装 abp-dependency-rules?

运行命令:npx killer-skills add abpframework/abp/abp-dependency-rules。支持 Cursor、Windsurf、VS Code、Claude Code 等 19+ IDE/Agent。

abp-dependency-rules 适用于哪些场景?

典型场景包括:在企业软件中强制实施领域驱动设计原则、使用有见解的最佳实践实现模块化架构、验证分层模板结构的依赖规则。

abp-dependency-rules 支持哪些 IDE 或 Agent?

该技能兼容 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。可使用 Killer-Skills CLI 一条命令通用安装。

abp-dependency-rules 有哪些限制?

需要 ASP.NET Core 基础设施;仅限于企业软件解决方案;依赖于抽象和存储库以访问数据。

安装步骤

  1. 1. 打开终端

    在你的项目目录中打开终端或命令行。

  2. 2. 执行安装命令

    运行:npx killer-skills add abpframework/abp/abp-dependency-rules。CLI 会自动识别 IDE 或 AI Agent 并完成配置。

  3. 3. 开始使用技能

    abp-dependency-rules 已启用,可立即在当前项目中调用。

! 参考页模式

此页面仍可作为安装与查阅参考,但 Killer-Skills 不再把它视为主要可索引落地页。请优先阅读上方评审结论,再决定是否继续查看上游仓库说明。

Imported Repository Instructions

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

Supporting Evidence

abp-dependency-rules

安装 abp-dependency-rules,这是一款面向AI agent workflows and automation的 AI Agent Skill。支持 Claude Code、Cursor、Windsurf,一键安装。

SKILL.md
Readonly
Imported Repository Instructions
The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.
Supporting Evidence

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

相关技能

寻找 abp-dependency-rules 的替代方案 (Alternative) 或可搭配使用的同类 community Skill?探索以下相关开源技能。

查看全部

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

为prompts.chat的信息反馈系统生成可定制的插件小部件

149.6k
0
AI

flags

Logo of vercel
vercel

React 框架

138.4k
0
浏览器

pr-review

Logo of pytorch
pytorch

Python中具有强大GPU加速的张量和动态神经网络

98.6k
0
开发者工具