Audits and designs Angular shared UI/component libraries in Nx monorepos to keep reusable UI contracts free of feature, domain, data-access, store, router, and backend concerns.
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 UI and component libraries in Nx monorepos.
A shared UI library must behave as a reusable contract, not as a shortcut for app-specific logic. It should expose presentational components, stable APIs, projected content slots, styling conventions, and low-level composition primitives without leaking feature, domain, data-access, store, router, or backend concerns.
The core rule is simple:
Shared UI receives data and emits events.
Feature libraries decide what the data means.
Data-access libraries fetch and persist data.
Domain libraries own business concepts.
Use this skill when:
shared/ui, ui-kit, design-system, or component-libraryKeep shared UI dumb and explicit:
@Component({
selector: 'lib-table',
template: `
<table>
<thead>
<tr>
<th *ngFor="let column of columns">{{ column.label }}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let row of rows" (click)="rowSelected.emit(row)">
<td *ngFor="let column of columns">{{ column.value(row) }}</td>
</tr>
</tbody>
</table>
`,
})
export class TableComponent<T> {
@Input({ required: true }) rows: readonly T[] = [];
@Input({ required: true }) columns: readonly TableColumn<T>[] = [];
@Output() rowSelected = new EventEmitter<T>();
}
Prefer content projection over endless configuration:
@Component({
selector: 'lib-card',
template: `
<article class="card">
<header class="card__header">
<ng-content select="[slot=header]" />
</header>
<section class="card__body">
<ng-content />
</section>
<footer class="card__footer">
<ng-content select="[slot=footer]" />
</footer>
</article>
`,
})
export class CardComponent {}
Consumer-owned content stays in the app or feature library:
<lib-card>
<h2 slot="header">Product detail</h2>
<app-product-summary [product]="product()" />
<div slot="footer">
<button type="button" (click)="cancel()">Cancel</button>
<button type="button" (click)="save()">Save</button>
</div>
</lib-card>
Enforce module boundaries in Nx:
{
"name": "shared-ui",
"projectType": "library",
"tags": ["type:ui", "domain:shared"]
}
{
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
allow: [],
depConstraints: [
{
sourceTag: 'type:ui',
onlyDependOnLibsWithTags: ['type:ui', 'type:util', 'domain:shared']
},
{
sourceTag: 'type:feature',
onlyDependOnLibsWithTags: [
'type:ui',
'type:domain',
'type:data-access',
'type:util'
]
},
{
sourceTag: 'type:data-access',
onlyDependOnLibsWithTags: ['type:domain', 'type:util']
}
]
}
]
}
}
Build on Angular CDK instead of rebuilding behavior:
CDK owns behavior.
Design system owns look.
Feature libraries own content.
Example Nx project tags:
{
"name": "shared-ui",
"projectType": "library",
"root": "libs/shared/ui",
"sourceRoot": "libs/shared/ui/src",
"tags": ["type:ui", "domain:shared"]
}
Example ESLint boundaries:
{
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
allow: [],
depConstraints: [
{
sourceTag: 'type:ui',
onlyDependOnLibsWithTags: ['type:ui', 'type:util', 'domain:shared']
},
{
sourceTag: 'type:feature',
onlyDependOnLibsWithTags: ['type:ui', 'type:domain', 'type:data-access', 'type:util']
}
]
}
]
}
}
Avoid smart logic in shared UI:
export class ProductTableComponent {
private readonly productsService = inject(ProductsService);
private readonly store = inject(Store);
readonly products$ = this.store.select(selectProducts);
}
Avoid shared components that navigate, fetch data, or own domain rules:
this.router.navigate(['/products', product.id]);
this.http.get<ProductDto[]>('/api/products');
Avoid over-configured APIs that become a second framework:
@Input() config!: {
title: string;
subtitle: string;
actions: Array<{
label: string;
icon: string;
visibleWhen: (row: ProductDto) => boolean;
execute: (row: ProductDto) => void;
}>;
};
Avoid reimplementing low-level interaction behavior that Angular CDK already provides for overlays, dialogs, focus management, drag and drop, portals, menus, scrolling, and accessibility primitives.
ng-content instead of excessive inputs.@nx/enforce-module-boundaries is configured and enforced.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/ngautopilot-angular:angular--components--shared-ui-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.
/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.
Other plugins' skills for the same job