nx-monorepo
Provides comprehensive Nx monorepo management guidance for TypeScript/JavaScript projects
Install / Use
npx skills add giuseppe-trisciuoglio/developer-kit --skill nx-monorepoInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Tags
Our assessment of nx-monorepo
nx-monorepo scores 86/100 on our quality scale, 1881st of 2,931 Automation skills we index.
Its SKILL.md is 8.9 KB long, well organised into 30 sections with 7 code examples: a thorough specification that gives an agent plenty to work with.
It has 353 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 35 days ago, so nx-monorepo is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-15. Automated pattern scan on 2026-10-15. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
nx-monorepo compared with similar skills
All 4 of these similar skills score higher than nx-monorepo; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| nx-monorepo (this skill)by giuseppe-trisciuoglio | 86 | 353 | 35d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 97.6k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 75.4k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 87.7k | today | MCP Server |
| rufloby ruvnet | 100 | 74.7k | today | MCP Server |
Frequently asked questions
- How do I install nx-monorepo?
- Run
npx skills add giuseppe-trisciuoglio/developer-kit --skill nx-monorepo. The install tabs above show the steps for each supported agent. - Which AI agents does nx-monorepo work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is nx-monorepo safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is nx-monorepo still maintained?
- The repository was last updated 35 days ago, so nx-monorepo is actively maintained.
Skill content
View source on GitHubname: nx-monorepo description: Provides comprehensive Nx monorepo management guidance for TypeScript/JavaScript projects. Use when creating Nx workspaces, generating apps/libraries/components, running affected commands, setting up CI/CD, configuring Module Federation, or implementing NestJS backends within Nx allowed-tools: Read, Write, Edit, Bash, Glob, Grep
Nx Monorepo
Overview
Provides guidance for Nx monorepo management in TypeScript/JavaScript projects. Covers workspace creation, project generation, task execution, caching strategies, Module Federation, and CI/CD integration.
When to Use
Use this skill when:
- Creating a new Nx workspace or initializing Nx in an existing project
- Generating applications, libraries, or components with Nx generators
- Running affected commands or executing tasks across multiple projects
- Setting up CI/CD pipelines for Nx projects (GitHub Actions, CircleCI, etc.)
- Configuring Module Federation with React or Next.js
- Implementing NestJS backend applications within Nx
- Managing TypeScript package libraries with buildable and publishable libs
- Setting up remote caching or Nx Cloud
- Optimizing monorepo build times and caching strategies
- Debugging dependency graph issues or circular dependencies
Trigger phrases: "create Nx workspace", "Nx monorepo", "generate Nx app", "Nx affected", "Nx CI/CD", "Module Federation Nx", "Nx Cloud"
Instructions
Workspace Creation
-
Create a new workspace with interactive setup:
npx create-nx-workspace@latestFollow prompts to select preset (Integrated, Standalone, Package-based) and framework stack.
-
Initialize Nx in an existing project:
nx@latest init -
Create with specific preset (non-interactive):
npx create-nx-workspace@latest my-workspace --preset=reactVerify:
nx show projectslists the new workspace projects
Project Generation
-
Generate a React application:
nx g @nx/react:app my-app -
Generate a library:
# React library nx g @nx/react:lib my-lib # TypeScript library nx g @nx/js:lib my-utilVerify:
nx show projectslists the new lib -
Generate a component in lib:
nx g @nx/react:component my-comp --project=my-lib -
Generate NestJS backend:
nx g @nx/nest:app my-apiVerify:
nx show projectslistsmy-apiandnx run my-api:buildsucceeds
Task Execution
-
Run tasks for affected projects only:
nx affected -t lint test build -
Run tasks across all projects:
# Build all projects nx run-many -t build # Test specific projects nx run-many -t test -p=my-app,my-lib # Test by pattern nx run-many -t test --projects=*-app -
Run specific target on single project:
nx run my-app:build -
Visualize dependency graph:
nx graph
Project Configuration
Each project has a project.json defining targets, executor, and configurations:
{
"name": "my-app",
"projectType": "application",
"sourceRoot": "apps/my-app/src",
"targets": {
"build": {
"executor": "@nx/react:webpack",
"outputs": ["{workspaceRoot}/dist/apps/my-app"],
"configurations": {
"production": {
"optimization": true
}
}
},
"test": {
"executor": "@nx/vite:test"
}
},
"tags": ["type:app", "scope:frontend"]
}
Dependency Management
-
Set up project dependencies:
{ "targets": { "build": { "dependsOn": [ { "projects": ["shared-ui"], "target": "build" } ] } } } -
Use tags for organization:
{ "tags": ["type:ui", "scope:frontend", "platform:web"] }
Module Federation (Nx 17+)
-
Generate a remote (micro-frontend):
nx g @nx/react:remote checkout --host=dashboard -
Generate a host:
nx g @nx/react:host dashboard
CI/CD Setup
Use affected commands in CI to only build/test changed projects:
# .github/workflows/ci.yml
- run: npx nx affected -t lint --parallel
- run: npx nx affected -t test --parallel
- run: npx nx affected -t build --parallel
Examples
Example 1: Create New React Workspace
Input: "Create a new Nx workspace with React and TypeScript"
Steps:
npx create-nx-workspace@latest my-workspace
# Select: Integrated Monorepo → React → Integrated monorepo (Nx Cloud)
Verify: cd my-workspace && nx show projects lists the created app
Expected Result: Workspace created with:
apps/directory with React applibs/directory for shared librariesnx.jsonwith cache configuration- CI/CD workflow files ready
Example 2: Run Tests for Changed Projects
Input: "Run tests only for projects affected by recent changes"
Command:
nx affected -t test --base=main~1 --head=main
Expected Result: Only tests for projects affected by changes between commits are executed, leveraging cached results from previous runs.
Example 3: Generate and Build a Shared Library
Input: "Create a shared UI library and use it in the app"
Steps:
# Generate library
nx g @nx/react:lib shared-ui
# Generate component in library
nx g @nx/react:component button --project=shared-ui
# Import in app (tsconfig paths auto-configured)
import { Button } from '@my-workspace/shared-ui'
Verify: nx run shared-ui:build completes successfully and nx graph shows the dependency link to your app
Expected Result: Buildable library at libs/shared-ui with proper TypeScript path mapping configured.
Example 4: Set Up Module Federation
Input: "Configure Module Federation for micro-frontends"
Steps:
# Create host app
nx g @nx/react:host dashboard
# Add remote to host
nx g @nx/react:remote product-catalog --host=dashboard
# Start dev servers
nx run dashboard:serve
nx run product-catalog:serve
Verify: Both servers start without errors and nx graph shows dashboard → product-catalog remote connection
Expected Result: Two separate applications running where product-catalog loads dynamically into dashboard at runtime.
Example 5: Debug Build Dependencies
Input: "Why is my app rebuilding when unrelated lib changes?"
Diagnosis:
# Show project graph
nx graph --focused=my-app
# Check implicit dependencies
nx show project my-app --json | grep implicitDependencies
Solution: Add explicit dependency configuration or use namedInputs in nx.json to exclude certain files from triggering builds.
Verify Fix Worked: Make a change to the unrelated lib, run nx affected -t build — my-app should not appear in the affected projects list.
Best Practices
- Always use
nx affectedin CI to only test/build changed projects - Organize libs by domain/business capability, not by technical layer
- Use tags consistently (
type:app|lib,scope:frontend|backend|shared) - Prevent circular dependencies by configuring
workspaceLayoutboundaries innx.json - Enable remote caching with Nx Cloud for team productivity
- Keep project.json simple - use defaults from
nx.jsonwhen possible - Leverage generators instead of manual file creation for consistency
- Configure
namedInputsto exclude test files from production cache keys - Use Module Federation for independent deployment of micro-frontends
- Keep workspace generators in
tools/for project-specific scaffolding
Constraints and Warnings
- Node.js 18.10+ is required for Nx 17+
- Windows users: Use WSL or Git Bash for best experience
- First-time setup may take longer due to package installation
- Large monorepos (50+ projects) should use distributed task execution
- Module Federation requires webpack 5+ and specific Nx configuration
- Some generators require additional plugins to be installed first
- Cache location: Default
~/.nx/cachecan grow large; configurecacheDirectoryinnx.jsonif needed - Circular dependencies will cause build failures; use
nx graphto visualize - Preset migration: Converting between Integrated/Standalone/Package-based requires manual effort
Reference Files
For detailed guidance on specific topics, consult:
| Topic | Reference File | |-------|----------------| | Workspace setup, basic commands | references/basics.md | | Generators (app, lib, component) | references/generators.md | | React, Next.js, Expo patterns | references/react.md | | NestJS backend patterns | references/nestjs.md | | TypeScript packages | references/typescript.md | | CI/CD (GitHub, CircleCI, etc.) | references/ci-cd.md | | Caching, affected, advanced | references/advanced.md |
Related Skills
Agent-Reach
97.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
75.4kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
87.7k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
ruflo
74.7k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
