Angular Architecture
ASecuritySeparate reusable code from application-wide infrastructure: ```text src/app/ ├── core/ │ ├── auth/auth.service.ts │ ├── guards/auth.guard.ts │ └── interceptors/auth.interceptor.ts ├── shared/ │ ├── ui/empty-state.component.ts │ ├── pipes/date-label.pipe.ts │ └── utils/format-currency.ts └── features/ └── billing/ └── services/billing-api.service.ts ``` Put global singletons and cross-cutting infrastructure in `core/`: authentication/session services, route guards, HTTP intercepto...
- 584 stars
- 0 votes
- 0 copies
- 2 views
- Added September 5, 2026
Works with
Security analysis
100/100Pro scans all 18 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill angular-architecture --agent claude-codeAre you the author of Angular Architecture?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-angular-architecture-0748c8ca)# Where shared utilities and global services belong
Separate reusable code from application-wide infrastructure:
```text
src/app/
├── core/
│ ├── auth/auth.service.ts
│ ├── guards/auth.guard.ts
│ └── interceptors/auth.interceptor.ts
├── shared/
│ ├── ui/empty-state.component.ts
│ ├── pipes/date-label.pipe.ts
│ └── utils/format-currency.ts
└── features/
└── billing/
└── services/billing-api.service.ts
```
Put global singletons and cross-cutting infrastructure in `core/`: authentication/session services, route guards, HTTP interceptors, and other services that represent one application-wide concern. Provide them through `providedIn: 'root'` or the application providers in `app.config.ts`, as appropriate. A feature-only service should remain inside that feature even if it uses dependency injection.
Put reusable presentation code in `shared/`: UI components, pipes, directives, and pure utilities that can be used by multiple features. Shared code should not own global authentication, navigation policy, or application-wide business state. In particular, do not place singleton services in `shared/`, because that blurs the ownership and lifetime boundary.
Keep a utility in its feature when it is meaningful only there; promote it to `shared/utils/` only after it has a genuine cross-feature use. Prefer direct imports and avoid deep folder nesting or indiscriminate barrel exports. New shared components, pipes, and directives should be standalone, and feature routes should still be lazy-loaded with `loadComponent` or `loadChildren`.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- eval-4.baseline.md
- eval-4.with-skill.md
- eval-5.baseline.md
- eval-5.with-skill.md
- eval-6.baseline.md
- eval-6.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
- trigger-5.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.