Audits and designs Angular shared domain libraries in Nx monorepos to keep business concepts isolated from UI, transport, and feature orchestration.
Ships in ngautopilot-angular. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill to audit or design Angular shared domain libraries in Nx monorepos.
A shared domain library must behave as a reusable source of business concepts, not as a dumping ground for UI helpers, transport adapters, or feature orchestration. It should expose entities, value objects, policies, rules, and domain-level invariants that can be shared across multiple features or data-access layers without leaking infrastructure or presentation concerns.
The core rule is simple:
Domain libraries define concepts and rules.
Data-access libraries implement transport and persistence.
Feature libraries orchestrate workflows.
UI libraries render and emit intent.
Use this skill when:
shared/domain libraryKeep shared domain pure and stable:
export interface Product {
readonly id: string;
readonly name: string;
readonly isActive: boolean;
}
export function canArchiveProduct(product: Product): boolean {
return product.isActive;
}
Prefer explicit value objects and rules:
export class Money {
constructor(
readonly amount: number,
readonly currency: string,
) {}
isSameCurrency(other: Money): boolean {
return this.currency === other.currency;
}
}
Keep domain contracts independent from Angular UI and transport details.
For new finite domain values, prefer literal unions when only a type is needed, or derive the union from an as const object or array when runtime constants, iteration, or membership validation are needed. Keep one source of allowed values and preserve published enum and persisted-value contracts during any scoped migration.
Example Nx project tags:
{
"name": "shared-domain",
"projectType": "library",
"root": "libs/shared/domain",
"sourceRoot": "libs/shared/domain/src",
"tags": ["type:domain", "domain:shared"]
}
Example ESLint boundaries:
{
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
allow: [],
depConstraints: [
{
sourceTag: 'type:domain',
onlyDependOnLibsWithTags: ['type:domain', 'type:util']
},
{
sourceTag: 'type:ui',
onlyDependOnLibsWithTags: ['type:ui', 'type:util', 'domain:shared']
},
{
sourceTag: 'type:data-access',
onlyDependOnLibsWithTags: ['type:domain', 'type:util']
}
]
}
]
}
}
Avoid Angular dependencies in domain libraries:
@Component({
selector: 'lib-product-name',
template: `{{ product.name }}`,
})
export class ProductNameComponent {}
Avoid HTTP, router, store, or feature orchestration in domain code:
private readonly http = inject(HttpClient);
this.router.navigate(['/products']);
Avoid DTO shape leakage when a stable business concept is needed instead.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/ngautopilot-angular:angular--architecture--shared-domain-library-contractfrom ngautopilot-angular
npx claudepluginhub janpereira-dev/ngautopilot --plugin ngautopilot-angular350 skills in this plugin
/angular--ai--angular-v22-agent-skills-integrationAngular v22 Agent Skills IntegrationUse official Angular Agent Skills as reference material without copying them blindly or replacing NgAutoPilot routing. For Angular 22 projects and 21-to-22 upgrade planning.
/angular--ai--angular-v22-ai-tutor-safe-usageAngular v22 AI Tutor Safe UsageUse AI tutor workflows to teach Angular concepts without allowing unsafe code or secret exposure. For Angular 22 projects and 21-to-22 upgrade planning.
Other plugins' skills for the same job
/angular--ai--angular-v22-angular-mcp-agent-workflowAngular v22 Angular MCP Agent WorkflowReview the workspace boundary, permissions, and runtime evidence of an Angular MCP integration. For Angular 22 projects and 21-to-22 upgrade planning.