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

Nx Pro

ASecurity

Run JS monorepos with Nx: task graph, computation caching, affected commands, generators, and module boundaries. Use when managing large monorepos with enforced architecture.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsjavascripttypescriptgojavabashreactdebuggingapi

Works with

api

Security Analysis

A100/100

Scanned 9/29/2026

$npx -y skills add aicodedecode/awesome-muse-skills --skill nx-pro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nx Pro?

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

Security grade badge for Nx Pro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodedecode-nx-pro/badge)](https://www.skillsdirectory.com/skills/aicodedecode-nx-pro)

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: nx-pro
description: Run JS monorepos with Nx: task graph, computation caching, affected commands, generators, and module boundaries. Use when managing large monorepos with enforced architecture.
category: development
---

# Nx Pro

A practical guide to Nx: the task graph, computation caching, affected analysis, code generators, and module-boundary enforcement for large JavaScript/TypeScript monorepos.

## Overview

Nx is a monorepo toolkit with opinions: it computes a **project graph** from your workspace, runs tasks in the right order with **computation caching**, figures out what's **affected** by a change, generates code with **generators**, and enforces architecture with **module boundaries and tags**. Where Turborepo is a thin task runner, Nx is a fuller platform — more power, more concepts to learn.

## When to use

- Large monorepos (dozens of apps/libs) needing enforced architecture.
- Teams wanting code generation (scaffold libs, components consistently).
- CI that must run only affected builds/tests/lints.
- Migrating a messy monorepo toward clear module boundaries.
- Choosing between Nx and lighter runners (Nx pays off at scale; overhead for tiny repos).

## Core concepts

- **Project graph.** Nx infers dependencies between projects from imports (TS path mappings, package.json deps). `nx graph` visualizes it — your first debugging tool.
- **Targets.** Named tasks per project (`build`, `test`, `lint`) configured in `project.json` or `package.json`. Target defaults in `nx.json` apply workspace-wide.
- **Computation caching.** Hash of inputs (files, env, args) → cached outputs, local + remote (Nx Cloud or self-hosted). Like Turborepo, inputs must be complete.
- **Affected.** `nx affected -t build` runs targets only for projects affected by the change vs a base (`main`). The standard CI primitive.
- **Generators.** `nx g @nx/react:lib my-lib` scaffolds projects with correct config, tags, and wiring. Write workspace generators for your org's patterns (new service, new UI package).
- **Tags & module boundaries.** Tag projects (`scope:shared`, `type:ui`) and enforce rules (`@nx/enforce-module-boundaries`): e.g., apps can't import from other apps, `scope:orders` can't import `scope:billing`.
- **Executors.** The actual implementations behind targets (webpack, vite, jest, tsc...). Swappable per project.

## Practical workflow

**1. Inspect the graph first.**
```bash
nx graph              # visualize projects + dependencies
nx show projects      # list
nx show project web --json  # targets for one project
```
If the graph is wrong (missing edges), affected analysis is wrong — fix imports/path mappings.

**2. Run with affected.**
```bash
nx affected -t lint test build --base=origin/main
nx run-many -t build --projects=web,api      # explicit set
nx run web:serve                              # single target
```

**3. Configure target defaults (nx.json).**
```json
{
  "targetDefaults": {
    "build": { "dependsOn": ["^build"], "inputs": ["production", "^production"], "outputs": ["{projectRoot}/dist"] },
    "test": { "inputs": ["default", "^production"] }
  },
  "namedInputs": { "production": ["default", "!{projectRoot}/**/*.spec.ts"] }
}
```

**4. Enforce boundaries.** Tag projects in `project.json`, add the eslint boundary rule, and let CI reject cross-boundary imports. Start permissive, tighten as the architecture settles.

**5. Generate, don't copy-paste.** `nx g` for new libs/components; encode org conventions (test setup, lint config, tags) in a workspace generator so every new project starts correct.

**6. CI.** `nx affected` with remote cache + distributed task execution for large repos. Set `NX_BASE`/`NX_HEAD` (or use the `nrwl/nx-set-shas` action) so affected comparison is right.

## Common pitfalls

- **Stale project graph.** New path mappings or package deps not reflected → wrong affected sets. `nx reset` clears the daemon cache when the graph looks wrong.
- **Implicit deps undeclared.** Cross-project imports that bypass the graph (dynamic requires, unmapped paths) break affected analysis. Make all deps explicit.
- **Cache misses from sloppy inputs.** Same discipline as any cacher: declare files + env; keep builds deterministic.
- **Boundary rules too strict too early.** Enforcing a perfect architecture on day one creates friction and workarounds. Enforce the 2–3 boundaries that matter most first.
- **Generator sprawl.** Dozens of bespoke generators nobody maintains. Keep a few high-value ones; delete the rest.
- **Running everything in CI.** Defeats the purpose — if CI runs all targets always, you have a slow monolith with extra steps. Affected + cache is the whole point.
- **Daemon weirdness.** The Nx daemon speeds things up but can serve stale state after big refactors. `nx reset` is the universal first troubleshooting step.
- **Over-centralization.** Forcing every team onto identical executors/versions creates upgrade gridlock. Allow version ranges where the cost of uniformity exceeds the benefit.

Attribution

aicodedecodeaicodedecode
View sourceSee grades on GitHubMore from aicodedecode →
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

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →