/turborepo:add-appfrom turborepo
Add 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.
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 invariants this skill must preserve.
apps/, and the value of
currentApp in the layout./<name>.Read every apps/*/package.json before answering. A port or a prefix already claimed by
another application is an error, not a warning — stop and ask for a different one.
@repo/mfe enforces both at gateway boot, so a collision breaks the whole repository,
not just the new application.
Mirror the smallest existing application. Files:
apps/<app>/
package.json name, mfe key, scripts, dependencies (catalog: / workspace:*)
next.config.ts withMfe({ transpilePackages: [...] })
tsconfig.json extends @repo/typescript-config/react-library.json
postcss.config.mjs
src/app/layout.tsx RuntimeEnvScript, QueryProvider, AppShell
src/app/page.tsx placeholder landing page
src/app/globals.css Tailwind plus @source over the packages it renders
src/proxy.ts only when the application requires authentication
src/features/
src/shared/
public/
Rules that must hold:
mfe: { basePath, port } in package.json is the only place the port and the
prefix appear. No port in any script, no basePath in next.config.ts.catalog:; workspace packages use workspace:*. Never a
version range.@/*. Do not add paths reaching into ../../packages.transpilePackages and in dependencies only if the application
actually uses it.assetPrefix. basePath already prefixes assets and the gateway forwards
the prefix unchanged.Adding an application must not add a root script. The root has exactly five scripts.
If you feel the need for dev:<app>, use pnpm dev --filter=<app> --filter=gateway
instead.
apps/*/package.json at
boot and sorts by longest prefix. Verify only.packages/lib/src/routes.ts so
the navigation shows them.packages/i18n/src/resources.ts if
it uses @repo/i18n.docker-compose.yml following the existing pattern, and
list it under the gateway's depends_on.AGENTS.md and README.md.pnpm install
pnpm lint --filter=<app>
pnpm check-types --filter=<app>
pnpm build --filter=<app>
Then confirm routing end to end:
pnpm dev --filter=<app> --filter=gateway
Against http://localhost:3000, confirm all four:
| Request | Expected | Catches |
|---|---|---|
<prefix> | answered by the new application | the prefix filter never matching |
<prefix> unauthenticated | a redirect, not 200 | the matcher missing its bare '/' |
<prefix>/anything | redirect to /login on port 3000 | redirects leaking the internal port |
<prefix>s | not served by the new application | the prefix capturing a longer sibling |
Start only the new application and the gateway — never a full pnpm dev for this.
While the shell runs, it answers a mis-routed prefix exactly as the new application would:
same status, same redirect, same returnUrl. A broken prefix filter looks completely
correct. The mis-route only becomes visible with the shell stopped, when the gateway
returns a 503 naming the shell for a request to /<prefix> — that names the component
that wrongly received the request, not the one at fault.
Re-run the same checks against each pre-existing application: an over-matching new prefix damages its neighbours, not itself.
If a check fails, you get at most three autonomous fix attempts. On the third failure, stop and report the exact error.
List every file created and modified, and the real result of each verification step. Say plainly if a step was skipped or failed.
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-packageAdd 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./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.