Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Monorepo

ASecurity

MUST use for ANY query mentioning packages, monorepo, workspace, catalog, turbo, turborepo, or pnpm in a multi-package context. MUST use when sharing config (ESLint, tsconfig, prettier) across packages, fixing build order between packages, adding new packages, scoping CI installs/caching to changed packages, or debugging pnpm catalog version resolution. This skill OWNS all cross-package coordination problems — even when they look like build, CI, config, or dependency issues. If two or more pa...

119 stars
0 votes
0 copies
0 views
Added 5/28/2026
ai-agentstypescriptgoreactvuedebuggingapi

Works with

api

Security Analysis

A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 6 files and shows the line behind each finding

Scanned 5/28/2026

$npx -y skills add avibebuilder/claude-prime --skill monorepo --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Monorepo?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Monorepo
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/avibebuilder-monorepo/badge)](https://www.skillsdirectory.com/skills/avibebuilder-monorepo)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: monorepo
description: "MUST use for ANY query mentioning packages, monorepo, workspace, catalog, turbo, turborepo, or pnpm in a multi-package context. MUST use when sharing config (ESLint, tsconfig, prettier) across packages, fixing build order between packages, adding new packages, scoping CI installs/caching to changed packages, or debugging pnpm catalog version resolution. This skill OWNS all cross-package coordination problems — even when they look like build, CI, config, or dependency issues. If two or more packages interact in the query, this skill applies. Takes priority over other skills when the problem spans package boundaries."
---

# Monorepo

Project-specific patterns for pnpm workspaces + Turborepo.

## Architecture Decisions

### Workspace Organization
1. **Split apps from packages** — `apps/` for deployables, `packages/` for shared libraries.
2. **Namespace packages** — Prefix with `@org/` to avoid npm conflicts.
3. **Single lockfile** — `pnpm-lock.yaml` at root only. Never commit multiple lockfiles.
4. **No cross-package file access** — Never use `../` to reach into other packages; import via dependencies.

### Dependency Management
5. **Use `workspace:*` protocol** — Always for internal package dependencies.
6. **Hoist common devDependencies** — Shared tooling (TypeScript, ESLint) in root.
7. **Peer dependencies for frameworks** — React, Vue, etc. as peers to avoid version conflicts.
8. **Consider Catalogs (pnpm 9.5+)** — Centralize versions in `pnpm-workspace.yaml` for large repos.

### Turborepo Tasks
9. **Use `^` for build dependencies** — `"dependsOn": ["^build"]` for topological order.
10. **Always define `outputs`** — Without outputs, nothing gets cached.
11. **Mark dev servers as persistent** — `"persistent": true, "cache": false`.
12. **Be explicit about environment** — List all build-affecting vars in `env` or `globalEnv`.

## Gotchas

- Missing `outputs` in turbo.json silently disables caching for that task. The task runs every time and you won't get an error — just slow builds. Always verify outputs are configured.
- `pnpm install` does NOT respect `--filter` for installation — it always installs the entire workspace. Filtering only works for `pnpm run` and `pnpm exec`.
- `workspace:*` resolves to the CURRENT version of the local package, not "latest from npm". If the package has `"version": "0.0.0"`, published packages will have `"dependency": "0.0.0"` — set meaningful versions before publishing.
- Turborepo's `env` field in turbo.json uses GLOB patterns, not exact matches. `"env": ["API_*"]` captures `API_KEY`, `API_URL`, etc. Forgetting this causes over-invalidation.
- `turbo run build --filter=app-a` builds app-a AND all its workspace dependencies. If a dependency fails, app-a won't build. Check transitive deps.
- Adding a package to `packages/` requires running `pnpm install` before the workspace recognizes it. The new package also needs a valid `package.json` with `name` matching the workspace pattern.
- TypeScript project references (`references` in tsconfig.json) must match the workspace dependency graph. Mismatches cause type errors that only appear during `tsc --build`, not in IDE.
- `turbo.json`'s `globalDependencies` invalidates ALL tasks when listed files change. Don't put frequently-changed files here — use task-level `inputs` instead.
- Shared Tailwind configs need `@source` directives pointing to consuming packages' source directories, otherwise classes used in shared packages are purged.
- `pnpm deploy` (for production) copies a single package and its dependencies to a target directory. It does NOT run build scripts — build first, then deploy.
- Remote cache (Vercel or self-hosted) requires `outputs` to be correct. If outputs are wrong, cached artifacts will be incomplete and downstream tasks break silently.
- `persistent: true` tasks prevent `turbo run` from exiting. Don't include persistent tasks in CI pipelines unless they have a timeout.

## References

| When you need... | Read |
|------------------|------|
| workspace.yaml, workspace: protocol, filtering | [pnpm-workspace.md](./references/pnpm-workspace.md) |
| turbo.json schema, tasks, dependsOn | [turborepo.md](./references/turborepo.md) |
| Cache outputs/inputs, remote cache setup | [caching.md](./references/caching.md) |
| Directory layout, package naming, tsconfig | [structure.md](./references/structure.md) |
| Tailwind v4 shared theme package | [tailwind-v4.md](./references/tailwind-v4.md) |

## External Resources

- [pnpm Workspaces](https://pnpm.io/workspaces)
- [Turborepo Docs](https://turborepo.com/docs)
- [Configuring turbo.json](https://turborepo.com/docs/reference/configuration)

Attribution

avibebuilderavibebuilder
View sourceSee grades on GitHubMore from avibebuilder →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →