Index of every page on this site: llms.txt
All skills
wshobson avatar

/nx-workspace-patterns

@4220308
by Seth Hobsonwshobson/agents43k stars
4,518
Run it yourself

Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.

Use this Skill: https://skilld.dev/gh/wshobson/agents/nx-workspace-patterns

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈47 tokens for metadata: the name and description. ≈518 when used: this file. ≈2.2k more on demand in 1 file.

Description uses 2.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈187 characters, or 2.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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 and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's

  • Use tags consistently - Enforce with module boundaries
  • Enable caching early - Significant CI savings
  • Keep libs focused - Single responsibility
  • Use generators - Ensure consistency
  • Document boundaries - Help new developers

Don'ts

  • Don't create circular deps - Graph should be acyclic
  • Don't skip affected - Test only what changed
  • Don't ignore boundaries - Tech debt accumulates
  • Don't over-granularize - Balance lib count

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides standard architectural guidelines, templates, and reference configurations for managing Nx monorepo workspaces. No security vulnerabilities or malicious patterns were found.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer8mo

    1 file scanned · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 4220308. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 6 months ago
  • TypeScript
  • nx
  • monorepo
  • workspace
  • build-caching
  • project-boundaries
  • javascript
  • ci-cd
  • affected-commands

README badge

README badge for wshobson/agents/nx-workspace-patterns

Configures Nx monorepo workspaces with patterns for project structure, library organization, and dependency boundaries. Covers workspace setup, remote caching, the affected command workflow, and migrations to Nx.

Generated from the current SKILL.md.

Does this skill cover remote caching setup with Nx Cloud?
The skill mentions implementing remote caching as a core use case, but the SKILL.md content provided does not include specific remote caching configuration steps. Refer to the referenced `references/details.md` file for concrete templates.
What Nx versions does this skill target?
The SKILL.md does not specify a minimum or target Nx version. Assume it applies to recent stable versions unless the bundled templates indicate otherwise.
Does this skill help with migrating an existing monorepo to Nx?
Yes. Migration to Nx is listed as a core use case, though the SKILL.md does not detail migration steps — see `references/details.md` for worked examples.
Can I use this skill to set up project boundaries and enforce them?
Yes. Configuring project boundaries and module boundaries is a primary use case covered by the skill, enforced via tags and dependency rules.
Does this cover custom executors and generators?
The skill acknowledges custom executors and generators in the workspace structure, and the skill description mentions using generators for consistency, but specific executor/generator implementation is not detailed in the provided content.

Generated from the current SKILL.md. These answers refresh after source changes.