This skill should be used when the user asks to "detect workspaces", "find packages", "list monorepo packages", "workspace structure", "monorepo analysis", or needs to identify workspace/package boundaries in a codebase for focused security analysis.
From vuln-scoutnpx claudepluginhub allsmog/vuln-scout --plugin vuln-scoutThis skill uses the workspace's default tool permissions.
references/javascript-workspaces.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Provide comprehensive knowledge of monorepo and workspace patterns across package managers and build tools. Enables focused security analysis by identifying logical boundaries within large codebases.
Activate this skill during:
| Type | Characteristics | Common Tools |
|---|---|---|
| Package-based | Multiple npm/pip/cargo packages | npm workspaces, yarn, pnpm |
| Application-based | Multiple apps sharing code | Turborepo, Nx, Lerna |
| Module-based | Language modules in subdirs | Go modules, Maven modules |
| Hybrid | Mix of above | Custom setups |
// package.json
{
"workspaces": [
"packages/*",
"apps/*"
]
}
Detection command:
grep -l '"workspaces"' package.json && cat package.json | grep -A 10 '"workspaces"'
# pnpm-workspace.yaml
packages:
- 'packages/*'
- 'apps/*'
- '!**/test/**'
Detection command:
cat pnpm-workspace.yaml 2>/dev/null
// turbo.json
{
"pipeline": {
"build": { "dependsOn": ["^build"] },
"test": { "dependsOn": ["build"] }
}
}
Detection command:
ls turbo.json 2>/dev/null && echo "Turborepo detected - uses package.json workspaces"
// nx.json
{
"npmScope": "myorg",
"tasksRunnerOptions": { ... }
}
Detection command:
ls nx.json 2>/dev/null && cat nx.json | head -20
// lerna.json
{
"packages": ["packages/*"],
"version": "independent"
}
Detection command:
cat lerna.json 2>/dev/null | grep -A 5 '"packages"'
// go.work
go 1.21
use (
./cmd/api
./cmd/worker
./pkg/shared
)
Detection command:
cat go.work 2>/dev/null
find . -name "go.mod" -maxdepth 4 | head -20
<!-- pom.xml (parent) -->
<modules>
<module>api</module>
<module>worker</module>
<module>shared</module>
</modules>
Detection command:
grep -A 10 '<modules>' pom.xml 2>/dev/null
// settings.gradle
rootProject.name = 'myproject'
include ':api'
include ':worker'
include ':shared'
Detection command:
grep "include" settings.gradle 2>/dev/null
grep "include" settings.gradle.kts 2>/dev/null
# Cargo.toml
[workspace]
members = [
"crates/api",
"crates/worker",
"crates/shared",
]
Detection command:
grep -A 10 '\[workspace\]' Cargo.toml 2>/dev/null
# pyproject.toml
[tool.poetry]
packages = [
{ include = "api", from = "packages" },
{ include = "worker", from = "packages" },
]
Detection command:
grep -A 5 'packages' pyproject.toml 2>/dev/null
find . -name "setup.py" -o -name "pyproject.toml" | grep -v node_modules | head -20
// composer.json
{
"repositories": [
{ "type": "path", "url": "./packages/*" }
]
}
Detection command:
grep -A 5 '"repositories"' composer.json 2>/dev/null | grep path
Run detection commands in order:
# JavaScript
ls package.json pnpm-workspace.yaml turbo.json nx.json lerna.json 2>/dev/null
# Go
ls go.work 2>/dev/null || find . -name "go.mod" -maxdepth 3 2>/dev/null | wc -l
# Java
ls pom.xml settings.gradle settings.gradle.kts 2>/dev/null
# Rust
grep '\[workspace\]' Cargo.toml 2>/dev/null
# Python
find . -name "pyproject.toml" -maxdepth 3 2>/dev/null | wc -l
Parse the detected configuration to list actual workspace directories.
For each workspace, collect:
Score each workspace:
| Factor | Points | Criteria |
|---|---|---|
| External-facing | +3 | API, web server, CLI |
| Auth/authz logic | +3 | Login, permissions, sessions |
| Database access | +2 | ORM, raw queries |
| File operations | +2 | Upload, download, file processing |
| Background jobs | +1 | Workers, queues, cron |
| Shared library | +1 | Used by multiple packages |
| UI only | -1 | Frontend, no backend logic |
Order workspaces by:
# Scope specific workspace
npx repomix packages/api --output .claude/scope-api.md
# Scope multiple workspaces
npx repomix packages/api packages/auth --output .claude/scope-critical.md
# View workspace dependencies
codemap --deps packages/api
# Full dependency graph
codemap --deps --json > deps.json
# Scan specific workspace
/whitebox-pentest:scan packages/api
# Audit specific workspace
/whitebox-pentest:full-audit packages/auth
See language-specific patterns:
references/javascript-workspaces.md - npm, yarn, pnpm, turborepo, nx, lernareferences/jvm-workspaces.md - Maven, Gradle, Kotlinreferences/systems-workspaces.md - Go, Rust, C/C++