ワンクリックで
clean-architecture-rules
Enforce inward-only dependencies, correct layer ownership, and repository boundaries in Clean Architecture changes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Enforce inward-only dependencies, correct layer ownership, and repository boundaries in Clean Architecture changes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Run the canonical build plus all nine per-project test commands from docs/TESTING.md. Never uses solution-level dotnet test.
Create or re-baseline lean, repository-grounded implementation plans and persistent dev docs when users ask for an implementation plan, technical plan, feature plan, refactor plan, or dev-docs workstream.
Senior CTO review workflow for repository-grounded implementation-plan workstreams used before coding.
Apply project EF Core conventions for repositories, DbContext setup, query filters, migrations, and seeded lookup data.
Create a self-contained HTML artifact focused on a high-quality SVG architecture or system diagram with minimal supporting prose.
Create a pragmatic self-contained HTML plan that organizes the user's plan content visually without expanding the scope unnecessarily.
| name | clean-architecture-rules |
| description | Enforce inward-only dependencies, correct layer ownership, and repository boundaries in Clean Architecture changes. |
| type | guardrail |
| enforcement | block |
| priority | critical |
Use this skill to stop dependency-direction violations before they spread across Explore.Domain, Explore.Application, Explore.Persistence, and API or Blazor composition code. It protects the layer contract more than any single implementation detail.
Explore.Domain/**/*.cs, Explore.Application/**/*.cs, Explore.Persistence/**/*.cs, Explore.API/**/*.cs, Explore.Blazor/**/*.cs.add-cqrs-handler, add-get-endpoint, add-write-endpoint, update-repository-query, add-ef-migration.IValidator<T> must not be injected through DI.ExploreDbContext directly, which bypasses repository abstractions and couples handlers to persistence concerns.DataAnnotations validation, which moves request validation into the wrong layer and undermines handler control.namespace Explore.Domain.Entities;
public class Event
{
public Guid Id { get; private set; }
public string Title { get; private set; } = string.Empty;
public Event(Guid id, string title)
{
Id = id;
Title = title;
}
}
namespace Explore.Application.Features.Events.Queries;
public sealed class GetEventByIdHandler(IEventRepository repository)
{
public async Task<EventDto?> Handle(Guid id, CancellationToken cancellationToken)
{
Event? entity = await repository.GetByIdAsync(id, cancellationToken);
return entity is null
? null
: new EventDto(entity.Id, entity.Title);
}
}
dotnet test --project Event.Architecture.Tests/Event.Architecture.Tests.csproj --configuration Release --verbosity quiet --filter FullyQualifiedName~Event.Architecture.Tests.CleanArchitectureTestsdotnet test --project Event.Architecture.Tests/Event.Architecture.Tests.csproj --configuration Release --verbosity quiet --filter FullyQualifiedName~Event.Architecture.Tests.NamingConventionTestsdotnet build --configuration Release --verbosity quiet