Agent Skill
2/7/2026workspace-build
Build all affected submodules across the workspace, including running tests for changed files, using Nx for affected project detection
R
riatzukiza
2GitHub Stars
1Views
npx skills add riatzukiza/devel
SKILL.md
| Name | workspace-build |
| Description | Build all affected submodules across the workspace, including running tests for changed files, using Nx for affected project detection |
name: workspace-build description: "Build all affected submodules across the workspace, including running tests for changed files, using Nx for affected project detection"
Skill: Workspace Build
Goal
Build affected submodules across the workspace using Nx affected detection, with a full-run fallback available.
Use This Skill When
- You need to build all affected submodules after making changes
- You want to verify build success across multiple repositories
- You need to run tests for affected files before committing
Do Not Use This Skill When
- You are only working in a single submodule and can run its own build
- The change is unrelated to the codebase being built
Inputs
- File paths to check for changes (default: affected files from git working tree + staged + untracked)
- Target to run (build)
Steps
- Run
pnpm buildto build affected submodules - Script uses
scripts/nx-affected.mjsto collect uncommitted changes - Runs
nx affected --target=buildwith the computed file list - Use
pnpm build:allto force a full run
Output
- Build/test summary for each affected submodule
- Exit code 0 if all builds succeed, 1 if any fail
Strong Hints
- Affected Tests: Prefer
nx affected --target=testbeforebuild - Files Argument: Pass
--files <path>to limit to specific files - Parallel Execution: Uses Nx's parallel execution for efficiency
- Workspace Root: Run from workspace root to detect changes correctly
- Nx Config: Uses
nx.jsonfrom workspace root
Common Commands
Build Affected Submodules
# Build affected submodules
pnpm build
# Build all submodules
pnpm build:all
# Build with specific files
nx affected --target=build --files src/some/file.ts
Build Specific Submodule
# Navigate to submodule and build
cd orgs/riatzukiza/promethean
pnpm build
# Build with Nx
nx build
References
- Nx config:
nx.json - Giga Nx plugin:
tools/nx-plugins/giga/ - Build runner:
scripts/nx-affected.mjs
Important Constraints
- Affected Detection: Only builds submodules affected by your changes
- Parallel Execution: Nx uses parallel jobs for efficiency
- File Changes: Run from workspace root to detect changes correctly
- Nx Config: Uses
nx.jsonfrom workspace root - Build Order: Nx handles dependency order automatically
Error Handling
- Build Failures: Script exits with code 1 on build failures
- Test Failures: Script exits with code 1 on test failures
- Dependency Issues: Missing dependencies cause build failures
- Nx Errors: Nx errors are propagated to the build script
Output Format
nx affected --target=test --build
> nx affected --target=test --build
orgs/riatzukiza/promethean
test: success
build: success
orgs/sst/opencode
test: success
build: success
Skills Info
Original Name:workspace-buildAuthor:riatzukiza
Download