monorepo

monorepo is a skill for Claude Code, Codex from cass-2003/local-workflow-skill. It costs 162 tokens per session (3,237 once invoked), scanned A, original, MIT.

A guide to monorepos, where several related applications and shared libraries live in one code repository. It covers package workspaces, build tools, shared configuration, and releases.

In plain words
What is it for?
Use it to organize frontend, backend, libraries, and command-line tools; choose workspace and build tools; speed up CI; and coordinate package versions.
Why use it?
It helps coordinate changes across projects, share code safely, and avoid repeating build and testing work in a multi-package codebase.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to organize frontend, backend, libraries, and command-line tools; choose workspace and build tools; speed up CI; and coordinate package versions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cass-2003/local-workflow-skill/monorepo
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cass-2003/local-workflow-skill --skill monorepo
Clone the repo
git clone --depth 1 https://github.com/cass-2003/local-workflow-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for monorepo

README.md
[![agentmods](https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/monorepo/github.svg)](https://agentmods.dev/skills/cass-2003/local-workflow-skill/monorepo)
Your own site
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/monorepo"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/monorepo/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for monorepo

Your own site · 80×15
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/monorepo"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/monorepo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 162 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,237 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00162 $0.03237
Opus 5 $0.00081 $0.01618
Sonnet 5 $0.00032 $0.00647
Haiku 4.5 $0.00016 $0.00324

Measured 6d ago against content hash 4f6b569f7a97, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

monorepo scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/engineering-core/ours/monorepo/SKILL.md · 379 lines

How it starts

The opening of the file, as written. The whole thing — 379 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Monorepo Skill — 单仓多包工程

何时使用

  • 多个相关项目(前端 + 后端 + 共享库 + CLI)想统一管理
  • Polyrepo 已有但跨仓改动协调成本高
  • 想做 atomic commit 跨包改动
  • 评估 Turborepo / Nx / Bazel 选型
  • 优化 CI 时间(只跑受影响的包)

一、何时该用 Monorepo / 何时不该

适合

  • ✅ 共享 type 定义 / SDK / config
  • ✅ 跨包重构频繁(API + Frontend 一起改)
  • ✅ 团队规模 ≤ 100 人(再大需要更复杂工具如 Bazel)
  • ✅ 想单一 source of truth + atomic commit

不适合

  • ❌ 完全独立的产品线(共享 < 10%)
  • ❌ 不同语言混合且无统一构建(Bazel 例外)
  • ❌ 需要不同访问权限(开源 vs 内部代码混合 → 用 polyrepo)
  • ❌ 团队没有专人维护构建系统

二、JS / TS 生态选型

工具 角色 适合
pnpm workspaces 包管理器 任何规模,性能最好(硬链接 + 严格依赖)
npm/yarn workspaces 包管理器 简单场景
Turborepo 任务编排 + 缓存 中型 / Vercel 系 / 配置简单
Nx 任务编排 + generator + plugin 大型 / 需要代码生成 / Angular 友好
Rush (Microsoft) 大型 monorepo 治理 超大型
Bazel (Google) 多语言通用构建 跨语言 / 极大型 / 接受陡峭学习
Lerna 老牌(已被 Nx 收购) 维护中,不推荐新项目

推荐组合(中型 TS 项目):pnpm workspaces + Turborepo + Changesets

三、pnpm workspace 标准布局

my-monorepo/
├── package.json                  # 根:私有,仅放工具依赖
├── pnpm-workspace.yaml
├── tsconfig.base.json            # 共享 TS 基础配置
├── turbo.json
├── .changeset/
│   └── config.json
├── apps/
│   ├── web/                      # Next.js 前端
│   ├── api/                      # Node.js 后端
│   └── docs/                     # 文档站
├── packages/
│   ├── ui/                       # 共享组件
│   ├── eslint-config/
│   ├── tsconfig/                 # 共享 tsconfig presets
│   ├── types/                    # 共享 type 定义
│   └── utils/
└── tools/
    └── scripts/                  # 私有脚本
# pnpm-workspace.yaml
packages:
  - "apps/*"
  - "packages/*"
  - "tools/*"
// 根 package.json
{
  "name": "my-monorepo",
  "private": true,
  "scripts": {
    "build": "turbo build",
    "dev":   "turbo dev",
    "lint":  "turbo lint",
    "test":  "turbo test",
    "changeset": "changeset",
    "release": "changeset version && pnpm install && changeset publish"
  },
  "devDependencies": {
    "turbo": "^2.0.0",
    "@changesets/cli": "^2.27.0",
    "typescript": "^5.5.0"
  }
}

Read the full file on GitHub · 379 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 379 lines · 162 tokens per session scan A 4f6b569f7a97

Subscribe to this mod's changes

monorepo is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 2mo ago), licensed MIT. It adds 162 tokens to every session and 3,237 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

monorepo-management

Monorepo tooling, task orchestration, and workspace architecture for JavaScript/TypeScript repositories. Use when setting up Turborepo, Nx, pnpm workspaces, or npm workspaces; designing package boundaries; configuring remote caching; optimizing CI for affected packages; managing versioning with Changesets; or…

curiositech/some_claude_skills · 157 tokens

add-a-lib

Scaffold a new shared library under libs/ in the builders-stack monorepo. Use when code is needed in two or more places (apps or services) and should become a single source of truth consumed by package name. Covers the package.json, tsconfig, the one-public-door src/index.ts barrel, and wiring it into a consumer…

lonormaly/builders-stack · 81 tokens

nx-monorepo

Scaffold and maintain Nx monorepo structure with hexagonal architecture, project tags, TypeScript project references, and npm workspaces linking. Use when creating new apps/libs/tools, fixing build or linking errors, configuring project tags, or enforcing module boundary rules.

felipeblassioli/agent-skills · 57 tokens

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

aws-sst-development

SST v4 (Ion) expert for managing AWS resources as code with the Pulumi-backed framework.

sickn33/agentic-awesome-skills · 26 tokens

league-akari-shard-development

Use when creating, extending, refactoring, splitting, or reviewing League Akari main or renderer shards, including shard file organization, controller/loader/executor/handler boundaries, naming conventions, renderer TSX usage, platform guards, and public contract compatibility.

LeagueAkari/LeagueAkari · 58 tokens