architecture-guard

Community

Enforce Java DDD layer boundaries and safety

AuthorXunzi229
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents improper layer dependencies, naming violations, and unsafe data flow in Java DDD and Clean Architecture projects so that Controllers, Application services, Domain, and Infrastructure responsibilities remain correctly separated and auditable.

Core Features & Use Cases

  • Static import and package scanning: Analyzes Java source files to detect forbidden cross-layer imports such as Controller -> Mapper/Repository or Domain -> external SDKs.
  • Naming and responsibility enforcement: Validates naming conventions (Request/Command/Query, DO/Entity, DTO/BO) and ensures inserts/updates go through Domain Repository abstractions.
  • Automated remediation guidance: Provides actionable suggestions to move SQL/SDK calls to the infrastructure layer, create Application orchestrations, or define Repository interfaces in Domain.
  • Use Case: Run during feature implementation, code reviews, or refactors in Java 11 + Spring Boot 2.1 + MyBatis-Plus projects to catch dependency violations early.

Quick Start

Run an architecture check on the current module to detect layer dependency violations and receive suggested fixes for Controller, Application, Domain, and Infrastructure boundaries.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: architecture-guard
Download link: https://github.com/Xunzi229/skills/archive/main.zip#architecture-guard

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.