Repo Orchestrator
Purpose: quickly bootstrap a new/existing project and consistently route to the best skill(s) based on repository context.
This skill is agent-agnostic: you can apply it in Claude Code, Cursor, OpenCode, or any other agent that can follow checklists and run shell commands.
Safety Rules
- •Do not recommend destructive actions (no force pushes, hard resets, deleting lockfiles, etc.).
- •Prefer additive changes and explicit prompts before any risky step.
Quick Start Checklist
- • Identify repo type (git or not)
- • Identify runtime/package manager expectations (Node?
package.jsonpresent?) - • Detect framework(s) and route to the correct skill
- • If the task is UI/visual/design-heavy, route to
frontend-design
Detection Checklist
Run these checks in order (or use the equivalent in your environment):
1) Git repo?
- •Check:
git rev-parse --is-inside-work-tree
- •
If
gitis not available, stop and ask before installing tooling. - •
If NOT a git repo, bootstrap:
git init
Optional (non-destructive): set the initial branch name if your environment expects main:
git branch -M main
2) Node project? (package.json present)
- •Check:
test -f package.json && echo "package.json found"
- •If
package.jsonexists but Node.js is not available, stop and ask before installing/changing runtimes:
command -v node >/dev/null && node --version
- •If
package.jsonexists, enforce pnpm usage (not npm):
corepack enable
node -e "const pm=require('./package.json').packageManager; if(pm) console.log(pm)" 2>/dev/null
# If `packageManager` is set to `pnpm@x.y.z`, prefer that version; otherwise use latest.
corepack prepare pnpm@latest --activate
pnpm --version
- •If
corepackis unavailable or fails, do not fall back tonpm install. Ask the user for an approved pnpm installation method for their environment.
Install dependencies:
pnpm install
If a package-lock.json exists, prefer importing rather than deleting:
pnpm import
Optional (recommended) policy to prevent accidental npm usage:
- •Add
"packageManager": "pnpm@<version>"topackage.json. - •Document the policy in your contributing docs.
3) Framework detection
Use one or more of:
test -f next.config.js || test -f next.config.mjs || test -f next.config.ts
test -f nest-cli.json
node -e "const p=require('./package.json'); console.log(Object.keys({...p.dependencies,...p.devDependencies}).join('\n'))" 2>/dev/null
Heuristics:
- •Next.js:
next.config.*exists ORnextin dependencies - •React:
reactin dependencies - •NestJS:
nest-cli.jsonexists OR@nestjs/corein dependencies
Routing Table
| Detected Context | Route to skill | How to use it |
|---|---|---|
| Next.js project | nextjs-skill | Use for any Next.js work: routing, data fetching, performance, configuration. |
| React (non-Next) project | vercel-react-best-practices | Use for React component patterns and performance best practices. |
| NestJS project | nestjs-best-practices | Use for modules/DI, controllers, validation, security, and production patterns. |
| Frontend design / UI polish / new UI artifacts | frontend-design | Use when building design-driven UI, layouts, components, or artifacts. |
Orchestration Procedure (Follow Every Time)
- •Bootstrap basics
- •If not a git repo: run
git init. - •If
package.jsonexists: ensurepnpmis active and usepnpm install.
- •Route to the best specialist skill
- •If Next.js detected: route to
nextjs-skilland stop guessing. - •Else if NestJS detected: route to
nestjs-best-practices. - •Else if React detected: route to
vercel-react-best-practices. - •If the user request is primarily visual/design: additionally route to
frontend-design.
- •Keep a lightweight plan
- •Create (or update) an optional
SKILLS.mdfile in the project root to record:- •which skills apply
- •which commands to run
- •any repo conventions (pnpm policy, branch name)
Optional: SKILLS.md Template
Copy/paste this into the target project repo if useful:
# Project Skills Plan ## Detected Context - Git repo: yes/no - Node: yes/no - Framework: nextjs/react/nestjs/other ## Skills To Use - nextjs-skill (when Next.js detected) - vercel-react-best-practices (when React detected) - nestjs-best-practices (when NestJS detected) - frontend-design (when the task is UI/design heavy) ## Setup Commands ### Git ```bash git rev-parse --is-inside-work-tree || git init ``` ### Node + pnpm ```bash test -f package.json && corepack enable test -f package.json && corepack prepare pnpm@latest --activate test -f package.json && pnpm install ```