angular-clean-architecture
БесплатноБез исполняемых скриптовНе проверенScaffolds and extends Angular standalone feature MODULES under src/app/modules/{name} using Clean Architecture layering…
от fmflurry★ 173 звезды на GitHubОб этом скилле
Angular Clean Architecture — Module System
When To Activate
- Creating a module under
src/app/modules/ - Adding a use case, facade, store, port, or adapter to an existing module
- Wiring lazy routes + cached state
- Replacing session proxies with self-contained module adapters
- Creating standalone components that consume store state via facades
- Refactoring a legacy/mixed module (NgModule/NgRx) toward Clean Architecture
- Moving business logic out of components into facades/use-cases
- Adding or updating cross-module communication via the context registry
Relationship to Other Skills
| Concern | Owner |
|---|---|
| Domain modeling (entity, VO, aggregate, invariants) | angular-ddd |
| State/replay mechanics (Store API, channels, history) | flurryx |
| Pre-merge enforcement / review checklist | angular-cop |
| Module layout, DI, ports/adapters, lazy loading, caching wiring, facade, context registry, session-proxy replacement, naming | this skill |
Architecture Anchors (Verify Before Coding)
| Anchor | What to look for |
|---|---|
| Reference module | At least one module under src/app/modules/ with full layer structure |
| flurryx store | Store.for<Config>().build() in application/store/ |
| syncToStore usage | syncToStore(this.store, KEY) or syncToKeyedStore(...) in adapters/facades |
| Context registry | contextProvidersFor() mapping cross-module providers |
If anchors are missing: do NOT invent imports. Continue best-effort, report mismatch.
Architecture Overview
src/app/modules/{moduleName}/
├── presentation/ # list/ details/ create/ edit/ container pages, forms/, components/
├── application/
│ ├── facades/{moduleName}.facade.ts
│ ├── use-cases/{verb-noun}.use-case.ts
│ └── store/{moduleName}.store.ts # flurryx Store.for<Config>().build()
├── core/ # domain hexagon — ZERO infra/framework imports
│ ├── models/ ports/ rules/ mappers/ events/
├── infrastructure/
│ ├── adapters/{verb-noun}.adapter.ts
│ └── api/{endpoints/, request/, response/}
├── routes.ts # lazy loadComponent + route-level providers
├── routes.constants.ts
├── {moduleName}-service.providers.ts # SELF-REGISTRATION entrypoint
├── public-api.ts # SYNC contract — composition root imports only, never module→module
└── integration-api.ts # REACTIVE contract — composition root imports only, never module→module
Full layout with worked example: module-template.md.
Dependency Rules (Important)
Component --> Facade --> UseCase --> [Port] <-- Adapter --> Endpoint --> HttpClient
| | | ^ |
Presentation Application Application Core Infrastructure
- Core has ZERO infrastructure or framework dependencies — no Angular, no HttpClient, no flurryx. Only models (types), ports (abstract classes), rules (pure functions), mappers.
- Application depends on Core only — facades orchestrate use cases + store; use cases call ports.
- Infrastructure depends on Core only — adapters implement ports using HTTP clients.
- Components NEVER inject use cases or stores directly — always inject facades.
- Modules NEVER import modules — a file under
src/app/modules/<A>/**never imports fromsrc/app/modules/<B>/**, not evenpublic-api.ts/integration-api.ts. Capabilities go through context-registry ports incore/; types are local ACL copies. Only the composition root (core/**,app.config.ts,app.routes.ts, layout shell) imports module contracts. See cross-domain.md.
Root Store vs Route Providers (Caching Mechanism)
- Store is
providedIn: 'root'(flurryx default) → survives navigation = the cache. - Facades, use cases, adapters are route-scoped → disposed on leave.
@SkipIfCachedprevents re-fetch when returning to a cached route.- Optional
sessionStorage/localStoragechannels for reload/tab survival. clearAllStores()on logout/tenant switch.
Store System
flurryx provides event-sourced, replayable signal state. This skill does NOT restate its API.
- API reference (Store builder, syncToStore, decorators, channels, history): flurryx
- Wiring cheat-sheet (how stores plug into modules): store-system.md
- Conceptual ES/CQRS → Angular mapping: angular-ddd event-sourcing-mapping
Session-Proxy Replacement
Legacy *Proxy classes + shared god-stores are replaced by self-contained module adapters with @SkipIfCached(CACHE_NO_TIMEOUT) + optional session-storage channel, consumed by PORT via context registry.
Full before/after migration: session-proxy-migration.md.
Hard Rules
- Never use
any— useunknownif the type is truly unknown - Never inject
UseCaseclasses directly into components — always go through a Facade - Never inject stores directly in
Установить angular-clean-architecture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл angular-clean-architecture?
Scaffolds and extends Angular standalone feature MODULES under src/app/modules/{name} using Clean Architecture layering (presentation/application/core/infrastructure), a self-registering module providers function, route-level lazy loading, cross-navigation state caching, the facade pattern, and ports/adapters dependency inversion. Use when creating a new Angular module, adding use cases/facades/stores/ports/adapters, wiring lazy routes + cached state, replacing session proxies, refactoring legacy NgModule/NgRx code, or cross-module communication via the context registry. Domain-modeling rules: see angular-ddd. State/replay mechanics: see flurryx.
Как установить скилл angular-clean-architecture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл angular-clean-architecture запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic