Cursor
Skill
typescript-monorepo
Guidance for TypeScript monorepos with mixed package managers. Use when codebase has inherited package manager and a workspace root.
Virus-scanned
Reviewed automatically before listing.
Download
unoplat-unoplat-code-confluence-unoplat-code-confluence-query-engine_src_unoplat_code_confluence_query_engine_skills_typescript-monorepo-c66c489.zip · 1 KB
Install
skills CLI
npx skills add https://github.com/unoplat/unoplat-code-confluence/tree/dev/unoplat-code-confluence-query-engine/src/unoplat_code_confluence_query_engine/skills/typescript-monorepo
Claude Code
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install unoplat-unoplat-code-confluence@llmmart
Git
git clone https://github.com/unoplat/unoplat-code-confluence.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole unoplat/unoplat-code-confluence collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
TypeScript Monorepo Workflow Guidance
Install Commands
- Workspace-scoped install runs from workspace root, not leaf
- bun:
bun installat workspace root - pnpm:
pnpm installat workspace root - npm:
npm ciat workspace root - working_directory = workspace root (repo-relative)
Workspace Root Discovery
- If
workspace_rootis present, use it as the direct hint for workspace-owned commands - If
workspace_rootis missing but provenance is inherited, walk upward fromcodebase_pathto find the nearest owning workspace root - Inspect parent directories one level at a time with absolute paths using
get_directory_treeandread_file_content - Stop when you find the nearest workspace-owned signals such as
pnpm-workspace.yaml, a rootpackage.jsonwithworkspaces, a lockfile,turbo.json, ornx.json - Do not assume the leaf owns install/build commands just because the exact workspace root was not precomputed
Build Commands
- Turborepo:
turbo run buildorbun run buildat workspace root - Individual:
bun run build --filter <package>from workspace root - Check turbo.json or nx.json for build pipeline configuration
- working_directory = workspace root
Test/Lint/TypeCheck Commands
- Usually leaf-specific: run from codebase root (omit working_directory)
- Some monorepos configure workspace-level lint/test via turbo.json/nx.json
- Inspect the leaf's package.json scripts section for available commands
Working Directory Rules
- working_directory = workspace root for install/build commands
- working_directory = omit (None) for leaf-local test/lint/type_check
- working_directory = "." when command must run from repository root
- If both workspace-level and leaf-level commands exist for same stage, emit both with distinct working_directory
Config File Path Rules
- config_file must always be repository-root-relative
- Never use absolute paths in config_file
- Never use codebase-relative
..segments in config_file - For workspace-owned configs above the leaf, emit the full repository-root path, for example:
infra/services/turbo.jsoninfra/services/pnpm-workspace.yaml
Upward Discovery Example
- Given
codebase_path = /opt/unoplat/repositories/acme/infra/services/apps/apiand inherited provenance with noworkspace_root - Inspect
/opt/unoplat/repositories/acme/infra/services/apps/api, then/opt/unoplat/repositories/acme/infra/services/apps, then/opt/unoplat/repositories/acme/infra/services - If
/opt/unoplat/repositories/acme/infra/services/pnpm-workspace.yamlexists, use repo-relativeinfra/servicesas the workspace root - Then emit workspace-owned commands like install/build with
working_directory = "infra/services"
Package Manager Inheritance
- Leaf inherits manager from nearest workspace aggregator
- Commands use the inherited manager's CLI (bun, pnpm, npm, yarn)
- Lock files live at workspace root, not leaf
- If leaf has its own local manager, provenance=local and no workspace root
Files (unoplat-code-confluence)
-
SKILL.md 3.1 KB
--- name: typescript-monorepo description: >- Guidance for TypeScript monorepos with mixed package managers. Use when codebase has inherited package manager and a workspace root. --- ## TypeScript Monorepo Workflow Guidance ### Install Commands - Workspace-scoped install runs from workspace root, not leaf - bun: `bun install` at workspace root - pnpm: `pnpm install` at workspace root - npm: `npm ci` at workspace root - working_directory = workspace root (repo-relative) ### Workspace Root Discovery - If `workspace_root` is present, use it as the direct hint for workspace-owned commands - If `workspace_root` is missing but provenance is inherited, walk upward from `codebase_path` to find the nearest owning workspace root - Inspect parent directories one level at a time with absolute paths using `get_directory_tree` and `read_file_content` - Stop when you find the nearest workspace-owned signals such as `pnpm-workspace.yaml`, a root `package.json` with `workspaces`, a lockfile, `turbo.json`, or `nx.json` - Do not assume the leaf owns install/build commands just because the exact workspace root was not precomputed ### Build Commands - Turborepo: `turbo run build` or `bun run build` at workspace root - Individual: `bun run build --filter <package>` from workspace root - Check turbo.json or nx.json for build pipeline configuration - working_directory = workspace root ### Test/Lint/TypeCheck Commands - Usually leaf-specific: run from codebase root (omit working_directory) - Some monorepos configure workspace-level lint/test via turbo.json/nx.json - Inspect the leaf's package.json scripts section for available commands ### Working Directory Rules - working_directory = workspace root for install/build commands - working_directory = omit (None) for leaf-local test/lint/type_check - working_directory = "." when command must run from repository root - If both workspace-level and leaf-level commands exist for same stage, emit both with distinct working_directory ### Config File Path Rules - config_file must always be repository-root-relative - Never use absolute paths in config_file - Never use codebase-relative `..` segments in config_file - For workspace-owned configs above the leaf, emit the full repository-root path, for example: - `infra/services/turbo.json` - `infra/services/pnpm-workspace.yaml` ### Upward Discovery Example - Given `codebase_path = /opt/unoplat/repositories/acme/infra/services/apps/api` and inherited provenance with no `workspace_root` - Inspect `/opt/unoplat/repositories/acme/infra/services/apps/api`, then `/opt/unoplat/repositories/acme/infra/services/apps`, then `/opt/unoplat/repositories/acme/infra/services` - If `/opt/unoplat/repositories/acme/infra/services/pnpm-workspace.yaml` exists, use repo-relative `infra/services` as the workspace root - Then emit workspace-owned commands like install/build with `working_directory = "infra/services"` ### Package Manager Inheritance - Leaf inherits manager from nearest workspace aggregator - Commands use the inherited manager's CLI (bun, pnpm, npm, yarn) - Lock files live at workspace root, not leaf - If leaf has its own local manager, provenance=local and no workspace root
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.