Agent skill

Abp Dependency Rules

by abpframework in abpframework/abp

ABP project layer dependency rules - which projects can reference which, domain/application/infrastructure separation, cross-layer violations to avoid.

LGPL-3.0Auto-check passed

Install Abp Dependency Rules

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

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

GitHub CLI
$ gh skill install abpframework/abp abp-dependency-rules --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-dependency-rules .claude/skills/abp-dependency-rules && 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-dependency-rules
GitHub stars
14k
Token cost
~1.2k tokens
SKILL.md length
251 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
LGPL-3.0

At a glance

ABP project layer dependency rules - which projects can reference which, domain/application/infrastructure separation, cross-layer violations to avoid.

  • Works in 4 steps: Domain logic never depends on… → Use abstractions (interfaces) for… → Higher layers depend on lower layers,… → …
  • Reviewing project structure
  • SKILL.md covers Core Principles (All Templates), Layered Template Structure, Critical Rules and Repository Pattern Enforcement, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Abp Dependency Rules is an agent skill from abpframework/abp. 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.

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

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

  • Reviewing project structure
  • Adding new project references
  • Checking if a dependency direction is correct

Example prompts

  • “/abp-dependency-rules”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  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

What it can do on your machine

Read from SKILL.md and the folder at commit a54b599. 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

    No URLs in SKILL.md.

    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 Dependency Rules loads about 1.2k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 251 words of instructions outside code blocks.

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

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 a54b599, republished under its LGPL-3.0 licence (© abpframework). 251 words, ~1,156 tokens.

Download SKILL.mdSave it as .claude/skills/abp-dependency-rules/SKILL.md (or your agent's skills folder).
name
abp-dependency-rules
description
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

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
// Application layer accessing DbContext directly
public class BookAppService : ApplicationService
{
    private readonly MyDbContext _dbContext; // ❌ WRONG
}

// Domain depending on application layer
public class BookManager : DomainService
{
    private readonly IBookAppService _appService; // ❌ WRONG
}

// HttpApi depending on Application implementation
public class BookController : AbpController
{
    private readonly BookAppService _bookAppService; // ❌ WRONG - Use interface
}
✅ Always Do
csharp
// Application layer using repository abstraction
public class BookAppService : ApplicationService
{
    private readonly IBookRepository _bookRepository; // ✅ CORRECT
}

// Domain service using domain abstractions
public class BookManager : DomainService
{
    private readonly IBookRepository _bookRepository; // ✅ CORRECT
}

// HttpApi depending on contracts only
public class BookController : AbpController
{
    private readonly IBookAppService _bookAppService; // ✅ CORRECT
}

Repository Pattern Enforcement

Interface Location
csharp
// In Domain project
public interface IBookRepository : IRepository<Book, Guid>
{
    Task<Book> FindByNameAsync(string name);
}
Implementation Location
csharp
// In EntityFrameworkCore project
public class BookRepository : EfCoreRepository<MyDbContext, Book, Guid>, IBookRepository
{
    // Implementation
}

// In MongoDB project
public class BookRepository : MongoDbRepository<MyDbContext, Book, Guid>, IBookRepository
{
    // Implementation
}

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

© 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-dependency-rules of abpframework/abp.

Open the folder on GitHubat commit a54b599

Compare with similar skills

Abp Dependency Rules 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 Dependency Rules compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Abp Dependency Rules this skillabpframework/abp14k—~1.2kAutomated safety check: PassLGPL-3.0
Dependency Scanningsickn33/agentic-awesome-skills47k1 repos~2.4kAutomated safety check: PassMIT
Dependency Checkruvnet/ruflo74k—~258Automated safety check: PassMIT
Dependency Updatecodewhale-hq/Codewhale41k—~142Automated safety check: PassMIT
Bump Sentry Dependencygetsentry/sentry46k—~815Automated safety check: PassCustom licence
Logseq Dependency Upgradelogseq/logseq45k—~1.1kAutomated safety check: PassAGPL-3.0

Similar skills

  • Dependency Scanning

    sickn33/agentic-awesome-skills

    Scan package dependencies for known vulnerabilities using Snyk, Dependabot, and OWASP Dependency-Check.

    47k GitHub starsUsed in 1 repo~2.4k tokens
    SecurityAuto-check passed
  • Dependency Check

    ruvnet/ruflo

    Scan project dependencies for known vulnerabilities and CVEs.

    74k GitHub stars~258 tokensUpdated today
    SecurityAuto-check passed
  • Dependency Update

    codewhale-hq/Codewhale

    Read release notes/changelogs, update a defined dependency scope, handle breaking changes, and verify.

    41k GitHub stars~142 tokensUpdated today
    DevelopmentAuto-check passed
  • Bump Sentry Dependency

    getsentry/sentry

    Official

    Bumps an existing Python dependency in getsentry/sentry through the repository's self-serve GitHub Actions workflow.

    46k GitHub stars~815 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Audit, plan, and refresh dependency upgrades for the Logseq repository by scanning every non-gitignored package.json, deps.edn, bb.edn and nbb.edn manifest, checking latest upstream versions…

    45k GitHub stars~1.1k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Audit Dependencies

    payloadcms/payload

    A skill your agent uses when fixing dependency vulnerabilities, running pnpm audit, or when the audit-dependencies CI check fails

    45k GitHub stars~2.8k tokensUpdated today
    SecurityAuto-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

Questions about Abp Dependency Rules

What does Abp Dependency Rules do?

ABP project layer dependency rules - which projects can reference which, domain/application/infrastructure separation, cross-layer violations to avoid. Abp Dependency Rules is an agent skill from abpframework/abp. ABP project layer dependency rules - which projects can reference which, domain/application/infrastructure separation, cross-layer violations to avoid.

When should I use Abp Dependency Rules?

Abp Dependency Rules fits situations like: reviewing project structure; adding new project references; checking if a dependency direction is correct.

How do I install Abp Dependency Rules in Claude Code?

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

How do I install Abp Dependency Rules in Codex?

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

Can I use Abp Dependency Rules 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-dependency-rules -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-dependency-rules, .gemini/skills/abp-dependency-rules, .github/skills/abp-dependency-rules and .opencode/skills/abp-dependency-rules in your project.

What does Abp Dependency Rules need to run?

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

Does Abp Dependency Rules access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Abp Dependency Rules 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 Dependency Rules use?

Abp Dependency Rules 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 Dependency Rules use?

About 1.2k tokens (SKILL.md is roughly 4.6k 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 Dependency Rules?

Skills that share tags, products or a category with Abp Dependency Rules: Dependency Scanning (sickn33/agentic-awesome-skills, 47k stars), Dependency Check (ruvnet/ruflo, 74k stars), Dependency Update (codewhale-hq/Codewhale, 41k stars) and Bump Sentry Dependency (getsentry/sentry, 46k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Abp Dependency Rules?

abpframework (a GitHub organization) maintains it in abpframework/abp, which has 14,443 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on October 8, 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.