From ai-skills
Common Clean Architecture rules for backend services. Use when applying shared dependency, package, DTO, transaction, and business logic standards.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-skills:clean-architecture-commonThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill converts `backend-engineer/clean-architecture/common.md` into Claude Code plugin skill guidance while preserving the source rules for production fintech development.
This skill converts backend-engineer/clean-architecture/common.md into Claude Code plugin skill guidance while preserving the source rules for production fintech development.
common package is a shared internal package containing reusable technical components used across layers.
Purpose:
Rule:
common package supports layers, but must not become a dumping ground.
Allowed sub-packages:
common/
├── constant/
├── util/
├── enums/
├── exception/
├── response/
├── config/ (light shared config)
├── validation/
└── helper/
Use for application-wide constants.
Examples:
Example:
public final class HeaderConstant {
public static final String TRACE_ID = "X-Trace-Id";
}
Use for stateless helper utilities.
Examples:
Rule:
Shared base exceptions.
Examples:
Feature-specific business exceptions should stay in domain package.
Shared API response models.
Examples:
Reusable validators / annotations.
Examples:
Do NOT place in common:
Bad:
common/EverythingService.java
All layers may use common package only when generic.
controller -> common
application -> common
domain -> common (carefully)
infrastructure -> common
Prefer domain to depend only on pure/common primitives, not framework config.
common/
├── constant/ErrorCode.java
├── util/JsonUtil.java
├── util/MaskingUtil.java
├── response/ApiResponse.java
├── exception/BaseException.java
└── validation/ValidCurrency.java
Useful shared components:
Avoid:
When generating common package:
npx claudepluginhub silverpham08091998/ai-skills --plugin ai-skillsCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.