pn-monorepo

pn-monorepo is a skill for Cursor from perniemann/pnCore. It costs 52 tokens per session (737 once invoked), scanned A, original, MIT.

A guide for organising several applications and shared packages in one code repository, called a monorepo. It covers Turborepo, Nx, and pnpm workspace setups.

In plain words
What is it for?
Use it to create or refactor a monorepo, add packages or apps, configure build caching, publish shared packages, or move several repositories into one.
Why use it?
It helps keep shared code, dependencies, build tasks, and package publishing consistent as a project grows. It also helps diagnose slow builds and dependency problems.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it to create or refactor a monorepo, add packages or apps, configure build caching, publish shared packages, or move several repositories into one.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perniemann/pncore/pn-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 perniemann/pnCore --skill pn-monorepo
Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

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 pn-monorepo

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-monorepo/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-monorepo)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-monorepo"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-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 pn-monorepo

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-monorepo"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-monorepo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 737 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.00052 $0.00737
Opus 5 $0.00026 $0.00368
Sonnet 5 $0.00010 $0.00147
Haiku 4.5 $0.00005 $0.00074

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

Security

Grade A, and why

pn-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 8d 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.

packages/pn-core-mcp/content/skills/ci/pn-monorepo/SKILL.md · 69 lines

How it starts

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

Monorepo

When to use

  • Setting up a new monorepo with Turborepo, Nx, or pnpm workspaces
  • Adding a new package or app to an existing monorepo
  • Configuring build caching and task pipelines
  • Publishing shared packages (publishConfig, changesets)
  • Diagnosing slow builds or dependency resolution issues
  • Migrating a multi-repo project into a monorepo

For full config files, package.json examples, and CI setup, see reference.md.

Tool decision matrix

Tool When to prefer
Turborepo Simple task orchestration, JS/TS focused, minimal config, Vercel deployment
Nx Large monorepos, cross-language, plugin ecosystem, IDE integration
pnpm workspaces (standalone) Lightweight setups where you only need workspace linking
Nx + pnpm Large teams with complex graph, best cache and affected analysis
Turborepo + pnpm Most common 2026 default for JS/TS stacks

Structure

my-monorepo/
├── apps/
│   ├── web/          (Next.js)
│   └── api/          (Node.js / Hono)
├── packages/
│   ├── ui/           (shared React components)
│   ├── config-ts/    (shared tsconfig)
│   └── utils/        (shared utilities)
├── turbo.json
├── package.json
└── pnpm-workspace.yaml

Key rules

Shared tsconfig: Keep a base config-ts/base.json; each app extends it. Shared internal packages point exports directly to ./src/index.ts for zero-build dev.

Publishable packages: Set "private": false with publishConfig, exports, and files: ["dist"]. Build with tsup.

Internal packages: Set "private": true, exports to ./src/index.ts. Consuming apps declare "@my-org/utils": "workspace:*".

Changesets: Use npx changeset add per PR, npx changeset version to bump, npx changeset publish to release.

Remote caching: Connect to Vercel remote cache or self-host with TURBO_API + TURBO_TOKEN.

Common pitfalls

  • Hoisting conflicts — set shamefully-hoist=false in the project npm config file to prevent phantom dependencies
  • Circular dependencies — extract shared logic to a new leaf package; Turbo detects cycles
  • Missing ^build dependency — if B imports A, turbo.json must have "dependsOn": ["^build"]
  • Dev server cache — set "cache": false for dev task

Read the full file on GitHub · 69 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 69 lines · 52 tokens per session scan A 4efaad642643

Subscribe to this mod's changes

pn-monorepo is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 5d ago), licensed MIT. It adds 52 tokens to every session and 737 once invoked, about $0.0003 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.