repo-orchestrator

📁 ydkd/skills 📅 Feb 5, 2026
3
总安装量
3
周安装量
#59111
全站排名
安装命令
npx skills add https://github.com/ydkd/skills --skill repo-orchestrator

Agent 安装分布

opencode 3
codex 3
cursor 3
gemini-cli 2
codebuddy 2
claude-code 2

Skill 文档

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.json present?)
  • 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 git is 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.json exists but Node.js is not available, stop and ask before installing/changing runtimes:
command -v node >/dev/null && node --version
  • If package.json exists, 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 corepack is unavailable or fails, do not fall back to npm 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>" to package.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 OR next in dependencies
  • React: react in dependencies
  • NestJS: nest-cli.json exists OR @nestjs/core in 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)

  1. Bootstrap basics
  • If not a git repo: run git init.
  • If package.json exists: ensure pnpm is active and use pnpm install.
  1. Route to the best specialist skill
  • If Next.js detected: route to nextjs-skill and 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.
  1. Keep a lightweight plan
  • Create (or update) an optional SKILLS.md file 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
```