abp-framework-patterns
БесплатноБез исполняемых скриптовНе проверенMaster ABP Framework patterns including repository pattern, unit of work, domain services, application services, authorization, multi-tenancy, background…
от thapaliyabikendra★ 25 звёзд на GitHubОб этом скилле
ABP Framework Patterns
Master ABP Framework patterns for building maintainable, scalable applications following Domain-Driven Design principles.
This skill orchestrates three focused skills:
| Skill | Focus | Key Patterns |
|---|---|---|
abp-entity-patterns |
Domain layer | Entity, Repository, DomainService, DataSeeding |
abp-service-patterns |
Application layer | AppService, DTOs, Mapperly, UoW, Filter DTOs |
abp-infrastructure-patterns |
Cross-cutting | Permissions, BackgroundJobs, Events, Multi-tenancy |
Quick Reference
Architecture Layers
Domain.Shared → Constants, enums, shared types
Domain → Entities, repositories, domain services, domain events
Application.Contracts → DTOs, application service interfaces
Application → Application services, mapper profiles, validators
EntityFrameworkCore → DbContext, repository implementations
HttpApi → Controllers (auto-generated by ABP)
HttpApi.Host → Startup, configuration
Common Patterns
| Pattern | Location | When to Use |
|---|---|---|
| Entity | Domain | Business data with identity |
| Repository | Domain + EFC | Custom data access queries |
| Domain Service | Domain | Cross-entity business logic |
| AppService | Application | Orchestration, authorization, mapping |
| CrudAppService | Application | Simple CRUD without custom logic |
| Validator | Application | Input DTO validation |
| Permission | Domain.Shared | Access control |
| Background Job | Application | Async/delayed processing |
| Distributed Event | Domain/App | Module decoupling |
Entity Patterns
Standard Entity with Encapsulation
public class Patient : FullAuditedAggregateRoot<Guid>
{
public string FirstName { get; private set; } = string.Empty;
public string LastName { get; private set; } = string.Empty;
public string Email { get; private set; } = string.Empty;
public bool IsActive { get; private set; } = true;
// Required for EF Core
protected Patient() { }
public Patient(Guid id, string firstName, string lastName, string email) : base(id)
{
SetName(firstName, lastName);
SetEmail(email);
}
public void SetName(string firstName, string lastName)
{
FirstName = Check.NotNullOrWhiteSpace(firstName, nameof(firstName), maxLength: PatientConsts.MaxFirstNameLength);
LastName = Check.NotNullOrWhiteSpace(lastName, nameof(lastName), maxLength: PatientConsts.MaxLastNameLength);
}
public void SetEmail(string email)
{
Email = Check.NotNullOrWhiteSpace(email, nameof(email), maxLength: PatientConsts.MaxEmailLength);
}
public void Activate() => IsActive = true;
public void Deactivate() => IsActive = false;
}
Constants Class
// Domain.Shared/{Feature}/{Entity}Consts.cs
namespace {ProjectName}.{Feature};
public static class PatientConsts
{
public const int MaxFirstNameLength = 100;
public const int MaxLastNameLength = 100;
public const int MaxEmailLength = 256;
}
AppService Patterns
Standard AppService (Recommended)
[Authorize({ProjectName}Permissions.Patients.Default)]
public class PatientAppService : ApplicationService, IPatientAppService
{
private readonly IRepository<Patient, Guid> _patientRepository;
public PatientAppService(IRepository<Patient, Guid> patientRepository)
{
_patientRepository = patientRepository;
}
public async Task<PagedResultDto<PatientDto>> GetListAsync(GetPatientsInput input)
{
var queryable = await _patientRepository.GetQueryableAsync();
var query = queryable
.WhereIf(!input.Filter.IsNullOrWhiteSpace(),
x => x.FirstName.Contains(input.Filter!) || x.LastName.Contains(input.Filter!))
.WhereIf(input.IsActive.HasValue, x => x.IsActive == input.IsActive);
var totalCount = await AsyncExecuter.CountAsync(query);
var patients = await AsyncExecuter.ToListAsync(
query
.OrderBy(input.Sorting.IsNullOrWhiteSpace() ? nameof(Patient.LastName) : input.Sorting)
.PageBy(input));
return new PagedResultDto<PatientDto>(totalCount, patients.ToDto());
}
public async Task<PatientDto> GetAsync(Guid id)
{
var patient = await _patientRepository.GetAsync(id);
return patient.ToDto();
}
[Authorize({ProjectName}Permissions.Patients.Create)]
public async Task<PatientDto> CreateAsync(CreatePatientDto input)
{
var patient = new Patient(
GuidGenerator.Create(),
input.FirstName,
input.LastName,
input.Email);
await _patientRepository.InsertAsync(patient, autoSave: true);
return patient.ToDto();
}
[Authorize({ProjectName}Permissions.Patients.Edit)]
public async Task<PatientDto> UpdateAsync(Guid id, UpdatePatientDto input)
{
var
Установить abp-framework-patterns в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл abp-framework-patterns?
Master ABP Framework patterns including repository pattern, unit of work, domain services, application services, authorization, multi-tenancy, background jobs, and distributed events. Use when: (1) building ABP-based applications with DDD architecture, (2) creating CRUD services with Entity, AppService, DTOs, validators, (3) handling authorization/permissions, (4) generating ABP module code.
Как установить скилл abp-framework-patterns?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл abp-framework-patterns запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic