/turborepo:add-packagefrom turborepo
Add a shared workspace package to this monorepo. Use when the user wants a new @repo/* package, or wants to promote code out of an application's src/shared.
Ships in turborepo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read AGENTS.md first: it holds the package boundaries this skill must preserve.
A new package is justified when:
Code used by a single application belongs in that application's src/shared. That
promotion path is the reason src/shared exists.
If the request does not meet the bar, say so, propose src/shared instead, and stop. The
user may still ask for the package — then create it.
Also check whether an existing package already owns the concern:
| Package | Owns |
|---|---|
| @repo/utils | Pure framework-agnostic functions. No React, no Next.js, no HTTP client. |
| @repo/lib | Runtime helpers that may depend on React and the HTTP client. |
| @repo/ui | Presentation. May depend on @repo/lib and @repo/utils. |
| @repo/auth | Session verification and route protection. |
@repo/<name>.react is
a peer dependency.packages/<name>/
package.json
tsconfig.json
README.md
src/index.ts
package.json — consumed as source, no build step, no dist:
{
"name": "@repo/<name>",
"version": "0.0.0",
"private": true,
"type": "module",
"exports": {
".": "./src/index.ts",
"./*": "./src/*.ts"
},
"scripts": {
"lint": "biome check .",
"lint:fix": "biome check --write .",
"check-types": "tsc --noEmit"
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
"typescript": "catalog:"
}
}
tsconfig.json:
{
"extends": "@repo/typescript-config/base.json",
"include": ["src"],
"exclude": ["node_modules"]
}
For a package containing components: export ./* as ./src/*.tsx, extend
@repo/typescript-config/react-library.json, and declare react as a peer dependency
resolved through catalog:.
A wildcard subpath only works when every exported file shares one extension. A package
mixing .ts and .tsx lists its subpaths explicitly, as @repo/lib does.
README.md states the boundary in two or three sentences: what belongs here, what does
not, and which packages it may depend on. This is what keeps the package from turning
into a second junk drawer.
For each consuming application:
"@repo/<name>": "workspace:*" to its dependencies,'@repo/<name>' to transpilePackages in its next.config.ts.Any third-party dependency the package needs goes into the catalog block of
pnpm-workspace.yaml first, pinned to an exact version, and is referenced as catalog:.
Never a version range, never a second copy of a version.
pnpm install
pnpm lint
pnpm check-types
At most three autonomous fix attempts on a failure. On the third, stop and report the exact error.
List the files created, the applications wired, and any catalog entries added. Update the
package table in AGENTS.md.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub itixo/itixo-marketplace --plugin turborepo3 skills in this plugin
/add-appAdd a microfrontend application to this monorepo. Use when the user wants a new app, a new microfrontend, or a new URL prefix mounted behind the gateway./turborepo-mfeCreate and extend a pnpm + Turborepo microfrontend monorepo built from independent Next.js applications behind a path-prefix gateway. Use this skill whenever the user wants to bootstrap a new company monorepo, start a new frontend workspace from scratch, add another microfrontend application to an existing monorepo, or add a shared workspace package. Trigger for any of: "new turborepo", "bootstrap a monorepo", "create a new frontend repo", "add a new app/microfrontend", "add a shared package", "scaffold the monorepo", or any request to set up the standard company frontend repository structure.