Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Angular Architecture Shared Data Access Library Contract

ASecurity

Audits and designs Angular shared data-access libraries in Nx monorepos to keep reusable persistence and transport layers free of feature UI, router, and app-specific orchestration concerns.

4 stars
0 votes
0 copies
2 views
Added 10/2/2026
businessangularapi

Works with

cliapi

Security Analysis

A100/100

Scanned 10/2/2026

$npx -y skills add janpereira-dev/ngAutoPilot --skill angular-architecture-shared-data-access-library-contract --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Angular Architecture Shared Data Access Library Contract?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Angular Architecture Shared Data Access Library Contract
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/janpereira-dev-angular-architecture-shared-data-access-library-co/badge)](https://www.skillsdirectory.com/skills/janpereira-dev-angular-architecture-shared-data-access-library-co)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: angular-architecture-shared-data-access-library-contract
description: "Audits and designs Angular shared data-access libraries in Nx monorepos to keep reusable persistence and transport layers free of feature UI, router, and app-specific orchestration concerns."
license: MIT
metadata:
  ngautopilot-id: "angular.architecture.shared-data-access-library-contract"
  ngautopilot-source: "skills/angular/architecture/shared-data-access-library-contract/SKILL.md"
  ngautopilot-version: "0.10.0"
---


# Shared Data-Access Library Contract

## Purpose

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:

```txt
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.
```

## When to Use

Use this skill when:

- creating a reusable `shared/data-access` library
- reviewing an API client, repository, or transport layer intended for multiple features
- auditing Nx dependency graph leaks in data-access libraries
- a data-access library imports components, routing, or feature-only state
- a repository starts owning business orchestration that belongs in a facade or feature service
- multiple features need the same transport adapter or persistence helper
- the same API client code is duplicated across several bounded contexts

## Do

Keep shared data-access focused and reusable:

```ts
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:

```ts
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:

```ts
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:

```json
{
  "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:

```js
{
  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']
          }
        ]
      }
    ]
  }
}
```

## Do Not

Avoid UI, router, and feature state in shared data-access:

```ts
export class ProductsRepository {
  private readonly router = inject(Router);
  private readonly productsListComponent = ProductsListComponent;
}
```

Avoid turning repositories into facades:

```ts
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.

## Review Checklist

- [ ] The library is limited to transport, persistence, caching, or adapter concerns.
- [ ] The library does not import feature components or route definitions.
- [ ] The library does not own UI orchestration.
- [ ] The library does not own domain workflow decisions.
- [ ] Public APIs are stable and reusable across features.
- [ ] DTO mapping is explicit where transport and domain differ.
- [ ] Nx tags and boundaries prevent feature or UI dependencies from leaking in.
- [ ] The library is named to reflect a reusable contract.

## Expected Output

1. Classify the library as shared data-access, feature, domain, or mixed.
2. Inspect imports, injected dependencies, and public API shape.
3. Flag boundary leakage into UI, router, or feature orchestration.
4. Recommend repository, adapter, or facade splits where needed.
5. Produce a refactor plan with validation steps and dependency boundary checks.

Attribution

janpereira-devjanpereira-dev
View sourceSee grades on GitHubMore from janpereira-dev →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Email Composer

Draft professional emails for various contexts including business, technical, and customer communication. Use when the user needs help writing emails or composing professional messages.

304952 votes

Solution Architect

Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.

192 votes

Akorchak:Venture Assessment

Generate a comprehensive VC investment assessment report for a company

72 votes

Telegram Compose

Compose rich, readable Telegram messages using HTML formatting via direct Telegram API. Use when: (1) Sending any Telegram message beyond a simple one-line reply, (2) Creating structured messages with sections, lists, or status updates, (3) Need formatting unavailable via Clawdbot's Markdown conversion (underline, spoilers, expandable blockquotes, user mentions by ID), (4) Sending alerts, reports, summaries, or notifications to Telegram, (5) Want professional, scannable message formatting wit...

6511 votes

Just Fucking Cancel

Find and cancel unwanted subscriptions by analyzing bank transactions. Detects recurring charges, calculates annual waste, and helps you cancel with direct URLs and browser automation. Use when: 'cancel subscriptions', 'audit subscriptions', 'find recurring charges', 'what am I paying for', 'save money', 'subscription cleanup', 'stop wasting money'. Supports CSV import (Apple Card, Chase, Amex, Citi, Bank of America, Capital One, Mint, Copilot) OR Plaid API for automatic transaction pull. Out...

6511 votes
View all in business →