nx-workspace-patterns

nx-workspace-patterns is a skill for Claude Code from EngineerWithAI/engineerwith-agents. It costs 35 tokens per session (2,740 once invoked), scanned A, a copy of nx-workspace-patterns, MIT.

A guide to Nx workspaces, which organize multiple applications and shared libraries in one repository. It covers project boundaries, dependency relationships, caching, and commands that rebuild only affected projects.

In plain words
What is it for?
Use it to configure Nx, define library types and project boundaries, optimize CI with affected commands, manage dependencies, and add remote caching.
Why use it?
It helps large repositories avoid unnecessary work and keep shared code organized. It also provides patterns for setting up Nx or moving an existing workspace to it.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is "$schema": "../../node_modules/nx/schemas/project-schema.json",.

Part of the developer-essentials plugin — 11 skills shipped together

Good fit Use it to configure Nx, define library types and project boundaries, optimize CI with affected commands, manage dependencies, and add remote caching.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/EngineerWithAI/engineerwith-agents
agentmods
npx agentmods add skills/engineerwithai/engineerwith-agents/nx-workspace-patterns

Made for: Claude Code.

Or install developer-essentials, the plugin that ships this one along with the rest of its 11 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nx-workspace-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/engineerwithai/engineerwith-agents/nx-workspace-patterns/github.svg)](https://agentmods.dev/skills/engineerwithai/engineerwith-agents/nx-workspace-patterns)
Your own site
<a href="https://agentmods.dev/skills/engineerwithai/engineerwith-agents/nx-workspace-patterns"><img src="https://agentmods.dev/badge/skills/engineerwithai/engineerwith-agents/nx-workspace-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nx-workspace-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/engineerwithai/engineerwith-agents/nx-workspace-patterns"><img src="https://agentmods.dev/badge/skills/engineerwithai/engineerwith-agents/nx-workspace-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,740 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.02740
Opus 5.5 $0.00014 $0.01096
Sonnet 5.5 $0.00007 $0.00548
Haiku 4.5 $0.00003 $0.00274

Measured 1mo ago against content hash 6286fae01303, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nx-workspace-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

88% identical to nx-workspace-patterns — 13 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/developer-essentials/skills/nx-workspace-patterns/SKILL.md · 453 lines

How it starts

The opening of the file, as written. The whole thing — 453 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Nx Workspace Patterns

Production patterns for Nx monorepo management.

When to Use This Skill

  • Setting up new Nx workspaces
  • Configuring project boundaries
  • Optimizing CI with affected commands
  • Implementing remote caching
  • Managing dependencies between projects
  • Migrating to Nx

Core Concepts

1. Nx Architecture

workspace/
├── apps/              # Deployable applications
│   ├── web/
│   └── api/
├── libs/              # Shared libraries
│   ├── shared/
│   │   ├── ui/
│   │   └── utils/
│   └── feature/
│       ├── auth/
│       └── dashboard/
├── tools/             # Custom executors/generators
├── nx.json            # Nx configuration
└── workspace.json     # Project configuration

2. Library Types

Type Purpose Example
feature Smart components, business logic feature-auth
ui Presentational components ui-buttons
data-access API calls, state management data-access-users
util Pure functions, helpers util-formatting
shell App bootstrapping shell-web

Templates

Template 1: nx.json Configuration

{
  "$schema": "./node_modules/nx/schemas/nx-schema.json",
  "npmScope": "myorg",
  "affected": {
    "defaultBase": "main"
  },
  "tasksRunnerOptions": {
    "default": {
      "runner": "nx/tasks-runners/default",
      "options": {
        "cacheableOperations": [
          "build",
          "lint",
          "test",
          "e2e",
          "build-storybook"
        ],
        "parallel": 3
      }
    }
  },
  "targetDefaults": {
    "build": {
      "dependsOn": ["^build"],
      "inputs": ["production", "^production"],
      "cache": true
    },
    "test": {
      "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
      "cache": true
    },
    "lint": {
      "inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
      "cache": true
    },
    "e2e": {
      "inputs": ["default", "^production"],
      "cache": true
    }
  },
  "namedInputs": {
    "default": ["{projectRoot}/**/*", "sharedGlobals"],
    "production": [
      "default",
      "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
      "!{projectRoot}/tsconfig.spec.json",
      "!{projectRoot}/jest.config.[jt]s",
      "!{projectRoot}/.eslintrc.json"
    ],
    "sharedGlobals": [
      "{workspaceRoot}/babel.config.json",
      "{workspaceRoot}/tsconfig.base.json"
    ]
  },
  "generators": {
    "@nx/react": {
      "application": {
        "style": "css",
        "linter": "eslint",
        "bundler": "webpack"
      },
      "library": {
        "style": "css",
        "linter": "eslint"
      },
      "component": {
        "style": "css"
      }
    }
  }
}

Read the full file on GitHub · 453 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 453 lines · 35 tokens per session scan A 6286fae01303

Subscribe to this mod's changes

nx-workspace-patterns is a skill published in the GitHub repository EngineerWithAI/engineerwith-agents (4 stars, last pushed 9mo ago), licensed MIT. It adds 35 tokens to every session and 2,740 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 88% identical to nx-workspace-patterns, differing in 13 lines, and is treated as a copy.