nx-workspace-patterns

Configure Nx monorepo structures with tags, caching, and affected-command CI workflows.

9|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/pantheon-org/tekhne --skill nx-workspace-patterns-pantheon-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-workspace-patterns
Source: https://github.com/pantheon-org/tekhne/tree/main/skills/repository-mgmt/nx/workspace-patterns
Command: npx skills add https://github.com/pantheon-org/tekhne --skill nx-workspace-patterns-pantheon-org

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity of managing large Nx monorepos by providing structured patterns for workspace architecture, dependency enforcement, and efficient CI workflows, ultimately reducing costs and improving developer experience.

Core Features & Use Cases

  • Monorepo Structuring: Guides the organization of apps/, libs/, and tools/ directories.
  • Dependency Enforcement: Utilizes tagging and lint rules to maintain clear project boundaries.
  • CI Optimization: Leverages Nx's affected commands and caching for faster, cost-effective builds and tests.
  • Use Case: When setting up a new Nx monorepo or refactoring an existing one, use this Skill to establish robust project structure, enforce module boundaries, and configure CI to only build and test what has changed.

Quick Start

Use the nx-workspace-patterns skill to configure Nx monorepo architecture and optimize CI pipelines.

Frequently Asked Questions about nx-workspace-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Nx monorepo architecture for scalable TypeScript projects?

To optimize Nx monorepo architecture, establish deterministic project-graph structures, enforce boundary rules via tags, and implement cache-aware pipelines. This structured approach reduces CI costs and maintains scalable workspace management for large TypeScript codebases.

What is the best way to enforce module boundaries in an Nx workspace?

The best way to enforce module boundaries in an Nx workspace is by utilizing tagging and lint rules. This dependency enforcement mechanism maintains clear project boundaries, ensures automated dependency validation, and prevents unauthorized inter-project dependencies across your apps and libs directories.

How do I configure CI pipelines to only build and test changed projects in an Nx monorepo?

Configure CI pipelines to only build and test changed projects by leveraging Nx affected commands and caching. This cache-aware pipeline setup orchestrates tasks efficiently, running only what has changed to achieve performance-optimized, cost-effective CI execution.

When do I need to set up affected-command CI workflows in an Nx workspace?

You need affected-command CI workflows when managing large Nx monorepos and wanting to reduce CI costs. These workflows leverage Nx task orchestration to automatically validate dependencies and only execute build and test pipelines for projects affected by recent changes.

Does this Nx workspace structuring approach support existing monorepo refactoring?

Yes, this Nx workspace structuring approach fully supports refactoring existing monorepos. It guides the reorganization of apps, libs, and tools directories while establishing robust project structure, enforcing module boundaries, and configuring CI pipelines.