nx-monorepo — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited nx-monorepo (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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.
Use this skill when:
Trigger phrases: "create Nx workspace", "Nx monorepo", "generate Nx app", "Nx affected", "Nx CI/CD", "Module Federation Nx", "Nx Cloud"
npx create-nx-workspace@latestFollow prompts to select preset (Integrated, Standalone, Package-based) and framework stack.
nx@latest init npx create-nx-workspace@latest my-workspace --preset=reactVerify: nx show projects lists the new workspace projects
nx g @nx/react:app my-app # React library
nx g @nx/react:lib my-lib
# TypeScript library
nx g @nx/js:lib my-utilVerify: nx show projects lists the new lib
nx g @nx/react:component my-comp --project=my-lib nx g @nx/nest:app my-apiVerify: nx show projects lists my-api and nx run my-api:build succeeds
nx affected -t lint test build # 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 nx run my-app:build nx graphEach 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"]
} {
"targets": {
"build": {
"dependsOn": [
{ "projects": ["shared-ui"], "target": "build" }
]
}
}
} { "tags": ["type:ui", "scope:frontend", "platform:web"] } nx g @nx/react:remote checkout --host=dashboard nx g @nx/react:host dashboardUse 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 --parallelInput: "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.json with cache configurationInput: "Run tests only for projects affected by recent changes"
Command:
nx affected -t test --base=main~1 --head=mainExpected Result: Only tests for projects affected by changes between commits are executed, leveraging cached results from previous runs.
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.
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:serveVerify: 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.
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 implicitDependenciesSolution: 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.
type:app|lib, scope:frontend|backend|shared)workspaceLayout boundaries in nx.jsonnx.json when possibletools/ for project-specific scaffolding~/.nx/cache can grow large; configure cacheDirectory in nx.json if needednx graph to visualizeFor 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 |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.