clean-architecture-fbdeda — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited clean-architecture-fbdeda (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill provides comprehensive guidance for implementing Clean Architecture, Domain-Driven Design (DDD), and Hexagonal Architecture patterns in NestJS/TypeScript applications. It covers the architectural layers, tactical patterns, and practical implementation examples for building maintainable, testable, and loosely-coupled backend systems.
Clean Architecture organizes code into concentric layers where dependencies flow inward. Inner layers have no knowledge of outer layers:
+-------------------------------------+
| Infrastructure (Frameworks, DB) | Outer layer - volatile
+-------------------------------------+
| Adapters (Controllers, Repositories)| Interface adapters
+-------------------------------------+
| Application (Use Cases) | Business rules
+-------------------------------------+
| Domain (Entities, Value Objects) | Core - most stable
+-------------------------------------+The Hexagonal Architecture (Ports & Adapters) pattern complements this:
Apply these patterns in your domain layer:
Structure your NestJS project following Clean Architecture principles:
src/
+-- domain/ # Inner layer - no external deps
| +-- entities/ # Domain entities
| +-- value-objects/ # Immutable value objects
| +-- aggregates/ # Aggregate roots
| +-- events/ # Domain events
| +-- repositories/ # Repository interfaces (ports)
| +-- services/ # Domain services
+-- application/ # Use cases - orchestration
| +-- use-cases/ # Individual use cases
| +-- ports/ # Input/output ports
| +-- dto/ # Application DTOs
| +-- services/ # Application services
+-- infrastructure/ # External concerns
| +-- database/ # ORM config, migrations
| +-- http/ # HTTP clients
| +-- messaging/ # Message queues
+-- adapters/ # Interface adapters
+-- http/ # Controllers, presenters
+-- persistence/ # Repository implementations
+-- external/ # External service adaptersCreate pure domain objects with no external dependencies:
Create use cases that orchestrate business logic:
execute methodCreate concrete implementations of ports:
Wire everything together in NestJS modules:
Follow these principles throughout implementation:
For detailed code examples covering all aspects of Clean Architecture implementation, see:
For comprehensive guidance on Clean Architecture best practices, including:
See [references/best-practices.md](references/best-practices.md)
Important constraints, common pitfalls, and implementation warnings:
See [references/constraints.md](references/constraints.md)
references/examples.md - Complete code examples for all layersreferences/best-practices.md - Comprehensive best practices and principlesreferences/constraints.md - Constraints, pitfalls, and warnings~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.