Audits and designs Angular shared data-access libraries in Nx monorepos, enforcing separation of persistence/transport from feature UI, routing, and orchestration 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 data-access libraries in Nx monorepos.
A shared data-access library must behave as a reusable persistence or transport contract, not as a place for feature UI, router decisions, or app-specific orchestration. It should expose API clients, repository abstractions, persistence helpers, and stable data-fetching contracts without leaking presentation, feature, or domain composition concerns.
The core rule is simple:
Data-access libraries fetch, persist, cache, and adapt transport.
Feature libraries decide when to call them.
UI libraries render the result.
Domain libraries define stable business concepts.
Use this skill when:
shared/data-access libraryKeep shared data-access focused and reusable:
export interface ProductRepository {
getById(id: string): Observable<ProductRecord>;
list(): Observable<readonly ProductRecord[]>;
}
@Injectable({ providedIn: "root" })
export class HttpProductRepository implements ProductRepository {
constructor(private readonly http: HttpClient) {}
getById(id: string): Observable<ProductRecord> {
return this.http.get<ProductRecord>(`/api/products/${id}`);
}
list(): Observable<readonly ProductRecord[]> {
return this.http.get<readonly ProductRecord[]>("/api/products");
}
}
Use adapters when transport and domain shapes differ:
export interface ProductApiDto {
id: string;
title: string;
}
export interface ProductRecord {
id: string;
name: string;
}
function mapProduct(dto: ProductApiDto): ProductRecord {
return {
id: dto.id,
name: dto.title,
};
}
Keep orchestration in the feature layer:
export class ProductsFacade {
readonly products = signal<readonly ProductRecord[]>([]);
constructor(private readonly productsRepository: ProductRepository) {}
loadProducts(): void {
this.productsRepository
.list()
.subscribe((products) => this.products.set(products));
}
}
Example Nx project tags:
{
"name": "shared-data-access",
"projectType": "library",
"root": "libs/shared/data-access",
"sourceRoot": "libs/shared/data-access/src",
"tags": ["type:data-access", "domain:shared"]
}
Example ESLint boundaries:
{
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
allow: [],
depConstraints: [
{
sourceTag: 'type:data-access',
onlyDependOnLibsWithTags: ['type:domain', 'type:util']
},
{
sourceTag: 'type:feature',
onlyDependOnLibsWithTags: ['type:ui', 'type:domain', 'type:data-access', 'type:util']
}
]
}
]
}
}
Avoid UI, router, and feature state in shared data-access:
export class ProductsRepository {
private readonly router = inject(Router);
private readonly productsListComponent = ProductsListComponent;
}
Avoid turning repositories into facades:
loadProductsAndNavigateAndTrackAndShowToast(): void
Avoid mixing transport with component rendering, dialog flow, or page orchestration.
Avoid exposing app-specific environment or deployment details as hard-coded behavior unless they are genuine public contract inputs.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/ngautopilot-angular:angular--architecture--shared-data-access-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