clean-architecture-checker

Audit code changes to enforce Clean Architecture rules across Polibase layers.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/sage-base/sagebase --skill clean-architecture-checker-sage-base
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture-checker
Source: https://github.com/sage-base/sagebase/tree/main/.claude/skills/clean-architecture-checker
Command: npx skills add https://github.com/sage-base/sagebase --skill clean-architecture-checker-sage-base

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Clean Architecture Checker helps teams enforce architectural boundaries and coding standards across Polibase by validating layer dependencies, DTO usage, and type safety.

Core Features & Use Cases

  • Dependency Rule validation: ensure Domain → Application → Infrastructure → Interfaces direction.
  • Entity Independence: domain entities remain free from framework dependencies.
  • Repository Pattern conformance: all repositories follow async patterns and inherit base interfaces.
  • DTO Boundary enforcement: DTOs used for boundaries, not entities.
  • Type Safety checks: all public methods are properly typed with Optional handling.
  • Code review guidance: flags cross-layer or invasive changes during reviews.

Quick Start

Run the Clean Architecture Checker on your changed code to verify Layer integrity and report violations.

Frequently Asked Questions about clean-architecture-checker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce clean architecture dependency rules in a layered project?

Clean architecture dependency rules are enforced by validating that dependencies point inward across Domain, Application, Infrastructure, and Interfaces layers. The checker audits modified files to ensure the Domain layer remains independent and inward dependencies are maintained.

How do I check if domain entities are free from framework dependencies?

Domain entity independence is checked by auditing code changes in the domain layer to ensure entities remain free from framework dependencies. The checker validates that domain files do not import or rely on external infrastructure or interface frameworks.

How do I validate repository pattern conformance and async usage in clean architecture?

Repository pattern conformance is validated by checking that all repositories follow async patterns and inherit from base interfaces. The checker audits repository implementations to ensure they adhere to the required asynchronous base interface structure.

How do I enforce DTO boundaries and type safety checks across architectural layers?

DTO boundaries and type safety are enforced by ensuring DTOs are used at layer boundaries instead of entities, and all public methods include explicit type hints with proper Optional handling. The checker audits modified files to verify these typing standards.

Does the clean architecture checker work with cross-layer code reviews?

The clean architecture checker works with cross-layer code reviews by flagging invasive changes that violate architectural boundaries. It activates during reviews to guide developers when files under domain, application, infrastructure, or interfaces are modified.

When do I need to run a clean architecture audit on my code changes?

A clean architecture audit is needed when files under src/domain, src/application, src/infrastructure, or src/interfaces are created or modified. Running the checker verifies layer integrity, reports violations, and ensures coding standards are maintained.