用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill review-router命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | review-router |
| description | Routes PR review by diff — delegates to backend/frontend specialist. |
Classify the changeset and route to the correct specialist reviewer(s). Run this logic before any review work begins.
Run the following command to get the list of changed files:
git diff main...HEAD --name-only 2>/dev/null || git diff HEAD~1 --name-only
If reviewing a specific ref or PR branch, adapt the command accordingly. For an override, check whether the user passed an explicit argument (/review backend, /review frontend, /review both) — if so, skip classification and go directly to Step 2.
Score each changed file against the two path sets below. A file matches backend or frontend (or both) based on its extension and directory.
| Pattern | Examples |
|---|---|
| Server-side extensions | *.go, *.py, *.rb, *.php, *.java, *.kt, *.rs, *.ex, *.exs, *.cs |
| Server directories | app/Http/, app/Models/, app/Services/, app/Repositories/, app/Jobs/, app/Events/, app/Listeners/, app/Console/ |
| Database | database/migrations/, database/seeders/, db/migrate/, alembic/, prisma/migrations/ |
| API/config | routes/api.*, config/, src/routes/, src/controllers/, src/services/, src/repositories/ |
| Infrastructure | docker-compose.yml, Dockerfile, *.tf, .env.example |
| Pattern | Examples |
|---|---|
| Component extensions | *.tsx, *.jsx, *.vue, *.svelte |
| Style files | *.css, *.scss, *.sass, *.less, *.module.css |
| Frontend directories | src/components/, src/pages/, src/views/, src/app/ (Next.js), src/hooks/, src/context/, src/store/, resources/js/, resources/css/, resources/views/ |
| Assets | public/, assets/, static/ |
| Frontend config | vite.config.*, next.config.*, nuxt.config.*, tailwind.config.* |
Files like *.ts (non-React), package.json, tsconfig.json, or *.json alone do not determine the type. Count only if paired with other signals on the same side.
| Condition | Result |
|---|---|
| Only backend signals | BACKEND |
| Only frontend signals | FRONTEND |
| Both signals present | BOTH |
| No clear signal | BOTH (safer default — include all reviewers) |
BACKENDProceed as backend-reviewer. Apply all categories from agents/backend-reviewer.md without invoking a separate agent. State at the start of the review:
Review type: Backend (classified from diff — N backend files, 0 frontend files)
FRONTENDProceed as frontend-reviewer. Apply all categories from agents/frontend-reviewer.md without invoking a separate agent. State at the start of the review:
Review type: Frontend (classified from diff — 0 backend files, N frontend files)
BOTHDo not attempt a full review alone. Output the following routing message and stop:
Review type: Full-stack (N backend files + M frontend files detected)
This PR has both backend and frontend changes. For the most thorough review, invoke the two specialist agents in parallel by sending both prompts in a single message:
Prompt A → backend-reviewer: "Review the backend changes in this PR. Focus on: API contracts, database transactions, N+1 queries, auth/authz, background jobs, race conditions, SOLID, and security."
Prompt B → frontend-reviewer: "Review the frontend changes in this PR. Focus on: component design, re-renders, accessibility, bundle size, state management, XSS, loading/error states, and type safety."
Send both prompts simultaneously — they are independent and can run in parallel.
Users can bypass classification by passing an explicit argument:
| Command | Behavior |
|---|---|
/review backend | Skip classification → route as BACKEND |
/review frontend | Skip classification → route as FRONTEND |
/review both | Skip classification → output routing message for BOTH |
Projects with non-standard directory structures can define custom path mappings in docs/development/code-standards.md or CLAUDE.md under a ## Review Router section:
review-router:
backend-paths:
- "server/"
- "lambda/"
frontend-paths:
- "web/src/"
- "mobile/src/"
When this block is present, use it instead of the default heuristics above.