angular-architecture
Use when the user asks about Angular architecture, Angular signals and standalone components, NgModule to standalone migration, feature folders, lazy routes…
от j4flmao★ 47 звёзд на GitHub
Установить angular-architecture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Angular Architecture
Purpose
Structure Angular 17+ applications with standalone components, Signals for state, and feature-based lazy loading. No NgModules. No RxJS for local state. New control flow syntax.
Agent Protocol
Trigger
Exact user phrases: "Angular structure", "Angular architecture", "Angular folder", "Angular standalone", "Angular signals", "Angular clean arch", "Angular feature", "Angular project layout", "NgModule vs standalone".
Input Context
Before activating, verify:
- angular.json exists (Angular 17+).
- Whether the project uses standalone components or NgModules.
Output Artifact
No file output. Produces folder structure and component code as text.
Response Format
Folder structure:
src/app/
features/{feature}/
pages/, components/, services/, store/
shared/components/
core/
Code: TypeScript component and template (inline or separate). No import statements.
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- Standalone components by default. NgModules only for legacy libraries that still require them (NgRx, Material, routing all have standalone
provide*APIs). - Signals used for component state (signal(), computed()).
- inject() used for DI instead of constructor injection.
- New control flow syntax used (@if, @for, @switch).
- Feature routes are lazy-loaded.
- OnPush change detection (default for standalone).
- No *ngIf, *ngFor, *ngSwitch in new code.
Max Response Length
Folder structure: unlimited. Code: 20 lines per example.
Architecture Decision Trees
Module vs Standalone Decision
Is this a new Angular 17+ project?
Yes -> Standalone components only. No NgModule.
No (migrating from NgModule) ->
Is the NgModule shared across many features?
Yes -> Keep as shared module for now, migrate incrementally
No -> Refactor to standalone + imports array
Does the feature need lazy loading?
Yes -> loadChildren or loadComponent in route config
No -> Keep in same chunk
State Management Decision
What type of state?
Local component state -> signal() or BehaviorSubject
Derived/computed state -> computed()
Cross-component within feature -> Signal-based service (injectable with signals)
Cross-feature global state -> Signal Store (@ngrx/signals) or NgRx
Async streams (HTTP, WebSocket) -> RxJS Observable -> toSignal() conversion
URL/route state -> ActivatedRoute params as signals
State + async mixed?
Use RxJS for the async part, convert with toSignal() for template consumption
DI Strategy Decision
Is the service singleton or scoped?
Application-wide singleton -> providedIn: 'root'
Feature-scoped -> provided in standalone component or route providers
Per-component instance -> provided in component decorator
Does the service have multiple implementations?
Yes -> InjectionToken + useClass/useFactory
No -> Direct injectable class
Workflow
Step 1: Standalone Component Structure
src/
app/
app.component.ts -- Standalone root
app.config.ts -- Providers (provideRouter, provideHttpClient)
app.routes.ts -- Root route definitions
features/
users/
users.routes.ts -- Lazy-loaded feature routes
pages/
user-list/
user-list.component.ts
user-list.component.html
user-list.component.scss
user-detail/
user-detail.component.ts
user-detail.component.html
components/
user-card/
user-card.component.ts
user-card.component.html
services/
user.service.ts
store/
user.store.ts -- Signal store or NgRx feature state
models/
user.model.ts
shared/
components/
button/
button.component.ts
directives/
has-permission.directive.ts
pipes/
truncate.pipe.ts
core/
auth/
interceptors/
guards/
Step 2: Standalone Component Pattern
@Component({
selector: 'app-user-list',
// Components are standalone by default since Angular 19; add `standalone: true` only on v17-18
imports: [RouterLink], // CommonModule not needed with built-in control flow (@if/@for)
templateUrl: './user-list.component.html',
styleUrls: ['./user-list.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UserListComponent {
private readonly userService = inject(UserService)
readonly users = signal<User[]>([])
readonly isLoading = signal(false)
ngOnInit() {
this.loadUsers()
}
async loadUsers() {
this.isLoading.set(true)
try {
const users = await this.userService.getAll()
this.users.set(users)
} finally {
t
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/angular-micro-frontends.md
- references/angular-module-architecture.md
- references/angular-performance.md
- references/angular-routing.md
- references/angular-standalone-migration.md
- references/module-structure.md
- references/signals-guide.md
- references/standalone-components.md
FAQ
Что делает скилл angular-architecture?
Use when the user asks about Angular architecture, Angular signals and standalone components, NgModule to standalone migration, feature folders, lazy routes, @if/@for control flow, inject() or zoneless/OnPush change detection. Produces an Angular 17+ project structure and component conventions. Not for interceptors, guards, RxJS or NgRx (use angular-patterns).
Как установить скилл angular-architecture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл angular-architecture запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…