clean-architecture — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited clean-architecture (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 implements Clean Architecture combined with CQRS pattern for scalable and maintainable NestJS applications.
Use this skill when the user asks to:
src/
├── core/ # Domain Layer
│ ├── domain/
│ │ ├── entities/
│ │ ├── value-objects/
│ │ └── ports/
│ └── events/
│
├── application/ # Application Layer (CQRS)
│ ├── commands/
│ ├── queries/
│ └── ports/
│
├── infrastructure/ # Infrastructure Layer
│ ├── adapters/
│ ├── persistence/
│ └── search/
│
└── presentation/ # Presentation Layer
├── controllers/
└── dto/| Layer | Responsibility | Dependencies |
|---|---|---|
| Domain | Entities, Value Objects, Business Rules | None (pure) |
| Application | Use Cases, CQRS Handlers | Domain |
| Infrastructure | DB, External APIs, Adapters | Application |
| Presentation | Controllers, DTOs, HTTP | Application |
// core/domain/entities/user.entity.ts
export class User {
public readonly id: string;
public readonly email: Email;
public readonly name: string;
public readonly createdAt: Date;
private constructor(data: UserData) {
this.id = data.id;
this.email = data.email;
this.name = data.name;
this.createdAt = data.createdAt;
}
static create(data: CreateUserData): User {
// Business logic validation here
return new User(data);
}
updateProfile(name: string): void {
this.name = name;
}
}// core/domain/ports/user.repository.ts
export interface UserRepository {
findById(id: string): Promise<User | null>;
findAll(): Promise<User[]>;
findByEmail(email: string): Promise<User | null>;
save(user: User): Promise<void>;
delete(id: string): Promise<void>;
}// infrastructure/persistence/user.repository.ts
@Injectable()
export class UserRepository implements IUserRepository {
constructor(
@InjectRepository(UserEntity)
private readonly repo: Repository<UserEntity>,
) {}
async findById(id: string): Promise<User | null> {
const entity = await this.repo.findOne({ where: { id } });
return entity ? this.toDomain(entity) : null;
}
private toDomain(entity: UserEntity): User {
return User.create({
id: entity.id,
email: entity.email,
name: entity.name,
createdAt: entity.createdAt,
});
}
}| Benefit | Description |
|---|---|
| Testability | Test each layer independently |
| Maintainability | Isolated changes by layer |
| Scalability | Optimize reads/writes separately |
| Flexibility | Swap infrastructure without domain changes |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.